Created attachment 465241 [details] Output produced by virsh with set debug flag Description of problem: I'm trying to attach an ISO-file to a virtual box virtual machine using virsh. The virtual machine is already created and registered at virtual box hypervisor. Adding the ISO using VirtualBox Client Program works fine, but when I try to add it using virsh, at which it does not matter whether the virtual machine is powered on or off, I get: error: Failed to attach device from disk_def.xml error: Unknown failure Version-Release number of selected component: I'm using virsh Compiled against library: libvir 0.8.6 Using library: libvir 0.8.6 Using API: VBOX 0.8.6 Running hypervisor: VBOX 3.2.12 git-commit: e37ff2004a891f31016ee747030b88050a83b479 Steps to Reproduce: 1. create device definition in disk_def.xml containing: <disk type='file' device='cdrom'> <source file='/path/to/ISO/file'/> <target dev='hdc' bus='ide'/> </disk> 2. virsh -c vbox:///session attach-device virtual_machine disk_def.xml Actual results: Virsh shows following error messages: error: Failed to attach device from disk_def.xml error: Unknown failure Expected results: The ISO file should be attached at specified virtual machine. Additional info: I tried to debug virsh, when executing this task and it seems,that the virtual box api function call GetMachine in src/vbox/vbox_tmpl.c in line 4933 returns wrong values, causing the following test to fail. Which seems to cause the "Unknown failure".
I'm sorry this bug never received a response, especially since you helpfully tried to debug things. The code for handling attachdevice in the vbox driver is very different nowadays so I suspect this is fixed. If you can still reproduce with modern libvirt, please reopen