Can't get Windows 10 working in KVM on Arch Linux

This is my first time installing a VM in Linux, so its possible that its just something simple.

After installing Windows 10 in a VM it normally reboots, and then it gets stuck for 30-60 mins on “Getting ready”, after that it reboots again, then it gets stuck at this screen:

after about 10-20 mins it reboots and just shows this:

I can click on “Next” all I want, it just does the same thing over and over again.

My Host:

  • MSI B350M Mortar
  • Ryzen 7 1700X
  • Nvidia GT 1030 (For Host)
  • Nvidia GTX 1080 (For Guest)
  • 16 GB RAM

My Guest:

  • 8 Cores
  • 8GB RAM

I’ve already tried:

  • passing through a real drive, instead of a virtual one
  • installing Windows with the GPU passed through

Here is the xml dump:

<domain type='qemu'>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <vcpu placement='static'>8</vcpu>
    <type arch='x86_64' machine='pc-i440fx-3.0'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/ovmf/x64/OVMF_CODE.fd</loader>
    <boot dev='hd'/>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
    <vmport state='off'/>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <timer name='hypervclock' present='yes'/>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
   <disk type='file' device='disk'>
     <driver name='qemu' type='qcow2'/>
     <source file='/var/lib/libvirt/images/win10.qcow2'/>
     <target dev='hda' bus='ide'/>
     <address type='drive' controller='0' bus='0' target='0' unit='0'/>
   <disk type='file' device='cdrom'>
     <driver name='qemu' type='raw'/>
     <target dev='hdb' bus='ide'/>
     <address type='drive' controller='0' bus='0' target='0' unit='1'/>
   <controller type='usb' index='0' model='ich9-ehci1'>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
   <controller type='usb' index='0' model='ich9-uhci1'>
     <master startport='0'/>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
   <controller type='usb' index='0' model='ich9-uhci2'>
     <master startport='2'/>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
   <controller type='usb' index='0' model='ich9-uhci3'>
     <master startport='4'/>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
   <controller type='pci' index='0' model='pci-root'/>
   <controller type='ide' index='0'>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
   <controller type='virtio-serial' index='0'>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
   <interface type='network'>
     <mac address='52:54:00:2e:c8:e1'/>
     <source network='default'/>
     <model type='rtl8139'/>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
   <serial type='pty'>
     <target type='isa-serial' port='0'>
       <model name='isa-serial'/>
   <console type='pty'>
     <target type='serial' port='0'/>
   <channel type='spicevmc'>
     <target type='virtio' name='com.redhat.spice.0'/>
     <address type='virtio-serial' controller='0' bus='0' port='1'/>
   <input type='tablet' bus='usb'>
     <address type='usb' bus='0' port='1'/>
   <input type='mouse' bus='ps2'/>
   <input type='keyboard' bus='ps2'/>
   <graphics type='spice' autoport='yes'>
     <listen type='address'/>
     <image compression='off'/>
   <sound model='ich6'>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
   <redirdev bus='usb' type='spicevmc'>
     <address type='usb' bus='0' port='2'/>
   <redirdev bus='usb' type='spicevmc'>
     <address type='usb' bus='0' port='3'/>
   <memballoon model='virtio'>
     <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>

Windows 10 1803 has had some issues in kmv, especially on amd cpus.
This thread might help-

It’s main suggestions are not to use host-passthrough on the CPU and to use options kvm ignore_msrs=1 in modprobe.d

1 Like

Shouldn’t your emulator be qemu-kvm:


Shouldnt video be virtio with acceleration(with opengl disabled):

    <model type='virtio' heads='1' primary='yes'>       
      <acceleration accel3d='yes'/>

I just had to set my CPU to core2 to get windows 10 1803 to install in KVM on my 2700x.

Okay, now I’ve tried to use “options kvm ignore_msrs=1” in modprobe.d, I changed the video to virtio with accelleration, and I set the CPU to core2duo. And I actually got further!
First it stuck about 10 mins at this:

and after that I get this screen:

I can’t set the emulator to qemu-kvm, it doesn’t exist, only “qemu-system-x86_64”.

they you are not running pure KVM virtualization. If you have installed everything correctly and its still not “QEMU/KVM” I m 1000% sure you didn’t enable virtualization in bios. FOR AMD, (in uefi) its under CSM, Enable that and IOMMU too.

Also why are you setting it “core2duo” when you have Ryzen 7. Yes, i know “zen” is not on the list there. Try “hypervisor default” ? worked for me. Try tweaking things.

I think its a bug with windows 10 build 1803, or the way that KVM/QEMU works with that particular build.

It’s a problem specific to 1803, if you leave it set to “copy host cpu configuration” the installer craps out with the (typical, totally craptastic) “something went wrong” error.

Sandybridge also works, which is what i have my VM set to now.

Other wIndows builds leaving at default the cpu shows up as epyc within the guest but this doesn’t work with 1803.

Alright, I have set it to “Hypervisor Default”, and it gets just as far as before. I set it to core2duo, because @thro suggested it.

I was pretty sure I enabled it, but I double checked:

This should be okay, right? I don’t have something called “CSM”, but under “SVM Mode” it says, that SVM is for virtualization.

Do you have a link on how to install everything correctly? I just installed

I tried setting the CPU to “EPYC” and then it worked, but only for one boot, next reboot it wasn’t working again.

I got it working again, I first set the CPU to “kvm64” then to “qemu64” and then back to “EPYC” and now it starts for some reason…

1 Like

Oh my god… the installed version was corrupted or something, no Network driver, no Internet Explorer / Edge, no default Wallpaper and my Username was “defaultuser0”. I just installed Windows again, and it’s back to the “OOBEWELCOME” error.