Score:0

Windows 10 VM guest OS boots to a blue screen after restarting the host

us flag

I used Ubuntu 20.04 as host and create a Windows 10 VM (21H1) in KVM (via the GUI). In the VM I pass my graphics card (RTX2070) and the whole group via PCI passthrough, which works thanks to various guides.

After I installed updates/drivers in the VM, the graka is also recognized. I can also install programs or restart the VM without any problems, but as soon as I restart the host (with the VM switched off), the Windows 10 VM boots into a blue screen (TDR Video Failure).

Here is my XML for the Windows 10 VM:

domain type="kvm">
  <name>win10</name>
  <uuid>39bd2708-4c4e-4ce4-8ef9-e8d322214990</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://microsoft.com/win/10"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory>8388608</memory>
  <currentMemory>8388608</currentMemory>
  <vcpu>4</vcpu>
  <os>
    <type arch="x86_64" machine="q35">hvm</type>
    <boot dev="hd"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
      <vendor_id state="on" value="1234567890ab"/>
    </hyperv>
    <kvm>
      <hidden state="on"/>
    </kvm>
    <vmport state="off"/>
  </features>
  <cpu mode="host-model"/>
  <clock offset="localtime">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
    <timer name="hypervclock" present="yes"/>
  </clock>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/var/lib/libvirt/images/win10.qcow2"/>
      <target dev="sda" bus="sata"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <source file="/home/bob/Downloads/Win10_21H1_German_x64.iso"/>
      <target dev="sdb" bus="sata"/>
      <readonly/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci" ports="15"/>
    <interface type="network">
      <source network="default"/>
      <mac address="52:54:00:35:be:e2"/>
      <model type="e1000e"/>
    </interface>
    <console type="pty"/>
    <channel type="spicevmc">
      <target type="virtio" name="com.redhat.spice.0"/>
    </channel>
    <graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
      <image compression="off"/>
    </graphics>
    <sound model="ich9"/>
    <video>
      <model type="qxl"/>
    </video>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0" bus="1" slot="0" function="0"/>
      </source>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0" bus="1" slot="0" function="1"/>
      </source>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0" bus="1" slot="0" function="2"/>
      </source>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0" bus="1" slot="0" function="3"/>
      </source>
    </hostdev>
    <redirdev bus="usb" type="spicevmc"/>
    <redirdev bus="usb" type="spicevmc"/>
  </devices>
</domain>

Results of kvm --version :

QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.17) 
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers

Results of lspci -knn | grep NVIDIA -A 2 :

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU106 [GeForce RTX 2070] [10de:1f02] (rev a1)
    Subsystem: NVIDIA Corporation TU106 [GeForce RTX 2070] [10de:12fe]
    Kernel driver in use: vfio-pci
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
01:00.1 Audio device [0403]: NVIDIA Corporation TU106 High Definition Audio Controller [10de:10f9] (rev a1)
    Subsystem: NVIDIA Corporation TU106 High Definition Audio Controller [10de:12fe]
    Kernel driver in use: vfio-pci
    Kernel modules: snd_hda_intel
01:00.2 USB controller [0c03]: NVIDIA Corporation TU106 USB 3.1 Host Controller [10de:1ada] (rev a1)
    Subsystem: NVIDIA Corporation TU106 USB 3.1 Host Controller [10de:12fe]
    Kernel driver in use: vfio-pci
    Kernel modules: xhci_pci
01:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU106 USB Type-C UCSI Controller [10de:1adb] (rev a1)
    Subsystem: NVIDIA Corporation TU106 USB Type-C UCSI Controller [10de:12fe]
    Kernel driver in use: vfio-pci
    Kernel modules: i2c_nvidia_gpu
ru flag
If you rebooted the host machine without properly shutting the guest VMs, the Bluescreen causes could be any of a thousand reasons without knowing more about your guest VMs. *However*, debugging the Windows Guest OS is *not* really on topic on Ask Ubuntu, especially if you haven't changed the hardware on the host or the guest VM hardware settings.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.