VirtualBox上的IDE控制器


5

我有一个virtualbox的问题。我在CentOS服务器(没有GUI)上使用它来虚拟化将从具有远程桌面连接的客户端使用的机器。

我正在尝试使用此命令将ISO文件附加到vm:

vboxmanage modifyvm "intouch" --dvd /usr/share/virtualbox/VBoxGuestAdditions.iso

但它回应

VBoxManage: error: No drive attached to device slot 0 on port 1 of controller 'IDE Controller'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component SessionMachine, interface IMachine, callee nsISupports
Context: "MountMedium(Bstr("IDE Controller").raw(), 1, 0, dvdMedium, FALSE )" at line 962 of file VBoxManageModifyVM.cpp

所以我试着连接一个IDE控制器

VBoxManage storagectl "intouch" --add ide --name "IDE Controller"

但它说

VBoxManage: error: Storage controller named 'IDE Controller' already exists
VBoxManage: error: Details: code VBOX_E_OBJECT_IN_USE (0x80bb000c), component SessionMachine, interface IMachine, callee nsISupports
Context: "AddStorageController(Bstr(pszCtl).raw(), StorageBus_IDE, ctl.asOutParam())" at line 1008 of file VBoxManageStorageController.cpp

Answers:


7

您要搜索的命令是:

 VBoxManage storageattach TheNameOfYourVM --storagectl "IDE Controller"     --port 1 --device 0 --type dvddrive --medium /usr/share/virtualbox/VBoxGuestAdditions.iso

如果这不能立即起作用,请尝试下面这个适用于我的示例:

   $ VBoxManage storagectl JH --name "IDE Controller" --remove 
   $ VBoxManage storagectl JH --name "IDE Controller" --add ide
   $ VBoxManage storageattach JH --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium /usr/share/virtualbox/VBoxGuestAdditions.iso
   $ 

只是一个疑问:“JH”代表什么?
Max Markson

@MaxMarkson抱歉,我忘了,这是其中一个的名字 我的 VM,我测试上面命令的那个,因为我不确定我记得确切的语法。
MariusMatutiae

我想它,但无论如何我问...只是为了确定。
Max Markson

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.