Description of problem: virsh attach-disk failed by the following message when I executed it on RHEL-5.1(xen-3.0.3-41.el5). 'device_configure() takes exactly 2 arguments (3 given)' Of course, the command succeed at fedora8(xen-3.1.0-10.fc8). I guess the cause is that the devid was removed by the following patch at xend. [0] changeset 11139 Implement xm block-configure for CD-ROMs. http://xenbits.xensource.com/xen-unstable.hg?rev/ff124973a28a - def device_configure(self, dev_config, devid): + def device_configure(self, dev_config): """Configure an existing device. So, we need some patch to fix this problem. [1] part of changeset 12071 to add the devid [XEND] Massive XendDomain XendDomainInfo reorganisation to use XendConfig. http://xenbits.xensource.com/xen-unstable.hg?rev/9a932b5c7947 [2] changeset 12407, to be able to omit the devid Fix xm block-configure, by allowing the device ID to be unspecified inside http://xenbits.xensource.com/xen-unstable.hg?rev/f026d4091322 [3] changeset 13333 [XEND] Fix broken block-configure. http://xenbits.xensource.com/xen-unstable.hg?rev/bf605c314a91 Version-Release number of selected component (if applicable): from RPM (RHEL5.1 RC): kernel-xen (kernel-xen-2.6.18-52.el5) xen (xen-3.0.3-41.el5) from cvs: libvirt: upstream(revision 1.799) How reproducible: Always Steps to Reproduce: 1. Start the guest domain # virsh start guest_dom 2. Change the device # virsh attach-disk HVM_RH51_5 /mnt/rhel51rc/x86/RHEL5.1-Server-20071003.0- i386-DVD.iso hdc --type cdrom --mode readonly --driver file 3. Get the following message libvir: Xen Daemon error : POST operation failed: (xend.err 'device_configure () takes exactly 2 arguments (3 given)') Actual results: We cannot change the device by virsh attach-disk. Expected results: We can change the device by virsh attach-disk. Additional info: None
Hum, annoying, this sure should be fixed for 5.2, it's unclear yet if it's better to fix in xen or in libvirt, but something needs to be done ! thanks for raising the issue ! Daniel
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
Libvirt part of that bug is handled as #346281 Daniel
Hi, Do you know whether there has been any progress for this BZ in xen ? If it's better to fix in xen for this, I want to change the 'Component' to Xen. Regards, Saori
This bug should have been against 'xen', since bug 346281 tracks the libvirt side of it.
Created attachment 292968 [details] Fix device configure method args The 4 quoted changesets upstream are completely unneccessary. 99% of the quoted code in them is XenAPI refactoring, and then fixing stuff which was broken by the refactoring. The only change needed is to add 'devid=None' to the device_configure() method. With this applied I can successfully change CDROM media multiple times in a guest using virsh.
The fix for this is built into xen-3.0.3-52.el5 * Tue Jan 29 2008 Daniel P. Berrange <berrange> - 3.0.3-52.el5 - Fix CDROM media changes (rhbz #372301)
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2008-0305.html