Red Hat Bugzilla – Bug 846703
Cannot add disk to vbox guest
Last modified: 2016-03-23 20:44:29 EDT
Description of problem:
Attaching a disk to an existing domain (either running or not) returns a very generic error (An error occurred, but the cause is unknown). I suspect that it is related to virDomainAttachDevice.
Version-Release number of selected component (if applicable):
Compiled against library: libvir 0.9.10
Using library: libvir 0.9.10
Using API: VBOX 0.9.10
Running hypervisor: VBOX 4.1.18
Steps to Reproduce:
1. Connect to VBox host with virsh (vbox:///session)
2. Attempt to connect a disk (attach-disk vbox-test01 /root/winxp.iso hdb --driver file --type cdrom --mode readonly)
error: Failed to attach disk
error: An error occurred, but the cause is unknown
Attached disk to domain
I receive the same error when attempting to attach an Interface. SELinux is disabled and all commands are being run as root. I suspect the root cause is that virDomainAttachDevice is not implemented for this driver, since performing similar actions on my ESX machine fails but returns a useful error (error: this function is not supported by the connection driver: virDomainAttachDevice). However I have no proof of this.
I am able to attach the disk fine if I modify the XML directly:
virsh -c vbox:///session 'destroy vbox-test01'
virsh -c vbox:///session 'undefine vbox-test01'
<disk type='file' device='cdrom'>
<target dev='hdb' bus='ide'/>
virsh -c vbox:///session 'define vbox-test01.xml'
virsh -c vbox:///session 'start vbox-test01'
This also affects library/API 0.9.13
Sorry this bug never received a response. Given the age, and that the vbox driver was heavily reworked since then, I'm closing as DEFERRED since I assume this is fixed or no longer valid. But if anyone can still reproduce with recent libvirt and virtualbox, please reopen