7

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

  • The installation media seems okay to me. My equivalent is `SW_DVD5_Windows_Svr_Std_and_DataCtr_2012_R2_64Bit_English_Core_MLF_X19-05182.ISO`. – 84104 Jul 06 '15 at 04:40

3 Answers3

15

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).

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • Why I can not add a SATA CDROM ? Only IDE – Jaime Uriel Torres Serrano Jul 06 '15 at 02:03
  • 2
    Probably because you're using old versions of libvirt, virt-manager or KVM. It should be OK to use IDE for both of the CDROM drives. But you may also want to upgrade your Linux distribution. I'm using Fedora 22 here. – Michael Hampton Jul 06 '15 at 02:04
  • My Windows Server 2012 R2 media was downloaded incomplete. I was confused. Windows installer suggest that I need a driver: "Falta un controlador de medios que tu PC necesita. Puede ser un controlador de DVD, USB o disco duro. Si tienes .." and it never suggest failure on media installer. – Jaime Uriel Torres Serrano Jul 06 '15 at 20:09
1

The main problem I had was getting the drivers. I downloaded mine from here https://fedoraproject.org/wiki/Windows_Virtio_Drivers and was successful in getting win 2012 r2 working on KVM

I put a video up showing the entire process I used https://youtu.be/9SPCa4TKues

  • 2
    Welcome to Server Fault! Whilst the video may answer the question, [it would be preferable](//meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Jenny D Jan 07 '16 at 16:35
0

I have detected an issue using bus='virtio' and install virtio drivers from the fedora driver image. Our Host Spec (short version):

  • Host: Debian Jessie
  • Kernel Version 4.8
  • qemu-kvm Version 2.8

Please note that because of the issue we had we updated our Kernel and qemu-kvm version. This was not the solution of the issue!

Our Guest Spec:

  • Windows Server 2012 R2
  • 110 GB RAM
  • qcow2 Image
  • SQL Server

Now here is the interesting Part ( i am using virsh to manage the guests ): Here is an example of my old disk definition.

<disk type='file' device='disk'>
  <driver name='qemu' type='qcow2' cache='none'/>
  <source file='/kvm/pathToWhatever/MYGUEST.qcow2'/>
  <target dev='vda' bus='virtio'/>
</disk>

Pretty basic nothing special here note bus='virtio' which was basicly suggested in every tutorial or forum i found.

After that install Windows Server ... no problems so far. I've then installed the virtio driver from fedoraproject image. Now we have heavy I/O since we run big DB Imports/Updates and so on. We ran a query on a huge database table and while it was starting shortly after a few minutes the Guest just freezed. We have debugged this for hours/days and didnt found anything in the logs.

We even tried to replicate this using virtualbox but it worked there absolutly fine.

Just today i found out that when switching to bus='ide' and then starting the SQL Query(Import) again, it works absolutly fine - high I/O not an issue at all.

Now i suspect that the virtio driver simply is broken or not compatible. I am not an expert when it comes to that but the temp solution for us was to switch to IDE. I am currently testing it now using bus='scsi' and then in the controller type definition as shown below define virtio-scsi as model.

<controller type='scsi' model='virtio-scsi' index='0'>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</controller>

I will post my results once i've tested it properly.

Mark
  • 1