Bug 514899

Summary: qemu-kvm unable to boot using virtio disk - "Boot failed: could not read the boot disk"
Product: [Fedora] Fedora Reporter: Jan ONDREJ <ondrejj>
Component: qemuAssignee: Mark McLoughlin <markmc>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: atkac, berrange, dwmw2, gcosta, gczarcinski, graeme.r.gillies, itamar, jaswinder, kevin, markmc, richard.hogaboom, 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-08-04 10:52:25 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 498968    
Attachments:
Description Flags
log file none

Description Jan ONDREJ 2009-07-31 07:17:30 EDT
Description of problem:
When trying to boot from virtio disk, only an message:
  Boot failed: could not read the boot disk
  FATAL: No bootable device.
is displayed.

Version-Release number of selected component (if applicable):
qemu-kvm-0.10.91-0.1.rc1.rc0.fc11.i586
qemu-0.10.91-0.1.rc1.rc0.fc11.i586
(current F11 + virt-preview)

How reproducible:
always

Steps to Reproduce:
1. boot any machine with virtio drive as first HDD (or only one HDD)
  
Actual results:
Boot failed: could not read the boot disk
FATAL: No bootable device.

Expected results:
booting my system

Additional info:
After change to model='ide' boot works again.

My configuration:
<domain type='kvm' id='10'>
  <name>sagator</name>
  <uuid>b79bfd0f-97a9-62dd-08bc-998abae851b7</uuid>
  <memory>524288</memory>
  <currentMemory>524288</currentMemory>
  <vcpu>2</vcpu>
  <os> 
    <type arch='i686' machine='pc'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>  
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <source file='/mnt/d/img/sagator.img'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <interface type='bridge'>
      <mac address='54:52:00:3f:ac:ff'/>
      <source bridge='vlan242'/>
      <target dev='vnet1'/>  
      <model type='virtio'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>   
    <console type='pty'>
      <target port='0'/>
    </console>  
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5901' autoport='yes' keymap='en-us'/>
    <sound model='es1370'/>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
    </video>
  </devices>
  <seclabel type='dynamic' model='selinux'/>
</domain>
Comment 1 Mark McLoughlin 2009-07-31 07:25:31 EDT
Could you attach /var/log/qemu/sagator.log ?
Comment 2 Jan ONDREJ 2009-07-31 07:37:04 EDT
Created attachment 355794 [details]
log file

Here is my log file, but I don't look anything important here.
Should I set some debugging?
Comment 3 Mark McLoughlin 2009-07-31 11:42:14 EDT
Glauber suggests this is the cause:

  http://www.mail-archive.com/kvm@vger.kernel.org/msg20141.html

Jan: did the previous version of qemu from virt-preview work for you? (i.e. if it *is* that issue, it apparently was broken in the previous version too)
Comment 4 Mark McLoughlin 2009-07-31 12:13:44 EDT
I can reproduce here on F-12 with the extboot.bin from brew, but not extboot.bin built from git qemu-fedora.git/master tree

Whatever the problem is, extboot_read() is never getting called
Comment 5 Mark McLoughlin 2009-07-31 12:20:12 EDT
there's a one byte difference between the two extboot.bin binaries

this works:
000005f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 b4  |................|
this broken:
000005f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 01  |................|
Comment 6 Mark McLoughlin 2009-07-31 12:31:21 EDT
Looks like it might be a problem with the new signrom.sh script
Comment 7 Jan ONDREJ 2009-07-31 13:00:03 EDT
(In reply to comment #3)
> Glauber suggests this is the cause:
> 
>   http://www.mail-archive.com/kvm@vger.kernel.org/msg20141.html
> 
> Jan: did the previous version of qemu from virt-preview work for you? (i.e. if
> it *is* that issue, it apparently was broken in the previous version too)  

I am not sure. May be, this previous version was not too long in repository. :(
Comment 8 Glauber Costa 2009-07-31 14:22:29 EDT
The problem is that due to a bug in the shell script, we're writing the wrong checksum to the file. I've just sent a fix upstream:

http://www.mail-archive.com/kvm@vger.kernel.org/msg20145.html
Comment 9 Kevin Fenzi 2009-08-02 00:05:07 EDT
I just got bitten by this tonight... 

using a f11 extboot.bin for now seems to at least get the guests booting, but causes libvirtd to segfault, so I guess thats not a very good workaround. ;(
Comment 10 Mark McLoughlin 2009-08-04 10:52:25 EDT
Okay, this fix building for rawhide and virt-preview should fix the "Boot failed: could not read the boot disk":

* Tue Aug  4 2009 Mark McLoughlin <markmc@redhat.com> - 2:0.10.91-0.3.rc1.rc0
- Fix extboot checksum (bug #514899)

If not, please re-open. Any other issues, please do file as new bugs. Thank!