With a xen fv guest, attempting to connect a file iso to an empty cdrom succeeds, but prevents the guest from booting. Steps to reproduce: 1) Add a cdrom to an inactive fv guest, disconnect the media. 2) Connect a file to the cdrom, notice the disk type stays as 'block' 3) Attempt to boot the guest, see error: Error starting domain: virDomainCreate() failed POST operation failed: (xend.err 'Device 832 (vbd) could not be connected.\nDevice /root/f8.iso is mounted read-write in the privileged domain,\nand so cannot be mounted read-only by a guest.') This happens because libvirt in 5.2 inserts a <driver> tag when a disk is defined. Empty disks default to block type, <driver name='phy'>. When we add the new occupied device we weren't changing this driver field, so it was reverting back to block type and attempting to treat the flat file like a block device, causing failure.
Created attachment 297822 [details] Accommodate driver tag when connecting cdrom media
This fix is needed to solve bug 223444, and to enable any multi cd installs. The fix is not intrusive, only affects the connect / disconnect portion of the code, which without this fix is broken anyways. I'm requesting this be raised as an exception for inclusion in RHEL5.2.
Requesting exception. This is not a regression, but it fixes functionality that was partially fixed by bz 223444.
Fix built in virt-manager-0.5.3-5.el5: [crobinso@dhcp83-95 RHEL-5]$ brew latest-pkg dist-5E-qu-candidate virt-manager Build Tag Built by ---------------------------------------- -------------------- ---------------- virt-manager-0.5.3-5.el5 dist-5E-qu-candidate crobinso
Cole, Trying these steps is giving me the following error when trying to connect a file to the cdrom: Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/details.py", line 760, in connect_cdrom self.vm.connect_cdrom_device(type, source, target) File "/usr/share/virt-manager/virtManager/domain.py", line 576, in connect_cdrom_device driver_fragment.setProp("name", type) AttributeError: 'list' object has no attribute 'setProp' # rpm -q virt-manager virt-manager-0.5.3-7.el5
Created attachment 303204 [details] Additional fix to allow inserting a file backed cdrom Hmm, don't know how I botched the testing on this one. This patch on top of the previous one fixes the issue. This should be pulled in for 5.2, the functionality didn't work to begin with, so this new patch poses no harm of regression. Other bugs stated above depend on this to work as well, so we really need it fixed.
Built into virt-manager-0.5.3-8 $ brew latest-pkg dist-5E-qu-candidate virt-manager Build Tag Built by ---------------------------------------- -------------------- ---------------- virt-manager-0.5.3-8.el5 dist-5E-qu-candidate crobinso
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-0480.html