This process is not as hard as one would expect. Once it’s completed, there is a big performance increase. (At least in my case there was.) I did this in XP, but I see no reason why it won’t work in Windows 2003, Vista, 7, etc.
A requirement is to have the Viostor drivers on your virtual machine before you continue. They can be downloaded on the KVM Driver Download page.
Before I explain anything, my configuration in the beginning looks as follows…
qemu-kvm \
-drive file="./WindowsXP.qcow2",if=ide,boot=on \
-m 1024M \
-smp 1 \
-soundhw ac97 \
-vga std \
-name "Windows XP Professional" \
-net nic,model=virtio \
-net user \
-usb
- To start off, we need to create an empty disk image file, or temporarily link an existing one to the XP virtual machine. That can be done by adding
-drive file="./temp.qcow2",if=virtio,boot=off \
to the configuration. - Launch the VM with that configuration option added, and once Windows XP loads, it will ask for the drivers for the SCSI controller, which is Viostor. Point it to the directory that you extracted the drivers to, and it should install.
- After Windows XP installs the drivers, shut down Windows XP.
- Remove that temporary line that you added in Step 1 and change your real drive to say “if=virtio” instead of “if=ide”.
- After making that change, startup Windows XP again, and when Windows loads, it will reinstall the Viostor driver for that hard drive.
- Reboot, and you are finished.
In the end, my configuration looks like:
qemu-kvm \
-drive file="./WindowsXP.qcow2",if=virtio,boot=on \
-m 1024M \
-smp 1 \
-soundhw ac97 \
-vga std \
-name "Windows XP Professional" \
-net nic,model=virtio \
-net user \
-usb