Rob*_*ert 6 virtualbox test-kitchen
我跑了一个测试厨房实例,一切都很好,但最后我确实试图用以下方法销毁厨房:
roberto@pc:~$ kitchen destroy
Run Code Online (Sandbox Code Playgroud)
Virtualbox给了我这个错误.
-----> Starting Kitchen (v1.1.1)
-----> Destroying <default-ubuntu-1204>...
[default] Destroying VM and associated drives...
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #destroy action: [Expected process to exit with [0], but received '1'
---- Begin output of vagrant destroy -f ----
STDOUT: [default] Destroying VM and associated drives...
STDERR: There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["unregistervm", "2507bc77-3734-429b-a573-d92fadb80e95", "--delete"]
Stderr: VBoxManage: error: Cannot unregister the machine 'default-ubuntu-1204_default_1391521776' while it is locked
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "Unregister(CleanupMode_DetachAllReturnHardDisksOnly, ComSafeArrayAsOutParam(aMedia))" at line 158 of file VBoxManageMisc.cpp
---- End output of vagrant destroy -f ----
Ran vagrant destroy -f returned 1]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
Run Code Online (Sandbox Code Playgroud)
我运行Virtualbox,我无法删除该实例,因为它也被锁定,关闭选项被禁用.
其他人有这个问题吗?
VBoxManage:错误:无法在锁定时取消注册机器“X”。
它被锁定,因为它正在使用中,所以基本上你需要关闭它,例如
VBoxManage controlvm VMNAME poweroff
Run Code Online (Sandbox Code Playgroud)
更改VMNAME为您的机器名称,例如default-ubuntu-1204_default_1391521776.
然后您可以通过以下方式取消注册:
VBoxManage unregistervm VMNAME --delete
Run Code Online (Sandbox Code Playgroud)
指定--delete将删除您的 VM。如果您不想删除它,您可以从~/"VirtualBox VMs/VMNAME.
有两件事可能导致此问题。请确保:
如果该计算机出现在 VBox GUI 的虚拟机列表中,请重试该命令。如果 VirtualBox GUI 中未列出它们,请删除该.kitchen目录并重试。
| 归档时间: |
|
| 查看次数: |
4193 次 |
| 最近记录: |