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 21:37:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Cole Robinson 2008-03-04 18:01:45 UTC
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 18:02:01 UTC
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 18:05:01 UTC
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 Berrangé 2008-03-04 20:19:44 UTC
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 14:06:26 UTC
This fix for this is now upstream:

http://git.et.redhat.com/?p=libvirt.git;a=commit;h=570fd656d1b67e5d02f52e107946930257e811a7

Comment 5 Daniel Berrangé 2008-03-13 21:37:49 UTC
Fixed in rawhide in libvirt-0.4.1-4.fc9