我试图使用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}
有帮助吗?

解决方案

这是因为你使用sudo将失败。 VirtualBox的被设计成由任何用户运行(在vboxusers组),和须藤运行命令作为根用户其VirtualBox的配置是空的。

可以通过键入检查:

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

其他提示

不直接回答,只是把它在那里为别人寻找它:

的Mac OS X 上,你可以告诉VirtualBox的从另一个用户的主目录加载虚拟机,提供的文件权限允许的话,或者如果你正在使用sudo运行VirtualBox的root用户(例如,如果你绝对要访问80端口主机的网络服务器)。

要做到这一点的方法是,适当地设定VBOX_USER_HOME,e.g。

VBOX_USER_HOME=/Users/the_other_user/Library/VirtualBox

如果你想在root身份运行VBoxHeadless,使用方法:

sudo VBOX_USER_HOME=/Users/your_user_id/Library/VirtualBox nohup \
   VBoxHeadless -s "IE10 - Win7" </dev/null &>/dev/null &

我有一个类似的错误消息,每当我使用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你可以使用它。

<强> SOLUTION_1

缺少虚拟技术可能是原因。对于英特尔系统他们有英特尔VT-X(对于AMD他们有AMD-V),所以确保它已启用。您可以启用它在开机画面转至 BIOS设置在寻找的系统配置标签,并启用的虚拟技术

“快照”

<强> SOLUTION_2

打开终端或CMD(运行作为管理员),用于和运行SC START VBOXDRV。如果说该服务已经运行,那么尝试SC STOP VBOXDRV然后SC START VBOXDRV

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top