After a whole lot of struggling, I’ve finally figured out the best way to install a Windows virtual machine under KVM, using the paravirtual (virtio) drivers. The basic idea is to use the virtio devices from the initial installation to avoid all the work and hassles involved with changing the drivers later. This avoids mistakes which can lead to an unbootable guest or “Local Area Connection 2” annoyances.
Thanks to Stefan Skotte and Andy for updates to simplify this procedure.
- Download the latest virtio drivers (in ISO format).
- Create a new virtual machine as you normally would for a Windows guest, stopping just before clicking Finish.
- If you have a new enough version of virt-manager, you can check the “Customize configuration before install” checkbox. Otherwise, click Finish, stop the virtual machine, open the details, reconnect the CD (or other installation media) if necessary, and reconfigure the guest to boot off the CD (or other installation media).
- Delete the IDE disk device and re-add the storage as a Virtio disk.
- Change the NIC’s device model to virtio.
- Switch to the console view, run the virtual machine, and start the installation as normal.
- When the disk configuration step comes up, no disk will be detected. This is normal.
- Click Load driver…
- Switch to the details view, disconnect the Windows installation CD, and connect the virtio ISO image.
- Switch back to the console view and click Rescan.
- Select the virtio block storage and virtio network drivers for the Windows version being installed, using the control key to select multiple items as always.
- Click Next.
- Switch to the details view, disconnect the drivers CD, and connect the Windows installation CD again.
- Proceed with the installation as normal.
- Reconfigure the boot options, if necessary, as desired.
- Disconnect the CD device, if necessary and desired.
7 Replies to “Windows Paravirtual (virtio) Drivers”
Actually on windows 2008 x64/x86 you can just mount the cdrom iso directly, and then reattach the installation media afterwards.
On Windows Sever 2008 R2 the driver is found but I cannot install OS on the VirtIO disk that is detected. At first it the disk is offline but then when it is brought online it says the computer bios may not allow booting from this device. Don’t know if you have had any success with Windows Server 2008 R2 with these drivers.
I was using Windows 2008 R2 without any problems. Were you using the ISO I linked above? I’m using Ubuntu 10.04 “Lucid”. Are you using an up-to-date distro? Perhaps there’s some difference there.
I did try using the drivers provided in the above blog post. But have no luck. I am using Debian Lenny with kvm-72 Qemu version 0.9.1. But I think it’s got something to do with setting the hard disk boot=on. I will give it a try using virt-install rather than using virt-manager(0.8.2) as my virt-manager does not allow to configure the VM before install.
Thanx for letting me know that this can actually be done because I have been really confused with all these posts about signed drivers and what not…. this is much more straight forward for a newbie like me…
Had the same problem than Nimesh using Debian Squeeze.
But it works fine with virt-install after changing the domain config as described here: https://www.it-kartellet.dk/dokuwiki/howto/virtio_drivers_in_windows
Latest drivers can always be found here
I’ve been working with this one and have a very detailed method of accomplishing this goal with screen shots and a bash script that does it all in one shot.