今天使用vagrant up启动一个虚拟机时,一直卡住,Ctrl + C后再次运行,却报下面的错误
1 2 3 4 5 6 7 8 |
There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["modifyvm", "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "--natpf1", "delete", "ssh"] Stderr: VBoxManage: error: The machine 'miu_centos_65_64_default_1463116943' is already locked for a session (or being unlocked) VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 462 of file VBoxManageModifyVM.cpp |
怎么办呢? 经过搜索后发现一个解决方案,运行下面的命令后即可解决。运行时请注意将uuid替换成自己出错时显示的uuid。
1 |
vboxmanage startvm xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --type emergencystop |