Vagrant
無法關閉或銷毀崩潰的 Vagrant 盒子
我正在使用 VMWare Fusion 10 + vagrant + High Sierra。
我提供了一個流浪的 FreeBSD 盒子:
$ vagrant init freebsd/FreeBSD-10.3-RELEASE $ vagrant up --provider vmware_fusion
然後我犯了一個愚蠢的錯誤,失去了對虛擬機的控制/崩潰。
兩者
vagrant ssh
和vagrant halt
都vagrant destroy default
不起作用。$ vagrant halt ==> default: Attempting graceful shutdown of VM... ^C==> default: Waiting for cleanup before exiting... ^C==> default: Exiting immediately, without cleanup! $ $ vagrant destroy default default: Are you sure you want to destroy the 'default' VM? [y/N] y ==> default: Stopping the VMware VM... ^C==> default: Waiting for cleanup before exiting...
該怎麼辦?
您必須殺死實際的 VMWare 實例。
當我使用預設名稱時…
$ px ax | grep default | grep VMware 46826 ?? Ss 2:09.49 /Applications/VMware Fusion.app/Contents/Library/vmware-vmx -s vmx.noUIBuildNumberCheck=TRUE -# product=1;name=vmrun;version=1.17.0;buildnumber=7520154;licensename=VMware Fusion for Mac OS;licenseversion=10.0; -@ duplex=3;msgs=ui /Users/ruiribeiro/.vagrant/machines/default/vmware_fusion/c38ba960-54c2-4bf6-ba61-0388f47da5d9/vagrant.vmx $ kill -9 46826
然後在殺死它之後,最後你設法成功地清理/銷毀它:
$ vagrant destroy default default: Are you sure you want to destroy the 'default' VM? [y/N] y ==> default: Deleting the VM... $