Re: kvm-85: virtio-blk not working

2009-04-24 Thread Anthony Liguori

Brian Jackson wrote:

On Friday 24 April 2009 09:35:52 Gerd v. Egidy wrote:
  

Hi Bernhard,

On Friday 24 April 2009 14:56:15 Bernhard Held wrote:


does not boot, BIOS complains "Boot failed: could not read the boot
disk":

-drive file=/dev/VolGroup00/testpart,if=virtio,index=0 \


Please try with:
-drive file=/dev/VolGroup00/testpart,if=virtio,index=0,boot=on \
  

That's it! With boot=on it works.

Thanks for pointing this out.

Was this change intentional? I didn't see it mentioned in the changelog and
could not even find the "boot"-parameter in the qemu-kvm manpage.




The boot=on parameter has been required since virtio_blk existed (or very 
close to it). There is no official qemu/kvm manpage. That's something some 
distros pulled out of thin air. So bugs with it should be reported to your 
distro.
  


Sure there is.  It's generated from qemu-doc.texi.

Regards,

Anthony Liguori

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-85: virtio-blk not working

2009-04-24 Thread Brian Jackson
On Friday 24 April 2009 09:35:52 Gerd v. Egidy wrote:
> Hi Bernhard,
>
> On Friday 24 April 2009 14:56:15 Bernhard Held wrote:
> > > does not boot, BIOS complains "Boot failed: could not read the boot
> > > disk":
> > >
> > > -drive file=/dev/VolGroup00/testpart,if=virtio,index=0 \
> >
> > Please try with:
> > -drive file=/dev/VolGroup00/testpart,if=virtio,index=0,boot=on \
>
> That's it! With boot=on it works.
>
> Thanks for pointing this out.
>
> Was this change intentional? I didn't see it mentioned in the changelog and
> could not even find the "boot"-parameter in the qemu-kvm manpage.


The boot=on parameter has been required since virtio_blk existed (or very 
close to it). There is no official qemu/kvm manpage. That's something some 
distros pulled out of thin air. So bugs with it should be reported to your 
distro.


>
> I usually start kvm via libvirt and libvirt doesn't know anything about
> boot=on, at least not in 0.6.2. I did not have time to try 0.6.3 as it was
> released just yet.


I don't really use libvirt and friends, but I'd imagine that I'd have dealt 
with a lot more issues in the irc channel if it didn't support booting from 
virtio devices in some way. Maybe someone else will speakup and tell you how 
to do it within the confines of libvirt.

--Brian Jackson


>
> Is there some way in a running qemu to find out if a virtio blockdevice is
> activated this way? When running "info block" I always get this result if
> the device has boot=on or not:
>
> virtio0: type=hd removable=0 file=/dev/VolGroup00/testpart ro=0
> drv=host_device encrypted=0
>
> Kind regards,
>
> Gerd
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-85: virtio-blk not working

2009-04-24 Thread Gerd v. Egidy
Hi Bernhard,

On Friday 24 April 2009 14:56:15 Bernhard Held wrote:
> > does not boot, BIOS complains "Boot failed: could not read the boot
> > disk":
> >
> > -drive file=/dev/VolGroup00/testpart,if=virtio,index=0 \
>
> Please try with:
> -drive file=/dev/VolGroup00/testpart,if=virtio,index=0,boot=on \

That's it! With boot=on it works.

Thanks for pointing this out.

Was this change intentional? I didn't see it mentioned in the changelog and 
could not even find the "boot"-parameter in the qemu-kvm manpage.

I usually start kvm via libvirt and libvirt doesn't know anything about 
boot=on, at least not in 0.6.2. I did not have time to try 0.6.3 as it was 
released just yet.

Is there some way in a running qemu to find out if a virtio blockdevice is 
activated this way? When running "info block" I always get this result if the 
device has boot=on or not:

virtio0: type=hd removable=0 file=/dev/VolGroup00/testpart ro=0 
drv=host_device encrypted=0

Kind regards,

Gerd

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-85: virtio-blk not working

2009-04-24 Thread Bernhard Held

does not boot, BIOS complains "Boot failed: could not read the boot disk":

-drive file=/dev/VolGroup00/testpart,if=virtio,index=0 \

O.k., this doesn't work on my box too.

Please try with:
-drive file=/dev/VolGroup00/testpart,if=virtio,index=0,boot=on \

Anthony wrote "index doesn't have meaning with virtio-blk". You should omit it, 
but it doesn't harm on my box.


Bernhard
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-85: virtio-blk not working

2009-04-24 Thread Gerd v. Egidy
Hi Andreas,

On Thursday 23 April 2009 19:34:31 Andreas Plesner Jacobsen wrote:
> On Thu, Apr 23, 2009 at 06:57:45PM +0200, Gerd v. Egidy wrote:
> > sorry, I'm not getting that far to make this a problem. I just added the
> > second disk (the virtio one) to  test if virtio is working when the guest
> > is running.
> >
> > I first tried it with just one virtio disk and no ide ones: it didin't
> > boot ("Boot failed: could not read the boot disk").
>
> KVM command line, please.

works as expected:

/usr/bin/qemu-kvm -S -M pc -m 1024 -smp 1 -name test \ 
-uuid 283d1332-c234-9f28-24cf-8bbcc17b44c1 -monitor pty \
-pidfile/var/run/libvirt/qemu//test.pid -boot c \
-drive file=/dev/VolGroup00/testpart,if=ide,index=0 \
-net nic,macaddr=54:52:00:7c:a5:89,vlan=0,model=virtio
-net tap,fd=16,script=,vlan=0,ifname=vnet0 \
-serial pty -parallel none -usb -vnc 127.0.0.1:0

does not boot, BIOS complains "Boot failed: could not read the boot disk":

/usr/bin/qemu-kvm -S -M pc -m 1024 -smp 1 -name test \
-uuid 283d1332-c234-9f28-24cf-8bbcc17b44c1 -monitor pty \
-pidfile /var/run/libvirt/qemu//test.pid -boot c \
-drive file=/dev/VolGroup00/testpart,if=virtio,index=0 \
-net nic,macaddr=54:52:00:7c:a5:89,vlan=0,model=virtio \
-net tap,fd=16,script=,vlan=0,ifname=vnet0 \
-serial pty -parallel none -usb -vnc 127.0.0.1:0

Kind regards,

Gerd

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-85: virtio-blk not working

2009-04-23 Thread Anthony Liguori

Daniel P. Berrange wrote:

On Thu, Apr 23, 2009 at 11:13:50AM -0500, Anthony Liguori wrote:
  

Brian Jackson wrote:

Your problem is that index's are per interface type, so both of your 
drives should be index=0 since they are different interface types.
 
  
More specifically, with virtio-blk, you cannot have discontinuous 
indexes.   In other words, having index=0, index=1, index=2 is valid, 
but having index=1, index=2, index=4 is not.



Is that restriction going to work with migration ?

eg, you have a VM with 3 disks.  vda, vdb, vdc (index=0, index=1 and index=2).
You then hot-unplug the 2nd disk, vdb (index=1).  Now migrate the guest to 
another machine. I believe you now need to be able to start qemu on the target
host with -incoming and index=0 and index=2, but no index=1 because that 
disk was unplugged. So the indexes would be discontinuous now
  


index doesn't have meaning with virtio-blk.

Each disk is dedicated to a PCI slot.  To support migration with 
hotplug, you need to specify the PCI bus address when creating the 
virtio-blk device.


Regards,

Anthony Liguori
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-85: virtio-blk not working

2009-04-23 Thread Andreas Plesner Jacobsen
On Thu, Apr 23, 2009 at 06:57:45PM +0200, Gerd v. Egidy wrote:
> 
> sorry, I'm not getting that far to make this a problem. I just added the 
> second disk (the virtio one) to  test if virtio is working when the guest is 
> running. 
> 
> I first tried it with just one virtio disk and no ide ones: it didin't boot 
> ("Boot failed: could not read the boot disk").

KVM command line, please.

-- 
Andreas
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-85: virtio-blk not working

2009-04-23 Thread Gerd v. Egidy
Hi Andreas,

> > I am (or better libvirt is) starting the guest like this:
> >
> > -drive file=/dev/VolGroup00/testboot,if=ide,index=0 \
> > -drive file=/dev/VolGroup00/testvirt,if=virtio,index=1 \
>
> Both should have index=0 (or no index at all), since the index is
> internal to the driver.

sorry, I'm not getting that far to make this a problem. I just added the 
second disk (the virtio one) to  test if virtio is working when the guest is 
running. 

I first tried it with just one virtio disk and no ide ones: it didin't boot 
("Boot failed: could not read the boot disk").

Kind regards,

Gerd

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-85: virtio-blk not working

2009-04-23 Thread Daniel P. Berrange
On Thu, Apr 23, 2009 at 11:13:50AM -0500, Anthony Liguori wrote:
> Brian Jackson wrote:
> >Your problem is that index's are per interface type, so both of your 
> >drives should be index=0 since they are different interface types.
> >  
> 
> More specifically, with virtio-blk, you cannot have discontinuous 
> indexes.   In other words, having index=0, index=1, index=2 is valid, 
> but having index=1, index=2, index=4 is not.

Is that restriction going to work with migration ?

eg, you have a VM with 3 disks.  vda, vdb, vdc (index=0, index=1 and index=2).
You then hot-unplug the 2nd disk, vdb (index=1).  Now migrate the guest to 
another machine. I believe you now need to be able to start qemu on the target
host with -incoming and index=0 and index=2, but no index=1 because that 
disk was unplugged. So the indexes would be discontinuous now

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-85: virtio-blk not working

2009-04-23 Thread Andreas Plesner Jacobsen
On Thu, Apr 23, 2009 at 10:43:03AM +0200, Gerd v. Egidy wrote:
> 
> I am (or better libvirt is) starting the guest like this:
> 
> -drive file=/dev/VolGroup00/testboot,if=ide,index=0 \
> -drive file=/dev/VolGroup00/testvirt,if=virtio,index=1 \

Both should have index=0 (or no index at all), since the index is
internal to the driver.

-- 
Andreas
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-85: virtio-blk not working

2009-04-23 Thread Anthony Liguori

Brian Jackson wrote:
Your problem is that index's are per interface type, so both of your drives 
should be index=0 since they are different interface types.
  


More specifically, with virtio-blk, you cannot have discontinuous 
indexes.   In other words, having index=0, index=1, index=2 is valid, 
but having index=1, index=2, index=4 is not.


Regards,

Anthony Liguori

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kvm-85: virtio-blk not working

2009-04-23 Thread Brian Jackson
Your problem is that index's are per interface type, so both of your drives 
should be index=0 since they are different interface types.



On Thursday 23 April 2009 03:43:03 Gerd v. Egidy wrote:
> Hi,
>
> I just tried to upgrade my kvm (from 79) to the new 85. I'm using qemu-kvm-
> devel with the kvm-modules (and kernel-includes) that came with 2.6.29.1.
>
> Qemu-blockdevices and virtio-net work well. But virtio blockdevices are not
> accessible from within the guest system. Neither can the BIOS boot from
> them ("Boot failed: could not read the boot disk") nor can the guest-kernel
> (2.6.29.1 too) see them.
>
> I am (or better libvirt is) starting the guest like this:
>
> /usr/bin/qemu-kvm -S -M pc -m 1024 -smp 1 -name test \
> -uuid 283d1332-c234-9f28-24cf-8bbcc17b44c1 -monitor pty \
> -pidfile /var/run/libvirt/qemu//test.pid -boot c \
> -drive file=/dev/VolGroup00/testboot,if=ide,index=0 \
> -drive file=/dev/VolGroup00/testvirt,if=virtio,index=1 \
> -net nic,macaddr=54:52:00:7c:a5:89,vlan=0,model=virtio \
> -net tap,fd=17,script=,vlan=0,ifname=vnet0 \
> -serial pty -parallel none -usb -vnc 127.0.0.1:0
>
> When booting the guest I get these messages in the host log, but don't know
> if they are related:
>
> kernel: kvm: 3082: cpu0 unhandled wrmsr: 0xc0010117 data 0
> kernel: kvm: 3082: cpu0 unhandled rdmsr: 0xc0010117
> kernel: kvm: 3082: cpu0 unhandled rdmsr: 0xc0010117
>
> They show up when not using virtio-blk too.
>
> Any ideas?
>
> Kind regards,
>
> Gerd
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


kvm-85: virtio-blk not working

2009-04-23 Thread Gerd v. Egidy
Hi,

I just tried to upgrade my kvm (from 79) to the new 85. I'm using qemu-kvm-
devel with the kvm-modules (and kernel-includes) that came with 2.6.29.1.

Qemu-blockdevices and virtio-net work well. But virtio blockdevices are not 
accessible from within the guest system. Neither can the BIOS boot from them 
("Boot failed: could not read the boot disk") nor can the guest-kernel 
(2.6.29.1 too) see them.

I am (or better libvirt is) starting the guest like this:

/usr/bin/qemu-kvm -S -M pc -m 1024 -smp 1 -name test \
-uuid 283d1332-c234-9f28-24cf-8bbcc17b44c1 -monitor pty \
-pidfile /var/run/libvirt/qemu//test.pid -boot c \
-drive file=/dev/VolGroup00/testboot,if=ide,index=0 \
-drive file=/dev/VolGroup00/testvirt,if=virtio,index=1 \
-net nic,macaddr=54:52:00:7c:a5:89,vlan=0,model=virtio \
-net tap,fd=17,script=,vlan=0,ifname=vnet0 \
-serial pty -parallel none -usb -vnc 127.0.0.1:0

When booting the guest I get these messages in the host log, but don't know if 
they are related:

kernel: kvm: 3082: cpu0 unhandled wrmsr: 0xc0010117 data 0
kernel: kvm: 3082: cpu0 unhandled rdmsr: 0xc0010117
kernel: kvm: 3082: cpu0 unhandled rdmsr: 0xc0010117

They show up when not using virtio-blk too.

Any ideas?

Kind regards,

Gerd

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html