2017-08-24 86 views
1

我在Windows 10 Pro下首先使用Vagrant與Virtualbox提供商並創建了幾個框。然後,因爲我想測試Docker for Win,我不得不切換到Hyper V並卸載Virtualbox。過了一段時間,我手動刪除了一些Virtualbox機器或重新設置了文件夾,以便它們不再有Vagrantfile。如何使用Hyper-V作爲提供者來移除緩存的不存在的Virtualbox機器?

當我嘗試運行任何
vagrant global-status --prune

vagrant destroy -f XXXYYYZZZ
我得到這個錯誤:
The provider 'virtualbox' that was requested to back the machine 'default' is reporting that it isn't usable on this system. The reason is shown below: Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed. Vagrant uses the VBoxManage binary that ships with VirtualBox, and requires this to be available on the PATH. If VirtualBox is installed, please find the VBoxManage binary and add it to the PATH environmental variable.
我明白流浪是想說:安裝VirtualBox二進制文件,因此它可以管理的框。但實際上並沒有虛擬機開始,所以它應該足以將其從註冊表中刪除,並且不需要Virtualbox。
有沒有辦法在我的情況下從註冊表中刪除緩存的盒子?

回答

1

流浪漢是保持其管理下的以下位置的計算機列表(即適用於Mac,你需要找到窗口,因爲我不完全肯定的路徑)

~/.vagrant.d/data/machine-index 

,並在此文件夾中,您會找到一個index文件,該文件將列出它在緩存中存在的所有機器。它的一個JSon文件和該機器的提供商已列出,因此您可以刪除任何不是VirtualBox

+0

是的,這也是我最初的想法,我只是希望有一些更優雅的解決方案。 – borism

相關問題