Bug 441875

Summary: Unable to start non-bootloader guest using XML from virsh dumpxml
Product: [Fedora] Fedora Reporter: Kaitlin Rupert <kaitlin>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: berrange, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-22 08:08:14 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Kaitlin Rupert 2008-04-10 12:57:28 EDT
Description of problem:
It's possible to define a run a non-bootloader guest.  However, if you dump the
XML of this guest and then try to define and then start a guest using the XML
later on, the start fails.

Version-Release number of selected component (if applicable):

How reproducible:
Always - also seen this issue using libvirt 0.4.0 on a SLES 10 system.

Steps to Reproduce:
1. Define guest using <kernel> and <initrd> tags instead of a bootloader (see
XML below).
2. Start guest to verify guest properly works.
3. virsh dumpxml and save the output.
4. Shutdown and undefine guest.
5. Define guest using the XML captured from virsh dumpxml.
6. Start guest - this will fail.
7. virsh dumpxml - notice that the <kernel> and <initrd> tags have been stripped
Actual results:
Start fails with the following error:

libvir: Xen Daemon error : POST operation failed: (xend.err "(2, 'Invalid
kernel', 'xc_dom_find_loader: no loader found\\n')")
error: Failed to start domain no_bootloader

Expected results:
The guest should start properly.

Additional info:
1) The steps to reproduce are contrived, but can cause problems like the following:

xml = virDomainGetXMLDesc() on SystemA
virDomainDefineXML(conn, xml) on SystemB.

The define is successful, but the user is unable to start the guest on SystemB.

2) After Step 3 above, remove the <bootloader /> tag from the XML generated by
dumpxml.  You should be able to start the guest with no problems.

3) XML used for guest:

<domain type='xen' id='1683'>
    <cmdline>TERM=xterm </cmdline>
    <interface type='network'>
       <source network='default'/>
       <mac address="11:22:33:44:55:66"/>
    <disk type='file' device='disk'>
      <driver name='file'/>
      <source file='/data/users/kaitlin/default-xen-dimage'/>
      <target dev='xvda'/>
    <console tty='/dev/pts/4'/>
Comment 1 Bug Zapper 2008-05-14 05:15:29 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
Comment 2 Daniel Berrange 2009-01-22 08:08:14 EST
THis problem should be fixed in latest version of libvirt 0.5.1