Setup Windows XP virtio

Get a floppy with drivers:

$ wget http://www.linux-kvm.com/sites/default/files/viostor-31-03-2010-floppy.img

I will describe two alternative methods for setting virtio in WinXP.

Setup during WinXP installation
Instruction is based on http://www.linux-kvm.com/content/block-driver-updates-install-drivers-during-windows-installation.

Create an image.

$ qemu-img create -f qcow2 winxp.qcow2

Run installation (assuming that your Win Install ISO is winxp.iso)

$ kvm -boot d -cdrom winxp.iso -drive file=winxp.qcow2,if=virtio -fda viostor-31-03-2010-floppy.img -m 1200

Note. According to the original article, drive should be given with “boot=on” like this:

$ kvm -boot d -cdrom winxp.iso -drive file=winxp.qcow2,if=virtio,boot=on -fda viostor-31-03-2010-floppy.img -m 1200

When I used this option, I had an error “Raw or indistinguishable disks” and installation failed. However, without “boot=on” I could install WinXP on qemu-kvm-0.15.0.

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. Select Windows XP 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.

Setup after WinXP installation
Instruction is based on http://www.linux-kvm.com/content/redhat-54-windows-virtio-drivers-part-2-block-drivers.

Create an image and install WinXP.

$ qemu-img create -f qcow2 winxp.qcow2
$ kvm -boot d -cdrom winxp.iso -drive file=winxp.qcow2 -m 1200

Shut down WinXP and run it again with attached virtio drive and floppy.

$ kvm -boot d -cdrom winxp.iso -drive file=winxp.qcow2 -drive file=winxp.qcow2,if=virtio -fda viostor-31-03-2010-floppy.img -m 1200

When you boot your guest with the virtio block disk attached windows will prompt you on startup for a driver to install.
Select “No, not this time” when the wizard asks you to search for the driver software.

Select “install from a list of specific location” .

Select the Browse button and navigate to the driver CD.

Select the appropriate folder for your guest architecture (WinXP 32 bit).

Click Next to begin the install.

You will get a prompt warning about the driver not being signed. Go ahead and select “Continue Anyway”.

Your driver has now successfully been installed.

When you inspect your drivers you’ll now see the redhat virtio scsi controller listed.

Shut down and start Windows this way:

$ kvm -boot d -cdrom winxp.iso -drive file=winxp.qcow2,if=virtio -fda viostor-31-03-2010-floppy.img -m 1200

Leave a comment