On my KMS host I installed a windows server 2012 guest a few months ago. The VM runs raw using IDE (HDD). I would like to improve the performance by using virtio.

I performed these actions:

  • shutdown the VM
  • edit the XML config file
  • replace the disk tag by:

    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source file='/var/lib/libvirt/images/myvm.img'/>
      <target dev='vda' bus='virtio'/>
  • save the XML config file

  • restart the VM with virt-manager
  • I have a BSOD and the vm auto reboot
  • Auto repair started, asking my keyboard language
  • two options: repair or stop the PC
  • I tried both but always BSOD after boot.

What is missing in my procedure?

  • Installing the virtio drivers prior to the interface swap.
    – llua
    Commented Jun 7, 2014 at 12:20
  • I tried to install, in windows server 2012, spice-guest-tools-0.74.exe. I suppose that the virtio driver is inside. During the installation, I have the message "unsupported window version" !
    – Bertaud
    Commented Jun 7, 2014 at 14:16
  • the spice guest tools do not provide the virtio drivers for windows. slm seemed to have updated his answer with a link to them. you need to make sure windows has the drivers installed before switching the interface to virtio for this to work. Just how do you do that in windows? i don't know and is loosely on topic on this site.
    – llua
    Commented Jun 11, 2014 at 0:47
  • because the host is debian and I am using virt-manager. which site(s) would be more adapted for you ?
    – Bertaud
    Commented Jun 12, 2014 at 14:54

3 Answers 3


I had exactly the same problem. I installed Windows 7 on IDE disk, later tried to switch to VirtIO - got BSOD on boot, tried to install the drivers in recovery mode - does not work.

I solved it with a little trick. Leave your boot disk as IDE and add a dummy VirtIO disk. Add a CD-ROM with VirtIO drivers for Windows (the link is Win-64 CD ISO) and boot. Windows will start normally, detect a new hardware and install the drivers from CD automatically. Then you can shutdown and switch you boot disk to VirtIO mode and remove the dummy one.

  • This answer works. It is not enough to install via the CD. Have to add a dummy disk in order for Windows to use the driver. Then you can shutdown and change the boot disk to VirtIO as this answer says.
    – Amala
    Commented Mar 14, 2017 at 17:06
  • This solution helped me get my Windows 10 VM booting using VirtIO on Unraid Commented Jan 19, 2021 at 6:47

The only other thing beyond changing the target line in the XML file like so:

<target dev='hda' bus='ide'/>


<target dev='vda' bus='virtio'/>

Is to remove all <address type .../> lines so that libvirt can regenerate them. If the VMs were Linux guests you'd need to change the drive's label inside of the guest's /etc/fstab file, replacing all /dev/sdX with /dev/vdX, so you might need to do something comparable for a Windows VM guest.


You'll likely need to follow the directions on the KVM project's website to install the necessary VirtIO drivers for Windows, Windows VirtIO Drivers. Details are also covered in this KVM article: How to setup Windows guest VirtIO block driver on Windows Server 2003.


  • I used this reference ! I don't know what I should do in windows ...
    – Bertaud
    Commented Jun 7, 2014 at 14:10

Before install virtio,on windows(and sometimes on linux,but rare) you must include the virtio drivers on windows. Best thing to do is boot with ide and virtio windows recognize the new controller and ask for a driver put the driver shutdown simply change the hd position from ide to virtio Pray and reboot. For network card i'm not sure but windows can rename it with a new lan name

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .