Installing kvm block drivers during windows installation now works after the latest updates to the windows guest driver code repository. In this post I’ll walk through this process on a windows xp 32-bit guest and provide a floppy image that you can download and use for this purpose. The floppy image contains block drivers for Windows XP 32-bit, Windows 2003 32-bit and Windows 2003 64-bit. I’ve only tested this with windows xp 32-bit guest so provide feedback if you have any issues with windows 2003 guests.
If you’re managing your virtual machine from the command line then you need to start your new windows guest VM with the following minimum set of options.
/usr/bin/qemu-kvm \ -boot d \ -cdrom /files/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso \ -drive file=/vm/testinstall.img,if=virtio,boot=on \ -fda /home/hsolomon/Download/isos/viostor-31-03-2010-floppy.img \ -m 1200 &
The most important option is the if=virtio,boot=on and the floppy image which provides the drivers during installation. If you’re using a GUI management tool such as virt-manager, then you only need to add the floppy image before installation and specify your disk type as virtio.
Shortly after the windows install CD boots is the option to install any additional storage drivers. This is the critical thing to remember when installing storage drivers during windows installation because it’s easy to miss this. If you miss that opportunity you’ll have to restart the installation. Below is a screenshot showing the screen to hit F6 in order to install storage drivers.

Before installation begins, you’ll be prompted to specify your storage drivers as shown below.

Type “S” to specify your viostor block driver. You’ll then be prompted to specify your driver from the driver list. The floppy image contains drivers for Windows XP and 2003 as shown below. Select your driver.

Installation goes as usual after this. You will get a prompt during installation asking you to confirm the installation of the unsigned driver.

Accept and finish install as usual.
As mentioned earlier, I have only tested this with windows xp 32-bit guest. Try this floppy image with your Windows guests and feel free to comment or ask questions.
| Attachment | Size |
|---|---|
| viostor-31-03-2010-floppy.img | 1.41 MB |
Comments
Not working for me
Tuesday, April 6, 2010 - 12:03 Taliesin (not verified)After first reboot I get BSOD and "DRIVER_CORRUPTED_MMPOOL"
kvm -localtime -cdrom /opt/vm/GRTMPOEM_PL.iso -drive file=/opt/vm/winxp.img,if=virtio,index=0,cache=writeback,media=disk,boot=on -fda /opt/vm/viostor-31-03-2010-floppy.img -m 1024 -boot d -net nic,vlan=0,macaddr=00:16:3e:00:00:01,model=rtl8139 -net tap -vnc 192.168.1.54:1 -daemonize
Re: Not working for me
Tuesday, April 6, 2010 - 13:51 Haydn SolomonTaliesin,
By first reboot, do you mean that it installed fine on first run, just the reboot failed? Also, what version of kvm are you using? What linux distro are you using?
Ubuntu 64bit 10.04 lucid
Wednesday, April 7, 2010 - 02:37 Taliesin (not verified)Ubuntu 64bit 10.04 lucid beta2
qemu-kvm-0.12.3
No cant complete the install i get BSOD after first reboot during install.
Virtio block driver from viostor-xp-2010-02-06.iso working fine when installed with fake.img and then converted first disk form ide to virtio.
Can you try using the basic
Wednesday, April 7, 2010 - 09:22 Haydn SolomonCan you try using the basic command line options from the example in the post and see if that makes a difference?
Installation aborted: can't copy viostor.sys
Friday, April 16, 2010 - 08:41 Henry (not verified)The Installation of XP Professional aborted with the error that viostor.sys can't be copied.
Before that the hard drive is recognized of formatted correctly.
I use kvm 72+dfsg-5~lenny5 (on Debian Lenny) with libvirt 0.4.6-10.
The command line produced by libvirt is:
/usr/bin/kvm -S -M pc -m 512 -smp 1 -name xptest -monitor pty -localtime -boot d -drive file=/var/VM/winxpsp3.iso,if=ide,media=cdrom,index=2 -drive file=/var/VM/viostor-31-03-2010-floppy.img,if=floppy,index=0 -drive file=/dev/vg/xptest,if=virtio,index=0 -net nic,macaddr=00:16:3e:2a:45:01,vlan=0,model=virtio -net tap,fd=11,script=,vlan=0,ifname=vnet0 -serial pty -parallel none -usb -usbdevice tablet -vnc 0.0.0.0:0 -k de
Henry, I would try compiling
Friday, April 16, 2010 - 10:41 Haydn SolomonHenry,
I would try compiling a newer version of kvm or qemu-kvm to a specified location and testing with that. KVM-72 is pretty old. Try that and see if it works.
I tried it now with qemu-kvm
Monday, April 19, 2010 - 05:23 Henry (not verified)I tried it now with qemu-kvm 0.12.3+dfsg-4 and kernel 2.6.33 on debian sid. Same Error: viostor.sys can't be copied
Same bluescren as Taliesin after upgrade to ubuntu 10.04
Sunday, May 2, 2010 - 19:57 ReedI know this is post is a bit old, but it's the first google result I got for this problem so maybe the following will help someone:
block virtio worked great for me on ubuntu 9.10, set up at install time on XP using the floppy image viostor-31-03-2010-floppy.img. After upgrading to 10.04, guests that had this driver installed BSOD on boot (or sometimes a bit later, at the login prompt):
DRIVER_CORRUPTED_MMPOOL
STOP: 0x000000D0 (0x00000008,0x00000002,0x0000000,0x8054A06C)
Switching to the driver found at http://www.linux-kvm.com/sites/default/files/viostor-xp-2010-02-06.iso appears to have fixed the problem. This is confusing because the version info is the same as on the floppy image (both in the file version resources and .inf) but the files are different:
viostor-31-03-2010-floppy.img \i386\WinXP md5sum
8b5e809a7f2b9821ff8b229f3bda9269 viostor.sys
viostor-xp-2010-02-06.iso \winxp\i386 md5sum
a584ba5c5b966b8eb15df7f772f97be9 viostor.sys
guests are 32 bit XP pro sp3.
Switching to IDE also makes the problem go away, with the obvious performance cost. (To my surprise XP didn't freak out when the SCSI disks suddenly became IDE). Used DEVMGR_SHOW_NONPRESENT_DEVICES to update the driver on the non-present SCSI controllers.
host is
2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:09:38 UTC 2010 x86_64 GNU/Linux
QEMU PC emulator version 0.12.3 (qemu-kvm-0.12.3)
The 9.10 version of qemu was 0.11.?
host cpu
family:17 model:3 stepping:1
model name: AMD Athlon(tm) X2 Dual-Core QL-60
example command line
qemu -enable-kvm -soundhw ac97 -localtime -boot order=dca,menu=on -m 512 \
-cdrom /dev/cdrom \
-drive file=/home/reed/virtualmachines/xp-work.qcow,cache=writeback,index=0,if=virtio,boot=on,media=disk \
-drive file=/home/reed/virtualmachines/xp-data1.qcow,cache=writeback,index=1,if=virtio,media=disk \
-net nic,vlan=0,model=virtio,macaddr=52:54:00:12:69:02 -net tap,ifname=tap2,vlan=0,script=no,downscript=no \
-monitor stdio -vnc localhost:3
Ubuntu Lucid DRIVER_CORRUPTED_MMPOOL BSOD VirtIO Block Drivers
Tuesday, May 4, 2010 - 11:50 Clayton (not verified)I confirm what Reed posted about the BSOD when moving from Karmic to Lucid. Switching my Windows XP KVM back to IDE block drivers prevents the BSOD.
Thanks for posting your finding, Reed. It saved me hours of potential troubleshooting.
Re: CORRUPTED_MMPOOL BSOD
Tuesday, May 4, 2010 - 12:34 Haydn SolomonClayton,
I'm curious. Is your host architecture AMD as well?
Re: CORRUPTED_MMPOOL BSOD
Wednesday, May 5, 2010 - 09:30 Clayton (not verified)I'm using a System 76 Lemur laptop running on an Intel Core 2 Duo SU7300.
Re: Same bluescren as Taliesin after upgrade to ubuntu 10.04
Thursday, May 6, 2010 - 09:24 Kenni LundAbout the BSOD on 9.10->10.04 upgrade:
Unfortunately, I can't find the bugreport right now in Redhat bugzilla, but AFAIR there was a bug report there, related to upgrading RHEL 5 -> 6, which would cause BSOD due to changes in the hostside kernel/virtio-driver. As I remember it, the conclusion was that they needed to do a workaround fix inside qemu-kvm to allow moving of Windows guests with the old virtio-blk driver to a later host RHEL version. If the workaround wasn't implemented, users would have to upgrade the Windows block driver prior to upgrading the host system.
So, my guess is that a newer version (already released or upcoming) Windows block driver will be capable of the upgrade. Or a workaround fix in qemu-kvm (probably not likely outside qemu-kvm in RHEL).
As I wrote above, this is purely from my memory, so the information might be more less accurate...nevertheless, it seems to match your experience with ubuntu 10.04 (which uses a ~2.6.32 kernel like RHEL6).
Switch boot disk afterwards
Monday, May 10, 2010 - 23:55 MossySf (not verified)Was able to switch the boot disk to BlockIO afterwards using the following sequence:
1. Did a regular install of Win2K.
2. Added a dummy disk image that used VDA/VIRTIO as the config. That prompted the install of the viostor driver.
3. Deleted the dummy disk image. Changed the boot image device to VIRTIO but left it has HDA.
The VM then came up using Redhat VirtIO SCSI controller for the boot partition.
However, I do not prefer to use this config. Whenever the BlockIO disk is used, QEMU-KVM hits 100% CPU under the host. It runs fast but Linux has no idea how much unused CPU slack there is to allocate to other tasks. (Not sure if this is a Win2K problem although it looks similar like the ACPI/SMP problem others have reported for Win2K/WinXP and I was able to solve that by passing -OS-VARIANT=VISTA at install to force ACPI on.) Hence, I prefer to keep the OS using the emulated IDE driver and then point all disk intensive applications to the D: BlockIO disk.
An extra note, directly switching back from BlockIO to emulated IDE for the boot/OS image will cause a blue screen upon reboot. Instead, you have to use the "choose standard IDE controller" trick because shutting down and changing the VM config.
My testing was done in Centos 5.4 on an AMD Athlon II X2 250 (3ghz).
is it possible to use it with Windows 2008?
Thursday, May 20, 2010 - 07:16 mangoo (not verified)Is it possible to use KVM virtio drivers with Windows 2008 64 bit? I noticed Win 2008 installer does not recognize the virtio drivers during the installation.
Have a look at this
Friday, May 21, 2010 - 21:37 Nimesh (not verified)Have a look at this http://coderich.net/2010/04/25/windows-virtio-drivers/ . In my case the network drivers were not getting recognised however upgrading the kernel did the trick for me.
Test failed in Win2003, os Fedora12
Monday, May 24, 2010 - 08:58 Arthur Xu (not verified)Hi, I just test it in Win2003.
Everything work fine before reboot, after it, just blank screen.
/usr/bin/qemu-kvm -S -M pc-0.11 -m 512 -smp 2 -name test -uuid 97d400c2-7bfa-a3dd-ff03-7c0046f829d4 -monitor unix:/var/lib/libvirt/qemu/test.monitor,server,nowait -localtime -boot c -drive file=,if=floppy,index=0 -drive file=/home/Arthur/[Windows.Server.2003.SP2].win2003.Enterprise.VOL_SP2_CN.iso,if=ide,media=cdrom,index=2 -drive file=/var/lib/libvirt/images/test.img,if=virtio,index=0,boot=on,format=raw -net nic,macaddr=52:54:00:08:ef:7f,vlan=0,name=nic.0 -net tap,fd=20,vlan=0,name=tap.0 -serial pty -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:1 -k en-us -vga vmware -soundhw es1370
No more information I can provide.
re: Installation aborted: can't copy viostor.sys
Friday, June 11, 2010 - 04:01 virgonaIt should be kvm related, I tested in virt-manager version 0.8.4 and qemu command on f13, both failed to copy. Also, for some EZB based iso images, it could be booted, "enter" and manual choices were not working.
But as tested on spice installed kvm, qemu-spice, all were working.
Thanks
Wednesday, June 16, 2010 - 11:22 Maniatux (not verified)Hi,
I'm working on KVM and I wanted to thank you for these drivers. Same for Network and vmware driver.
I'm running Windows server 2003 and 2008. First needs 2-3 seconds for booting only. It's pretty fast. For Windows 2008, sometimes it's slow, mouse pointer is not smooth but it's ok.
Maniatux Good to know that
Wednesday, June 16, 2010 - 11:26 Haydn SolomonManiatux
Good to know that the drivers are helping you out. Appreciate your feedback.
Haydn
re: I tried it now with qemu-kvm
Monday, June 21, 2010 - 04:20 virgonaHi Henry,
It is working on my side now, copying is ok. Try to copy all the driver files you needed to the root of the floppy image.
And it looks the unpublished option boot=on is needed. I lost the link, but you can search the discussion in kvm mail list, it is for virtio interface.
But it is not working on spice if you want to try it. The virtio of network is working, but block device is not yet till now. The spice team is working on one version of upstream qemu, not qemu-kvm, so not all up-to-date features are supported.
Yes, you should be able to !
Sunday, October 24, 2010 - 04:37 Anonymous (not verified)Yes, you should be able to ! It requires to create the disk in 1st step and then restart the installation procedure.
it happened to me. windows
Monday, January 10, 2011 - 02:35 david bill (not verified)it happened to me. windows installation starts and then after a while it prompts you to insert cd/dvd for driver. i tried to burn on another disk and verify just to make sure it's not my dvd making the problem. this time it worked and it doesnt ask for any driver or anything. so i guess my previous windows 7 disk did not burn correctly, probably yours too.
switching to ide helped me to
Monday, October 24, 2011 - 17:52 ET (not verified)switching to ide helped me to install win xp, no success with loading drivers from floppy at install time - getting BSOD after first reboot (immediately after format partition and getting files from cd, installer could not find virtio.inf and some other files; no success even if I integrated drivers to install cd with nlite :)
I also realized some performance penalty when using emulated ide, installation till first reboot is faster around 20% with virtio
gentoo 2.6.38-hardened-r6 x86_64 smp
qemu-kvm-0.13.0-r2
Updated floppy image file
Tuesday, March 6, 2012 - 14:53 ironiridis (not verified)I made an updated floppy image file with the current virtio driver for Windows XP (extracted from virtio-win-0.1-22.iso). It resolves the BSOD after first reboot for me. If anyone wants or needs it, please feel free to email me at ironiridis@gmail.com.
Updated floppy image file
Saturday, June 9, 2012 - 12:33 WolfgangP (not verified)This solution works great. Thank you Chris.
Finally ...
2012 Floppy Image
Wednesday, July 11, 2012 - 16:40 tradetaxfree (not verified)Your instructions worked perfectly. Installation of the XP guest was quite a bit quicker than using the IDE bus.
I have built an updated floppy image with the 2012 WinXP / Windows 2003 virtio drivers from the latest ISO (virtio-win-0.1-22.iso)
The "boot=on" command line option is now deprecated & I used:
#!/bin/shkvm -boot order=dca -m 512 \
-cdrom /home/user/KVM/WinXP_corporate.iso \
-drive file=/home/user/KVM/WinXP/WinXP.qcow2,if=virtio \
-fda /home/user/KVM/viostor-22-01-2012-floppy.img
hi. I come to this problem,
Friday, September 7, 2012 - 23:16 hh (not verified)hi.
I come to this problem, command like this:
1.create a device
kvm-img create -f qcow2 winxpsp3.img 3g
2.start
kvm -m 1024 -cdrom /path/winxp-sp3-pro.iso\
-drive file=/path/win.img,if=virtio,boot=on\
-fda /path/viostor-31-03-2010-floppy.img -boot d
and "F6" -> s --> ...winXP/32-bit
then it prints "The file \i386\WinXP\viostor.sys is corrupted.Press any key to continue"
is it my ".iso" file's problem?
anyone any ideas?
thanks.
Post new comment