From mboxrd@z Thu Jan 1 00:00:00 1970 From: Asdo Subject: Re: Can't make virtio block driver work on Windows 2003 Date: Thu, 15 Oct 2009 16:23:01 +0200 Message-ID: <4AD73045.3080701@shiftmail.org> References: <4AD60FDB.7010603@shiftmail.org> <4AD6AFB9.8070103@redhat.com> <4AD70AB3.8040803@shiftmail.org> <4AD72197.8040908@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Vadim Rozenfeld Return-path: Received: from blade3.isti.cnr.it ([194.119.192.19]:60943 "EHLO BLADE3.ISTI.CNR.IT" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751954AbZJOOYe (ORCPT ); Thu, 15 Oct 2009 10:24:34 -0400 Received: from conversionlocal.isti.cnr.it by mx.isti.cnr.it (PMDF V6.4 #31773) id <01NEXB1KQFVKCMJURK@mx.isti.cnr.it> for kvm@vger.kernel.org; Thu, 15 Oct 2009 16:23:03 +0200 In-reply-to: <4AD72197.8040908@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Vadim Rozenfeld wrote: > On 10/15/2009 01:42 PM, Asdo wrote: >> Vadim Rozenfeld wrote: >>> On 10/14/2009 07:52 PM, Asdo wrote: >>>> ... >>>> So I tried adding another drive, a virtio one, (a new 100MB file at >>>> host side) to the virtual machine and rebooting. >>>> >>>> A first problem is that Windows does not detect the new device upon >>>> boot or Add Hardware scan. >>> Check PCI devices with "info pci". You must have "SCSI controller: >>> PCI device 1af4:1001" device reported. >> >> It's not there. Does this make it a KVM bug? > Looks like virtio-blk device wasn't initialized. Otherwise I cannot > explain why 0x1100 device is here. > Try to start block device without "index=1" > Anyway, if you can, please send "info pci" output from QEMU monitor > console. Owh! Ok THAT was "info pci" Ok I am copying by hand before removing index=1 (qemu) info pci Bus 0, device 0, function, 0: Host bridge: PCI device 8086:1237 Bus 0 device 1, function 0: ISA ridge: PCI device 8086:7000 Bos 0 device 1 function 1: IDE controller: PCI device 8086:7010 BAR4: I/O at 0xc000 [0xc00f]. Bus 0 device 1 function 3: Bridge: PCI device 8086:7133 IRQ 9 Bus 0 device 2 function 0: VGA controller: PCI device 1013:00b8 BAR0: 32 but memory at 0xf0000000 [0xf1ffffff] BAR1: 32 but memory at 0xf2000000 [0xf2000fff] Bus 0 device 3 function 0: Ethernet controller PCI device 1af4:1000 IRQ 11 BAR0: I/O at 0xc020 [0xc03f] Bus 0 device 4 function 0 RAM controller: PCI device 1af4:1002 IRQ 11 BAR0 : I/O at 0xc040 (qemu) so it's not there Now I remove index=1: WOW it's there now! ... Bus 0 device 4 function 0: Storage controller: PCI device 1af4:1001 IRQ 11 BAR0: I/O at 0xc040 [0xc07f] (just before the 1002 device) So now windows sees it and I was able to install the viostor drivers (btw Windows was not happy with the previously installed viostor drivers, I had to reinstall those and I got two devices, and the previous one still had the yellow exclamation mark, so I had to uninstall that one. After the procedure I was able to boot on virtio too! Yeah!). Great so yes, I'd say you *DO* have a KVM bug: one has to remove index=1 for the second disk to appear. How did you know that, Vadim, is it a known issue with kvm? It's better to fix that because libvirt puts "index=n" for all drives so it's impossible to workaround the problem if one uses libvirt. I had to launch manually... Thanks a lot Vadim. Asdo