我删除了包含 .vagrant 文件的目录。当我安装新的虚拟机时,它抱怨端口正在使用中。那么如何在没有 .vagrant 文件的情况下销毁虚拟机呢?
以下 VirtualBox 命令可能会有所帮助。如果关闭电源不起作用,请尝试取消注册虚拟机。
$ VBoxManage list runningvms
$ VBoxManage controlvm <uuid> poweroff
$ VBoxManage unregistervm <uuid>
Source: https://support.cloud.engineyard.com/entries/21449637-I-deleted-Vagrantfile-vagrant-and-or-the-app-directory-before-halting-the-VM-Now-ey-local-up-错误- https://support.cloud.engineyard.com/entries/21449637-I-deleted-Vagrantfile-vagrant-and-or-the-app-directory-before-halting-the-VM-Now-ey-local-up-errors-
用于停止所有正在运行的虚拟机的 Shell 脚本:
VBoxManage list runningvms | awk '{print $2;}' | xargs -I vmid VBoxManage controlvm vmid poweroff
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)