This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 435966

Summary: xen and qemu expect different xml for empty cdrom device
Product: [Fedora] Fedora Reporter: Cole Robinson <crobinso>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: berrange
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-13 17:37:49 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

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:

http://git.et.redhat.com/?p=libvirt.git;a=commit;h=570fd656d1b67e5d02f52e107946930257e811a7
Comment 5 Daniel Berrange 2008-03-13 17:37:49 EDT
Fixed in rawhide in libvirt-0.4.1-4.fc9