Bug 509028

Summary: diskless guest fails to start
Product: [Fedora] Fedora Reporter: Alan Pevec <apevec>
Component: qemuAssignee: Glauber Costa <gcosta>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: apevec, dwmw2, gcosta, imain, itamar, jaswinder, markmc, 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-07-03 08:11:47 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Alan Pevec 2009-06-30 18:22:39 EDT
Description of problem:
diskless guest fails to start

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

How reproducible:

Steps to Reproduce:
1. define diskless VM, see add. info for an example libvirt XML
2. try to start it
Actual results:
virsh start fails

Expected results:
guest can be started even w/o disk defined

NB: it works fine with qemu-kvm-0.10.50-7.kvm87.fc11.x86_64 from http://markmc.fedorapeople.org/virt-preview/f11/

Additional info:

# virsh dumpxml nodisk
<domain type='kvm'>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='hd'/>
  <clock offset='utc'/>
    <interface type='bridge'>
      <mac address='52:54:00:47:90:61'/>
      <source bridge='virbr0'/>
    <serial type='pty'>
      <target port='0'/>
    <console type='pty'>
      <target port='0'/>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' listen=''/>

# head /var/log/libvirt/qemu/nodisk.log
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/bin/qemu-kvm -S -M pc -m 512 -smp 1 -name nodisk -uuid 326cbaf0-d79f-81fd-96b4-2a4df1a22e30 -monitor pty -pidfile /var/run/libvirt/qemu//nodisk.pid -boot c -net nic,macaddr=52:54:00:47:90:61,vlan=0 -net tap,fd=16,vlan=0 -serial pty -parallel none -usb -vnc 
QEMU PC emulator version 0.10.5 (qemu-kvm-0.10.5), Copyright (c) 2003-2008 Fabrice Bellard
usage: qemu [options] [disk_image]

'disk_image' is a raw hard image image for IDE hard disk 0

Standard options:
-h or -help     display this help and exit
-M machine      select emulated machine (-M ? for list)
-cpu cpu        select CPU (-cpu ? for list)
Comment 1 Alan Pevec 2009-07-03 08:11:47 EDT
I see now:
    <boot dev='hd'/>

which is of course wrong for a diskless guest, should be and works with:
    <boot dev='network'/>

F12 qemu does handle this mis-configuration but it's not important enough to bother backporting.