How to make Windows Server 2012 running on KVM boot with virtio rather than IDE

kvm-virtualizationlibvirtwindows-server-2012

I have Windows Server 2012 Essentials running on KVM in Ubuntu 14.04. I've had some problems detailed here Windows Server 2012 on KVM on Ubuntu 14.04. Runs well for a while and then slows down

I haven't made much progress on that but I thought I would try changing the disks from virtio to IDE in case there is a problem with virtio on Windows 2012. That didn't seem to help so I now want to go back to virtio for the better performance. The problem now is that it will only boot if the C: drive is IDE. If I use virsh to set my C: drive to virtio then Windows starts to boot but comes up with the repair screen. If I go to a command prompt, diskpart reports no disks. It's obviously forgotten about the virtio driver which is a bit strange because I have d: e: and f: drives which are still running virtio so the driver is there and installed but just not recognized at boot time as it used to.

I originally installed the virtio drivers at the beginning of the install when I had the chance to hit a key and install a driver.

How can I get it to recognize the virtio driver again?

I'm basically in the situation as someone who installed it as IDE and now wants to move to virtio. This video seems to have a solution. https://www.youtube.com/watch?v=tlh4zxqfvhk&feature=youtu.be He boots on the install CD and gets back to that driver prompt, installs the driver and quits. When I try that and hit the "Install" button, it prompts me for my Windows registration code which I enter and then it told me to remove the CD and reboot. I never got the driver prompt.

Is it likely to be worth creating another partition, installing a minimum Windows 8, booting on that, making sure my original C: drive has the virtio drivers, then marking it as active and rebooting? I've seen that sort of procedure described.

Are there any other "tricks" to getting back to where I was.

Thanks

Best Answer

  1. Attach a new VirtIO disk to your VM, whether it is online or offline.
  2. When online, Windows will recognize the new disk and ask for drivers. Install virtIO drivers.
  3. After successful driver installation, shutdown your VM.
  4. With VM offline, remove the disk attached on step 1.
  5. With VM offline, change type of original VM disk to VirtIO.
  6. Boot your VM.

Windows won't complain, because you already have the drivers (installed on step 2).