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   
Whiteboard:
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):
qemu-kvm-0.10.5-3.fc11.x86_64
libvirt-0.6.2-12.fc11.x86_64

How reproducible:
always

Steps to Reproduce:
1. define diskless VM, see add. info for an example libvirt XML
2. try to start it
3.
  
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'>
  <name>nodisk</name>
  <uuid>326cbaf0-d79f-81fd-96b4-2a4df1a22e30</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <interface type='bridge'>
      <mac address='52:54:00:47:90:61'/>
      <source bridge='virbr0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
  </devices>
</domain>

# 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 0.0.0.0:0 
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.