为什么VirtualBox找不到名为Windows_7的注册机器?

时间:2009-02-19 14:58:40

标签: virtualbox

我正在尝试使用VBoxManage setextradata更改虚拟机的TCP / UDP。

每当我输入命令时:

sudo VBoxManage setextradata Windows_7 "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestEmule_TCP/Protocol" TCP

我收到以下错误:

VirtualBox Command Line Management Interface Version 2.1.4
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

[!] FAILED calling a->virtualBox->FindMachine(Bstr(a->argv[0]), machine.asOutParam()) at line 3688!
[!] Primary RC  = VBOX_E_OBJECT_NOT_FOUND (0x80BB0001) - Object corresponding to the supplied arguments does not exist
[!] Full error info present: true , basic error info present: true 
[!] Result Code = VBOX_E_OBJECT_NOT_FOUND (0x80BB0001) - Object corresponding to the supplied arguments does not exist
[!] Text        = Could not find a registered machine named 'Windows_7'
[!] Component   = VirtualBox, Interface: IVirtualBox, {339abca2-f47a-4302-87f5-7bc324e6bbde}
[!] Callee      = IVirtualBox, {339abca2-f47a-4302-87f5-7bc324e6bbde}

已使用GUI创建虚拟机。有什么想法吗?

$ cd /Users/marco/Library/VirtualBox/Machines/Windows_7
$ ls
Logs                Windows_7.xml
Windows 7.xml.1.5-macosx.bak
$ sudo vboxmanage registervm Windows_7.xml
VirtualBox Command Line Management Interface Version 2.1.4
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

[!] FAILED calling a->virtualBox->OpenMachine(Bstr(a->argv[0]), machine.asOutParam()) at line 762!
[!] Primary RC  = NS_ERROR_FAILURE (0x80004005) - Operation failed
[!] Full error info present: true , basic error info present: true 
[!] Result Code = NS_ERROR_FAILURE (0x80004005) - Operation failed
[!] Text        = Could not lock the settings file '/var/root/Library/VirtualBox/Windows_7.xml' (VERR_FILE_NOT_FOUND)
[!] Component   = Machine, Interface: IMachine, {ea6fb7ea-1993-4642-b113-f29eb39e0df0}
[!] Callee      = IVirtualBox, {339abca2-f47a-4302-87f5-7bc324e6bbde}

5 个答案:

答案 0 :(得分:52)

因为你正在使用sudo而失败。 VirtualBox设计为由任何用户(在vboxusers组中)运行,sudo以VirtualBox配置为空的root用户身份运行命令。

您可以输入以下内容进行检查:

sudo VBoxManage -nologo list vms # Should print only a newline
VBoxManage -nologo list vms # Detailled information about all your VMs

答案 1 :(得分:2)

不是一个直接的答案,而只是为了其他人搜索它而把它放在那里:

Mac OS X 上,您可以告诉VirtualBox从其他用户的主目录加载VM,前提是文件权限允许,或者如果您使用{{1}以root用户身份运行VirtualBox (例如,如果您必须在端口80上访问主机的Web服务器)。

这样做的方法是适当地设置sudo,例如

VBOX_USER_HOME

如果您想在root下运行VBOX_USER_HOME=/Users/the_other_user/Library/VirtualBox ,请使用:

VBoxHeadless

答案 2 :(得分:0)

每当我使用sudo启动VBoxSDL时,我都会收到类似的错误消息:

Error: machine with the given name not found!
Check if this VM has been corrupted and is now inaccessible.

ypocat的答案类似,我使用像这样的小脚本解决了 Ubuntu 的问题:

#!/bin/bash
export VBOX_USER_HOME=/home/username/.config/VirtualBox
VBoxSDL --startvm nameOfVM

只要您需要VM作为root开始,就可以使用它。

答案 3 :(得分:0)

<强> SOLUTION_1

缺少虚拟技术可能就是原因。对于Intel系统,他们使用Intel VT-x(对于AMD,他们有AMD-V),因此请确保它已启用。您可以在启动屏幕中启用它,转到系统配置标签中的 BIOS设置,然后启用虚拟技术

snapshot

SOLUTION_2

Windows 打开终端或cmd(以管理员身份运行),然后运行SC START VBOXDRV。如果它说该服务已在运行,请尝试SC STOP VBOXDRV然后SC START VBOXDRV

答案 4 :(得分:0)

!仅限Windows!

如果您不是管理员帐户,并尝试在管理员cmd窗口中修改VM,请输入以下命令:

cd“ C:\ Program Files \ Oracle \ VirtualBox”

VboxManage registervm“ C:\ Users \此处您的名称\ VirtualBox VM \此处您的VM名称\此处您的VM名称。

现在运行您的虚拟框修改命令或您正在执行的其他任何操作,它应该可以工作!