无法关闭或销毁崩溃的 Vagrant 盒子

无法关闭或销毁崩溃的 Vagrant 盒子

我正在使用 VMWare Fusion 10 + vagrant + High Sierra。

我配置了一个 vagrant FreeBSD 盒子:

$ vagrant init freebsd/FreeBSD-10.3-RELEASE
$ vagrant up --provider vmware_fusion

然后我犯了一个愚蠢的错误,并失去了对虚拟机的控制/崩溃了。

两者vagrant sshvagrant haltvagrant 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...

该怎么办?

答案1

您必须终止实际的 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...
$

相关内容