You are not logged in.

#1 2019-07-17 15:28:22

Blind
Member
From: Desert mountain
Registered: 2005-02-06
Posts: 386

QEMU and Windows 10 r17763

Hi,

I have been having severe issues with running an updated Windows 10 in QEMU/KVM. I have been stably running for at least 1.5 years, and this has stopped working once I updated Windows 10 recently. I was also not able to make a freshly installed Windows 10 system work anymore, also after I have installed the latest virtio drivers on Windows. I had to switch to VirtualBox, where everything runs really nicely.
In QEMU I get BSODs with 'KMODE EXCEPTION NOT HANDLED'. Googling shows this might be related to driver issues. Since the only drivers that I installed are the virtio drivers virtstor, qxldod, kvmnet and the serial thing (forgot what it is called), I have my suspicion that the newest Windows update somehow kills the compatibility with those drivers.

Anyone experiencing something similar? Or have found some references I can read?

Thanks in advance! Here is how I run this:

#!/bin/bash

# QEMU name and PID
OPTS="-name Windows"

# Processor
OPTS="$OPTS -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time"
OPTS="$OPTS -smp 2,sockets=1,cores=2,threads=1"
OPTS="$OPTS -enable-kvm"
OPTS="$OPTS -device intel-iommu"

# Machine
OPTS="$OPTS -machine type=q35,accel=kvm"

# Memory
OPTS="$OPTS -m 4G"
OPTS="$OPTS -mem-path /dev/hugepages"
OPTS="$OPTS -mem-prealloc"
OPTS="$OPTS -device virtio-balloon"

# Hardware clock
OPTS="$OPTS -rtc clock=host,base=utc"

# Sound hardware
#QEMU_PA_SAMPLES=128
#export QEMU_AUDIO_DRV=pa
#OPTS="$OPTS -soundhw hda"

# PCI passthrough (?)
#OPTS="$OPTS -device vfio-pci,host=03:00.0"

# Keyboard layout
OPTS="$OPTS -k en-us"

# Boot priority
OPTS="$OPTS -boot order=c"

# System drive
OPTS="$OPTS -drive id=disk0,if=none,format=qcow2,file=/home/user/vm/win/windows.img"
OPTS="$OPTS -device driver=virtio-blk-pci,drive=disk0"

# Virtio driver
OPTS="$OPTS -drive id=virtiocd,if=none,readonly,format=raw,file=/usr/share/virtio/virtio-win.iso"
OPTS="$OPTS -device driver=ide-cd,bus=ide.0,unit=0,drive=virtiocd"

# Windows 10 installer
OPTS="$OPTS -drive id=cd0,if=none,readonly,format=raw,file=/home/user/install/Windows/Win_10.iso"
OPTS="$OPTS -device driver=ide-cd,bus=ide.1,unit=0,drive=cd0"

# Enable USB
OPTS="$OPTS -usb"
# A USB tablet device in the guest allows for accurate pointer tracking
# between the host and the guest.
OPTS="$OPTS -device usb-tablet"

# USB passthrough
# for USB stick...watch bus/addr with lsusb (also see below)
#OPTS="$OPTS -device nec-usb-xhci,id=xhci"
#OPTS="$OPTS -device usb-host,bus=xhci.0,vendorid=0x0781,productid=0x5598"

# Network
#OPTS="$OPTS -netdev user,id=lan,net=10.0.3.0/24,restrict=off -device driver=virtio-net-pci,netdev=lan"
OPTS="$OPTS -netdev user,id=samba,net=10.0.2.0/24,smb=/home/user/,restrict=off -device driver=virtio-net-pci,netdev=samba"

# QEMU accepts various commands and queries from the user on the monitor
# interface. Connect the monitor with the qemu process's standard input and
# output.
#OPTS="$OPTS -monitor stdio"
#OPTS="$OPTS -monitor none"
# This allows to send a command like
# $ telnet 127.0.0.1 55555
# $ system_powerdown
OPTS="$OPTS -monitor telnet:127.0.0.1:55555,server,nowait"

# Disable display
OPTS="$OPTS -vga none"
OPTS="$OPTS -device qxl-vga,vgamem_mb=32"
OPTS="$OPTS -display none"
#OPTS="$OPTS -serial null"
#OPTS="$OPTS -parallel null"
OPTS="$OPTS -daemonize"

# SPICE setup
OPTS="$OPTS -device virtio-serial-pci"
OPTS="$OPTS -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0"
OPTS="$OPTS -chardev spicevmc,id=spicechannel0,name=vdagent"
OPTS="$OPTS -spice unix,addr=/tmp/vm_spice.socket,disable-ticketing"

# USB SPICE redirection
OPTS="$OPTS -device nec-usb-xhci,id=usb"
OPTS="$OPTS -chardev spicevmc,name=usbredir,id=usbredirchardev1"
OPTS="$OPTS -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1"
OPTS="$OPTS -chardev spicevmc,name=usbredir,id=usbredirchardev2"
OPTS="$OPTS -device usb-redir,chardev=usbredirchardev2,id=usbredirdev2"
OPTS="$OPTS -chardev spicevmc,name=usbredir,id=usbredirchardev3"
OPTS="$OPTS -device usb-redir,chardev=usbredirchardev3,id=usbredirdev3"

# Run the VM
taskset -c 1,3 /usr/bin/qemu-system-x86_64 $OPTS

# Run spicy
spicy \
  --uri="spice+unix:///tmp/vm_spice.socket" \
  --title="Windows 10" \
  --spice-disable-audio

EDIT: typos

Last edited by Blind (2019-07-17 15:52:26)

Offline

#2 2019-07-18 10:43:49

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,919

Re: QEMU and Windows 10 r17763

https://bbs.archlinux.org/viewtopic.php?id=247692 suggests it may be kernel related.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2019-07-18 14:20:25

Blind
Member
From: Desert mountain
Registered: 2005-02-06
Posts: 386

Re: QEMU and Windows 10 r17763

Thank you - I missed that thread. Bummer.

Offline

Board footer

Powered by FluxBB