public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* virtio block drivers not working
@ 2009-03-22 17:58 Caleb Tennis
  2009-03-22 18:34 ` Tomasz Chmielewski
  2009-03-22 21:30 ` Christoph Hellwig
  0 siblings, 2 replies; 6+ messages in thread
From: Caleb Tennis @ 2009-03-22 17:58 UTC (permalink / raw)
  To: kvm

I've been very unsuccessful in using the virtio block drivers inside  
of a guest.  I can't seem to make them active.  I'm positive my kernel  
has support for them turned on (not as a module, but as a direct built  
in), but when I change one of my ide drives over to virtio and boot,  
it isn't found, and nothing under /sys or /dev indicates the presence  
of a device.  dmesg doesn't indicate anything about them either.  I DO  
have virtio networking enabled and working, so I know as a whole that  
some of the virtio subsystem is functional.

The only thing I think I'm doing possibly differently than normal is  
using the "-kernel" option to boot up from a kernel image vs. having  
an installed boot image via lilo or grub.  Would this make any  
difference?

Is there any way for me to debug some more as to why the block drivers  
don't seem to be showing up?

Thanks,
Caleb

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: virtio block drivers not working
  2009-03-22 17:58 virtio block drivers not working Caleb Tennis
@ 2009-03-22 18:34 ` Tomasz Chmielewski
  2009-03-22 19:32   ` Caleb Tennis
  2009-03-22 21:30 ` Christoph Hellwig
  1 sibling, 1 reply; 6+ messages in thread
From: Tomasz Chmielewski @ 2009-03-22 18:34 UTC (permalink / raw)
  To: Caleb Tennis, kvm@vger.kernel.org

Caleb Tennis schrieb:
> I've been very unsuccessful in using the virtio block drivers inside of 
> a guest.  I can't seem to make them active.  I'm positive my kernel has 
> support for them turned on (not as a module, but as a direct built in), 
> but when I change one of my ide drives over to virtio and boot, it isn't 
> found, and nothing under /sys or /dev indicates the presence of a 
> device.  dmesg doesn't indicate anything about them either.  I DO have 
> virtio networking enabled and working, so I know as a whole that some of 
> the virtio subsystem is functional.
> 
> The only thing I think I'm doing possibly differently than normal is 
> using the "-kernel" option to boot up from a kernel image vs. having an 
> installed boot image via lilo or grub.  Would this make any difference?
> 
> Is there any way for me to debug some more as to why the block drivers 
> don't seem to be showing up?

Did you try other guests?

For example, try downloading a SystemRescueCd beta - it includes virtio 
drivers:

http://www.sysresccd.org/Beta-x86

Boot the guest from this CD, with a drive attached as virtio.

Load virtio drivers - do you see /dev/vda?


-- 
Tomasz Chmielewski
http://wpkg.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: virtio block drivers not working
  2009-03-22 18:34 ` Tomasz Chmielewski
@ 2009-03-22 19:32   ` Caleb Tennis
  0 siblings, 0 replies; 6+ messages in thread
From: Caleb Tennis @ 2009-03-22 19:32 UTC (permalink / raw)
  To: kvm


On Mar 22, 2009, at 2:34 PM, Tomasz Chmielewski wrote:

> Did you try other guests?
>
> For example, try downloading a SystemRescueCd beta - it includes  
> virtio drivers:
>
> http://www.sysresccd.org/Beta-x86
>
> Boot the guest from this CD, with a drive attached as virtio.

Ok, booted.

>
> Load virtio drivers - do you see /dev/vda?
>

Yes, I do.  I suppose this tells me there's a problem in my kernel,  
but I guess I'm not sure what else to enable to get virtio working in  
my normal boot kernel.

Thanks,
Caleb

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: virtio block drivers not working
  2009-03-22 17:58 virtio block drivers not working Caleb Tennis
  2009-03-22 18:34 ` Tomasz Chmielewski
@ 2009-03-22 21:30 ` Christoph Hellwig
  2009-03-22 22:06   ` Caleb Tennis
  1 sibling, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2009-03-22 21:30 UTC (permalink / raw)
  To: Caleb Tennis; +Cc: kvm

I do you virtio block in a very similar setup to yours (fully static
kernel, -kernel option to kvm/qemu) sucesfully for quite a a while.

Can you post your kernel .config and the contents of /proc/devices
and /proc/partitions to debug this further?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: virtio block drivers not working
  2009-03-22 21:30 ` Christoph Hellwig
@ 2009-03-22 22:06   ` Caleb Tennis
  2009-03-23  7:48     ` Markus Armbruster
  0 siblings, 1 reply; 6+ messages in thread
From: Caleb Tennis @ 2009-03-22 22:06 UTC (permalink / raw)
  To: kvm


On Mar 22, 2009, at 5:30 PM, Christoph Hellwig wrote:

> I do you virtio block in a very similar setup to yours (fully static
> kernel, -kernel option to kvm/qemu) sucesfully for quite a a while.
>
> Can you post your kernel .config and the contents of /proc/devices
> and /proc/partitions to debug this further?
>

I've found the problem.  In my testing, I was changing my second drive  
from ide to virtio, so it looked like this:

-drive index=0,media=disk,if=ide,file=/root
-drive index=1,media=disk,if=virtio,file=/data

This doesn't work though, even as vdb, as since the interface is the  
first virtio, the index needs to be set back to 0.  This gives me a / 
dev/vda like I was expecting.

Thanks,
Caleb

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: virtio block drivers not working
  2009-03-22 22:06   ` Caleb Tennis
@ 2009-03-23  7:48     ` Markus Armbruster
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Armbruster @ 2009-03-23  7:48 UTC (permalink / raw)
  To: Caleb Tennis; +Cc: kvm

Caleb Tennis <caleb@aei-tech.com> writes:

> On Mar 22, 2009, at 5:30 PM, Christoph Hellwig wrote:
>
>> I do you virtio block in a very similar setup to yours (fully static
>> kernel, -kernel option to kvm/qemu) sucesfully for quite a a while.
>>
>> Can you post your kernel .config and the contents of /proc/devices
>> and /proc/partitions to debug this further?
>>
>
> I've found the problem.  In my testing, I was changing my second drive
> from ide to virtio, so it looked like this:
>
> -drive index=0,media=disk,if=ide,file=/root
> -drive index=1,media=disk,if=virtio,file=/data
>
> This doesn't work though, even as vdb, as since the interface is the
> first virtio, the index needs to be set back to 0.  This gives me a /
> dev/vda like I was expecting.
>
> Thanks,
> Caleb

Yes, the common loop to create virtio block devices (all three copies of
it) stops at the first unused unit number / index.  A rude trap for the
unwary.  The device configuration patch I'm working on upstream doesn't
do that.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-03-23  7:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-22 17:58 virtio block drivers not working Caleb Tennis
2009-03-22 18:34 ` Tomasz Chmielewski
2009-03-22 19:32   ` Caleb Tennis
2009-03-22 21:30 ` Christoph Hellwig
2009-03-22 22:06   ` Caleb Tennis
2009-03-23  7:48     ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox