Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 660659 - virsh attach-device for virtual box fails with "error: Unknown failure"
Summary: virsh attach-device for virtual box fails with "error: Unknown failure"
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: i686
OS: Linux
low
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-07 14:37 UTC by Florian Westphal
Modified: 2016-03-22 23:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-22 23:01:00 UTC


Attachments (Terms of Use)
Output produced by virsh with set debug flag (6.03 KB, application/octet-stream)
2010-12-07 14:37 UTC, Florian Westphal
no flags Details

Description Florian Westphal 2010-12-07 14:37:45 UTC
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".

Comment 1 Cole Robinson 2016-03-22 23:01:00 UTC
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


Note You need to log in before you can comment on or make changes to this bug.