gpt4 book ai didi

当我尝试销毁厨房实例时,Virtualbox 被锁定

转载 作者:行者123 更新时间:2023-12-04 15:22:54 33 4
gpt4 key购买 nike

我运行了一个 test-kitchen 实例,一切都很好,但是最后当我尝试使用以下命令摧毁它时:

roberto@pc:~$ kitchen destroy

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

我运行了 Virtualbox 并且无法删除该实例,因为它也被锁定并且关闭选项被禁用。

还有其他人有这个问题吗?

最佳答案

VBoxManage: error: Cannot unregister the machine 'X' while it is locked.



它被锁定,因为它正在使用中,所以基本上你需要关闭它,例如
VBoxManage controlvm VMNAME poweroff

更改 VMNAME到您的机器名称,例如 default-ubuntu-1204_default_1391521776 .

然后您可以通过以下方式取消注册:
VBoxManage unregistervm VMNAME --delete

指定 --delete将删除您的 VM。如果不想删除,可以从 ~/"VirtualBox VMs/VMNAME备份。 .

关于当我尝试销毁厨房实例时,Virtualbox 被锁定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21606567/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com