Skip to contentSkip to conversation

kvm-85 won't boot guests with virtio block device

PATCH Pauline Middelink 5 participants 7 messages Apr 24, 2009 – Apr 26, 2009 KVM

lore
Share & tools
lore
#0 lore raw

Hi,

To follow up on the issues with kvm-85 and libvirt I discovered the following
issue: libvirt detects from the help of qemu which options it can give to qemu. (in this case obviously /usr/kvm/bin/qemu-system-x86_64 -help)

If you look carefully to the output of the -help of qemu from kvm-84 and kvm-85, you will notice the boot flag to the -drive option has disappeared! Hence letting libvirt believe it isnt allowed to use it, hence the unable to boot error.

A small patch which fixes the problem for me, is attached.

Met vriendelijke groet,
Pauline Middelink

Signature · 2 lines
GPG Key fingerprint = 2D5B 87A7 DDA6 0378 5DEA  BD3B 9A50 B416 E2D0 C3C2
For more details look at my website http://www.polyware.nl/~middelink
qemu/qemu-options.hx 2009-04-24 19:04:50.000000000 +0200 renamed from qemu/qemu-options.hx 2009-04-21 11:57:31.000000000 +0200 +1 -0
diff -ur kvm-85/qemu/qemu-options.hx kvm-85a/qemu/qemu-options.hx
@@ -77,6 +77,7 @@
     "-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]\n"
     "       [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]\n"
     "       [,cache=writethrough|writeback|none][,format=f][,serial=s]\n"
+    "       [,boot=on|off]\n"
     "                use 'file' as a drive image\n")
 STEXI
 @item -drive @var{option}[,@var{option}[,@var{option}[,...]]]
#1 lore raw

Pauline,

Good catch.

Anthony, what is the reason for extboot not being upstream?

Quoted 11 lines · Pauline Middelink

Hi,

To follow up on the issues with kvm-85 and libvirt I discovered the following
issue: libvirt detects from the help of qemu which options it can give to qemu. (in this case obviously /usr/kvm/bin/qemu-system-x86_64 -help)

If you look carefully to the output of the -help of qemu from kvm-84 and kvm-85, you will notice the boot flag to the -drive option has disappeared! Hence letting libvirt believe it isnt allowed to use it, hence the unable to boot error.

Quoted 4 lines

A small patch which fixes the problem for me, is attached.

Met vriendelijke groet,
Pauline Middelink

Can you add a Signed-off-by: line so we can apply?

Quoted 15 lines
Signature · 4 lines
GPG Key fingerprint = 2D5B 87A7 DDA6 0378 5DEA  BD3B 9A50 B416 E2D0 C3C2
For more details look at my website http://www.polyware.nl/~middelink

diff -ur kvm-85/qemu/qemu-options.hx kvm-85a/qemu/qemu-options.hx
qemu/qemu-options.hx 2009-04-24 19:04:50.000000000 +0200 renamed from qemu/qemu-options.hx 2009-04-21 11:57:31.000000000 +0200 +1 -0
@@ -77,6 +77,7 @@
     "-drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]\n"
     "       [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]\n"
     "       [,cache=writethrough|writeback|none][,format=f][,serial=s]\n"
+    "       [,boot=on|off]\n"
     "                use 'file' as a drive image\n")
 STEXI
 @item -drive @var{option}[,@var{option}[,@var{option}[,...]]]
#2 lore raw
Quoted 6 lines · Marcelo Tosatti

Pauline,

Good catch.

Anthony, what is the reason for extboot not being upstream?

Paul Brook nacked it.

He didn't like that it was so x86 specific. I think a better approach that would be mergable is something based on the FW config interface with the driver code living as a patch to the Bochs BIOS.

Signature · 3 lines
Regards,

Anthony Liguori
#3 lore raw
Quoted 10 lines · Anthony Liguori
Quoted 6 lines · Marcelo Tosatti

Pauline,

Good catch.

Anthony, what is the reason for extboot not being upstream?

Paul Brook nacked it.
He didn't like that it was so x86 specific. I think a better approach that would be mergable is something based on the FW config interface with the driver code living as a patch to the Bochs BIOS.

By hooking the int13 code in the Bochs BIOS directly, we'd probably avoid 99% of the bugs we've encountered with extboot implementing int13 functionality too so I think it's a good idea.

Signature · 3 lines
Regards,

Anthony Liguori
#4 lore raw
In reply to Anthony Liguori
Quoted 10 lines · Anthony Liguori
Quoted 6 lines · Marcelo Tosatti

Pauline,

Good catch.

Anthony, what is the reason for extboot not being upstream?

Paul Brook nacked it.
He didn't like that it was so x86 specific.

Which part? The guest/host interface, or the option rom part?

Quoted 1 line

I think a better approach that would be mergable is something based on the FW config interface with the driver code living as a patch to the Bochs BIOS.

The firmware interface is for reading configuration information. It's an idempotent, zero-latency interface. Let's not mix it with disk sector read/writes which is a completely different thing.

Signature · 1 line
error compiling committee.c: too many arguments to function
#5 lore raw
In reply to Pauline Middelink

Hi Pauline,

Quoted 11 lines

To follow up on the issues with kvm-85 and libvirt I discovered the following issue: libvirt detects from the help of qemu which options it can give to qemu. (in this case obviously /usr/kvm/bin/qemu-system-x86_64 -help)

If you look carefully to the output of the -help of qemu from kvm-84 and kvm-85, you will notice the boot flag to the -drive option has disappeared! Hence letting libvirt believe it isnt allowed to use it, hence the unable to boot error.

A small patch which fixes the problem for me, is attached.

thank you very much for discovering this, your patch solved my problems starting kvm-85 with virtio-blk from libvirt.

Kind regards,

Gerd

#6 lore raw
In reply to Pauline Middelink
Quoted 6 lines · Pauline Middelink

Hi,

To follow up on the issues with kvm-85 and libvirt I discovered the following
issue: libvirt detects from the help of qemu which options it can give to qemu. (in this case obviously /usr/kvm/bin/qemu-system-x86_64 -help)

Quoted 8 lines

If you look carefully to the output of the -help of qemu from kvm-84 and kvm-85, you will notice the boot flag to the -drive option has disappeared! Hence letting libvirt believe it isnt allowed to use it, hence the unable to boot error.

A small patch which fixes the problem for me, is attached.

It's missing the sacred signoff, can you add it please?

Signature · 1 line
error compiling committee.c: too many arguments to function