Windows 10 VM GPU Passthrough - not accessible after vbios is set


Recommended Posts

Hi!

 

I'm currently working on a Windows 10 VM. All is setup and I can connect through VNC. After passing through my NVIDIA GeForce GTX 1070 without vbios I could still connect through splashtop. I was however getting the error 43.

 

Got various vbioses to test out. Removed the nvidia header with hex. Now the vm starts up but I cannot connect through splashtop anymore? Still no image on display...

 

  1. Hyper-v set off (but seems to be turning on again after update?)
  2. Sound from graphics card added
  3. Vbios set
  4. Sound and videocard both from same slot with different functions

 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='9'>
  <name>Gaming - Windows 10</name>
  <uuid>dedd3deb-506d-1834-59d6-54b0eeae021a</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>6</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='1'/>
    <vcpupin vcpu='1' cpuset='5'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='6'/>
    <vcpupin vcpu='4' cpuset='3'/>
    <vcpupin vcpu='5' cpuset='7'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-4.2'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/dedd3deb-506d-1834-59d6-54b0eeae021a_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='off'/>
      <vapic state='off'/>
      <spinlocks state='off'/>
    </hyperv>
    <kvm>
      <hidden state='on'/>
    </kvm>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='3' threads='2'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='no'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Gaming - Windows 10/vdisk1.img' index='3'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/Win10_1909_Dutch_x64.iso' index='2'/>
      <backingStore/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <boot order='2'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/virtio-win-0.1.173-2.iso' index='1'/>
      <backingStore/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <alias name='ide0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:e6:2b:61'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/2'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/2'>
      <source path='/dev/pts/2'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-9-Gaming - Windows 10/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
      <address type='usb' bus='0' port='3'/>
    </input>
    <input type='mouse' bus='ps2'>
      <alias name='input1'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input2'/>
    </input>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <rom file='/mnt/user/virtualsystems/vbios/MSI.GTX1070.8192.160602_1.rom'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
      </source>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc332'/>
        <address bus='1' device='3'/>
      </source>
      <alias name='hostdev2'/>
      <address type='usb' bus='0' port='1'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x1b1c'/>
        <product id='0x1b15'/>
        <address bus='1' device='2'/>
      </source>
      <alias name='hostdev3'/>
      <address type='usb' bus='0' port='2'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+0:+100</label>
    <imagelabel>+0:+100</imagelabel>
  </seclabel>
</domain>

 

tower-diagnostics-20200325-0839.zip

Link to comment

First and foremost, trying different downloaded vbios' to see what sticks doesn't really work.

If you are not 100% sure the vbios you downloaded is the right one, it's better to NOT use vbios instead of using the wrong one.

 

Next, if you want to change Hyper-V state, you need to create a new template. Turning it to off in the GUI doesn't really work.

Not that you should turn it off.

Turning Hyper-V off was old advice before vendor_id tweak became a thing.

 

Also from my experience multifunction tweak works better with Q35 machine type (so not i440fx).

 

So let's start from the beginning.

 

(Optional): turn on Remote Desktop Protocol in your Windows VM if possible. I prefer using RDP to do diagnostics because if RDP doesn't work then I know for sure Windows hasn't booted (and not some other issues with 3rd-party software).

 

Edit your current template using the GUI, remove the vbios setting and save.

This should return your template to an untweaked state which is easier to help.

Please attach the resulting xml on your next response (so everyone is on the same page as to what state your VM is at).

 

Then, your 7700K has an iGPU so first thing is to try making Unraid boot with the iGPU (i.e. leave the 1070 alone).

Reboot your server to BIOS -> Advanced -> Chipset Configuration -> Primary Graphics Adapter -> can you choose the iGPU?

While you are in the BIOS, Tools -> Boot Manager -> make sure your USB stick non-UEFI is the default / first boot device. This is legacy mode boot which improves your chance of passing through the primary GPU.

 

If you can pick the iGPU in the primary graphics adapter setting, connect your monitor to the motherboard display output and see if Unraid boots with the iGPU.

If successful then dump your own vbios of the 1070 (and do any required edit per SpaceInvader One tutorial) but don't use it yet.

 

Report back what happens.

It is possible that you can start the VM with the GPU passed through now without any further tweak.

Edited by testdasi
Link to comment

Thank you for your reply!

 

Tried to change the settings in my bios. Switched to iGPU. Now when I try to boot from USB I get the screen below which freezes. Cant drag mouse or click anything. Could this be caused by the switch to iGPU? I'm using a ASRock Z270M Pro4.

 

 

photo_2020-03-27 12.34.13.jpeg

Link to comment

No that isn't due to the switch to iGPU.

 

That is the AsRock Boot Manager. Go into your BIOS and select the USB stick as the default device and it should boot automatically to the boot device.

Failing that, your keyboard should still work presumably? just press enter to select.

Edited by testdasi
Link to comment

Oooooooh you are the best!!!! USB boot was not working in legacy so I tried UEFI. All seems fine without adding any vbios. GPU works in Windows VM now. Thank you so much!!!!

 

Passing through the iGPU seems to have done the trick.

Edited by pimmesz
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.