Install windows 2012 R2 over KVM-virtualizaton

Jaime Uriel Torres Serrano asked:

I’m trying to install Windows Server 2012 R2 over linux KVM-virtualization.

The installation process stops and requires drivers to continue.

I’m trying with virtio drivers from fedora but doesn’t work. Installation process doesn’t show a storage device to install.

I’m trying different options to storage:SATA, IDE, Virtio, Virtio SCSI.

Diskpart (list disk) shows me disks but installer can’t use it.

I used different versions of virtio drivers:
virtio-win-0.1.105.iso , virtio-win-0.1.96.iso and virtio-win-0.1.101.iso with the same results.

My installations disk is: SW_DVD9_Windows_Svr_Std_and_DataCtr_2012_R2_64Bit_Spanish_-4_MLF_X19-82897.ISO

My answer:

This is how I currently do installs of Windows with virtio drivers at install:

  1. Create the new VM with a genuine Windows installation ISO image. I cannot guarantee that anything will work if you use a pirated copy of Windows or if your ISO image download is incomplete or corrupt.

    Create a new virtual machine

  2. Choose to customize the machine configuration before install.

    Customize machine configuration before install

  3. Select the IDE hard drive, and change its type to VirtIO. Click Apply.

    Change IDE hard drive to Virtio

  4. Select the IDE CDROM, and change its type to SATA. Click Apply.

    Change IDE CDROM to SATA

  5. Click Add Hardware, then add a second SATA CDROM drive with the virtio-win.iso image.

    Add a SATA CDROM with virtio-win.iso

  6. (Optional) Also change your virtual NIC to VirtIO. You’ll be able to install its drivers after Windows is installed, and this will prevent you from having an annoying “Ethernet 2” later.

    Click Begin Installation and begin installing Windows.

    When Setup asks you where to install Windows, click Load Driver.

    Windows setup Load Driver

  7. On the next page. click Browse, and browse to the \viostor\2k12R2\amd64 folder on the second CD drive, virtio-win-0.1.xx.

    Select E:\viostor\2k12R2\amd64

  8. The Red Hat VirtIO SCSI Controller will appear. Click Next.

    Use the Red Hat VirtIO SCSI Controller driver

  9. Now your virtual disk is successfully detected. Enjoy!

    Windows finds the virtual disk

When installation is complete, you can use the virtio-win CD to install drivers for the remaining hardware, such as your NIC, balloon driver, etc. Open up Device Manager to see which devices need to have drivers loaded. And when you’re done with installing drivers, you can remove the second virtual CDROM drive from the virtual machine.

Finally, if you intend to sysprep this image, e.g. to create a golden master, press CtrlShiftF3 here to go directly to audit mode.

Press Ctrl-Shift-F3 when Windows starts for the first time to enter audit mode

Windows Server 2012 R2 audit mode

(And to upgrade the video driver, see another answer I wrote).

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.