Jump to content

Unable to pass through gtx1080 to Windows 10 VM


Recommended Posts

Posted

Hi everyone,

 

I've hit the point where I've watched every tutorial and tried to tweak every variable to the point that I'm kind of at a loss as to why my VM won't display graphics.  My current build is a R5 1600, GTX 1080 MSI Armor OC 8gb, 16gb Ram (2x8gb ddr4 3200mhz), Asus ROG strix Gaming-F Mobo X370 chipset.

 

I have currently done the following:

 

  1. Enabled HVM and IOMMU
  2. Checked that my GPU has its own mmy group which it does:
    1. IOMMU group 13:[10de:1b80] 09:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1080] (rev a1)

      [10de:10f0] 09:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)

  3. Made sure that the sound and graphics are on the same slot by enabling 'multifunction' and editing the xml

  4. Downloaded and edited (Removed nvidia header) both the latest and the original bios for my exact model of card (GTX 1080 MSI Armor OC 8gb)

  5. Changed to Legacy mode for unraid (Previously was in UEFI)

  6. Can't seem to change Hyper V from enabled to disabled although I believe this issue had been resloved with Nvidia GPUS?

 

Previously I was getting the 'unable to mmap' error in my log however after enabling multifunction this wasn't coming up anymore.

 

This is a copy of my latest log using machine: i440fx-4.2 (Tried q35 with no luck) :

Quote


-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=33,server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=localtime \
-no-hpet \
-no-shutdown \
-boot strict=on \
-device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x7.0x7 \
-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x7 \
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x7.0x1 \
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x7.0x2 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 \
-blockdev '{"driver":"file","filename":"/mnt/user/domains/Windows 10 (Hardware Passthrough)/vdisk1.img","node-name":"libvirt-3-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-3-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"raw","file":"libvirt-3-storage"}' \
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=libvirt-3-format,id=virtio-disk2,bootindex=1,write-cache=on \
-blockdev '{"driver":"file","filename":"/mnt/user/isos/Windows.iso","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-2-format","read-only":true,"driver":"raw","file":"libvirt-2-storage"}' \
-device ide-cd,bus=ide.0,unit=0,drive=libvirt-2-format,id=ide0-0-0,bootindex=2 \
-blockdev '{"driver":"file","filename":"/mnt/user/isos/virtio-win-0.1.173-2.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \
-device ide-cd,bus=ide.0,unit=1,drive=libvirt-1-format,id=ide0-0-1 \
-netdev tap,fd=35,id=hostnet0,vhost=on,vhostfd=36 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:c5:8a:2c,bus=pci.0,addr=0x2 \
-chardev pty,id=charserial0 \
-device isa-serial,chardev=charserial0,id=serial0 \
-chardev socket,id=charchannel0,fd=37,server,nowait \
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 \
-device usb-tablet,id=input0,bus=usb.0,port=1 \
-device 'vfio-pci,host=0000:09:00.0,id=hostdev0,bus=pci.0,multifunction=on,addr=0x5,romfile=/mnt/user/Virtual_Systems/V Bios/MSI.GTX1080.V.BIOS.LATEST.rom' \
-device vfio-pci,host=0000:09:00.1,id=hostdev1,bus=pci.0,addr=0x5.0x1 \
-device usb-host,hostbus=1,hostaddr=3,id=hostdev2,bus=usb.0,port=2 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
2020-05-17 04:24:56.210+0000: Domain id=11 is tainted: high-privileges
2020-05-17 04:24:56.210+0000: Domain id=11 is tainted: host-cpu
char device redirected to /dev/pts/0 (label charserial0)
2020-05-17T04:29:27.515589Z qemu-system-x86_64: terminating on signal 15 from pid 13839 (/usr/sbin/libvirtd)
2020-05-17 04:29:29.319+0000: shutting down, reason=destroyed

 

I'm fairly new to editing XML documents and interpreting LOGS so I was hoping someone could perhaps point me in the right direction or point out something really obvious that I may have missed.

 

Thanks in advance, I'm really enjoying my first week with Unraid and looking forward to getting my VM working properly

Posted

Are you able to remote in to your vm? Did you install something like  splashtop or teamviewer after os install and before you added the GPU? If yes, what is the status of the gpu in device manager inside the vm?

 

if no, I’d suggest removing the gpu from the vm and changing back to vnc. Then install splashtop and ensure that’s working. Then, add the gpu back in and try to get some visibility on what’s going on.

 

of course, splashtop will only be useful if the system is booting to desktop. You’ll need to use netplwiz in the vm when youre in vnc mode to allow auto-logon. You don’t want the system to be sitting at a logon screen that you cannot see.

 

a further wrinkle would be if the system has a boot error. If this happens, Windows will go into recovery mode, but you won’t be able to see that. I’ve found it useful in the past to install virt-manager docker. This allowed me easily add a temp. vnc display alongside the gpu to observe the boot process but without all the pfaffing around I’d have to do using unRAID UI which destroys some xml customizations. Virt-manager is non destructive, so that becomes less irksome when your swapping devices in and out.

 

good luck.

Posted

Thanks for the tip, I was unable to get splashtop to initialise but I have a fix that has worked for me. I ended up putting the gpu in the second slot and putting a 750ti in the first slot. 

 

I then created a new vm with standard settings (no xml tweaks or vbios) and boom, worked immediately. All drivers working great and no issues at all. I've tried both i440fx and q35 with no problems at all. I plan on passing through a USB controller also as it's requiring me to have the same usb devices connect in order to startup unless I edit the xml. 

 

Thanks for you help and I plan on seeing if I can get the 750ti in the primary slot to work with passthrough now that I at least know I have a workaround. 

 

 

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.

×
×
  • Create New...