Bug 435966 - xen and qemu expect different xml for empty cdrom device
xen and qemu expect different xml for empty cdrom device
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Daniel Veillard
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-03-04 13:01 EST by Cole Robinson
Modified: 2008-03-13 17:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-13 17:37:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Cole Robinson 2008-03-04 13:01:45 EST
Trying to virsh define a qemu guest with no <source> tag for a cdrom device
fails. It wants to receive <source file=''/>. Xen is actually fine with both
these options, but in the virtinst and virt-manager we are only using the no
source tag method.

libvir: Xen Daemon error : XML description for failed to parse domain
description is not well formed or invalid
error: Failed to define domain from cdtest-qemu-fail
Comment 1 Cole Robinson 2008-03-04 13:02:01 EST
This is breaking cdrom connect disconnect for virt-manager and qemu guests. The
strange thing though is that in userland we changed from <source file=''> to no
source tag after it was blocking xen installs (bug 260891). Maybe there's been a
libvirt change since then, attachdevice and define have different xml parsing
code paths. I haven't tested it enough.
Comment 2 Cole Robinson 2008-03-04 13:05:01 EST
Just to clarify:

using virsh define:

qemu w/ no source tag : FAIL
qemu w/ source file='': SUCCEED
xen  w/ no source tag : SUCCEED
xen  w/ source file='': SUCCEED
Comment 3 Daniel Berrange 2008-03-04 15:19:44 EST
I don't believe that

xen  w/ source file='': SUCCEED

will neccessarily succeed on all versions of Xen, which IIRC, is the reason we
switched to the alternate syntax with no source tag.  The fact that QEMU works
with file="" is an accident. We should make QEMU driver in libvirt explicitly
support no  source tag.
Comment 4 Cole Robinson 2008-03-13 10:06:26 EDT
This fix for this is now upstream:

Comment 5 Daniel Berrange 2008-03-13 17:37:49 EDT
Fixed in rawhide in libvirt-0.4.1-4.fc9

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