kvm gpu passthrough windows vm

same results with catalyst and also kernel 3.14 built with vfio and vfio-vga....

Only one thing to try:

Install windows vm

Disabling(not uninstall) gpu adapter so windows recognize gpu

Install catalyst

Hope this works...

Got these info from archlinux thread...

Nevertheless, today will get my gtx 750 TI Twin Frzr and I'll give it a try despite I'm a loyal AMD guy


no results...

tried also newer kernels with i915 arbiter patch(3.14) but nothing...

seabios screen(thanks to i915 patch) ==> windows logo ==> bsod 0x00000000016 atikmpag.sys.

Tried reinstalling driver, reinstalling vm,passing only video with no audio but nothing...

Now I'm going to try 3.16 and latest mainline kernel then I'm off to nvidia...
 
Well in the end gtx 750 ti did the trick. Perfect streaming stability and noise. AMD fail... I'm tempted to not sell the r9 270 in case newest kernel can boot with this beast


Inviato dal mio iPhone utilizzando Tapatalk
 
I've been able to get this working with an NVIDIA GTX 750 Ti card using driver version 344.75 (newer versions inconsistently cause Code 43 Errors) by using the following setup:

Install pve-kernel-3.10.0-5-pve

Add to /etc/modules:
pci_stub
vfio
vfio_iommu_type1
vfio_pci
kvm
kvm_intel

Add the following options to /etc/default/grub on the GRUB_CMDLINE_LINUX_DEFAULT line:
intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 rootdelay=10 scsi_mod.scan=sync

Run: update-grub

Add the following to /etc/initramfs-tools/modules (find the PCI stub IDs for your card by running lspci -nn | grep NVIDIA):

pci_stub ids=10de:0f02,10de:0bea

Run: update-initramfs -u and then reboot into the new kernel.


Boot into the VM using the Proxmox web interface, and install the OS (I had better luck with Windows 8.1 - can't remember specifics though).

Add the following options to /etc/pve/host/qemu-server/vmid.conf (get the PCI address from lspci command, and I added the USB device address for my Avocent KVM DSRIQ USB module, you can do the same for a physical keyboard and mouse):

hostpci0: 05:00,x-vga=on,pcie=1,driver=vfio
machine: q35
usb0: host=0624:0307



Update: as per evilsephiroth's suggestion, the easiest way to achieve all this is to simply change the VM's OS type to 'other'. Thanks evilsephiroth!

I need to run a custom KVM start command to remove the following two options (I believe there is some performance impact to doing so), which broke the later NVIDIA drivers:

hv_spinlocks=0xffff,hv_relaxed

To do this, I ran the VM from the Proxmox web interface, and ran:

ps aux|grep <vmid>

Copy the KVM command and paste it into a shell script, and remove the two options above. chmod +x the script, then run from command line. Mine looks like this:

/usr/bin/kvm -id 175 -chardev socket,id=qmp,path=/var/run/qemu-server/175.qmp,server,nowait -mon chardev=qmp,mode=control -vnc unix:/var/run/qemu-server/175.vnc,x509,password -pidfile /var/run/qemu-server/175.pid -daemonize -smbios type=1,uuid=f1638e3b-a992-4455-9269-d378445383f6 -name gputest -smp sockets=1,cores=4 -nodefaults -boot menu=on -vga none -no-hpet -cpu host,kvm=off,+x2apic -k en-us -m 16384 -readconfig /usr/share/qemu-server/pve-q35.cfg -device usb-tablet,id=tablet,bus=ehci.0,port=1 -device vfio-pci,host=05:00.0,id=hostpci0.0,bus=ich9-pcie-port-1,addr=0x0.0,x-vga=on,multifunction=on -device vfio-pci,host=05:00.1,id=hostpci0.1,bus=ich9-pcie-port-1,addr=0x0.1 -device usb-host,vendorid=0x0624,productid=0x0307 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -iscsi initiator-name=iqn.1993-08.org.debian:01:c0f2af6cce1 -drive if=none,id=drive-ide2,media=cdrom,aio=native -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200 -drive file=/var/lib/vz/images/175/vm-175-disk-1.qcow2,if=none,id=drive-virtio0,format=qcow2,aio=native,cache=none,detect-zeroes=on -device virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=100 -netdev type=tap,id=net0,ifname=tap175i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on -device virtio-net-pci,mac=36:E5:2E:84:34:9D,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300 -rtc driftfix=slew,base=localtime -machine type=q35 -global kvm-pit.lost_tick_policy=discard

You can now attach a monitor to the graphics card, boot up the machine, and install the NVIDIA drivers. I also installed VB-Audio Virtual Cable http://vb-audio.pagesperso-orange.fr/Cable/ which provided virtual speakers. I mainly intend to use this machine for Steam in home streaming, so there is only a KVM device attached to the VGA port.

Update: this is no longer needed!

Does anyone know if it's possible to remove those two KVM options through the vmid.conf? It would be more convenient to load the VM through the web interface. Nevertheless, very happy to have this running! I hope this is helpful for others trying to get this working.

Much credit due to the following forum posts:
http://www.pugetsystems.com/labs/articles/Multiheaded-NVIDIA-Gaming-using-Ubuntu-14-04-KVM-585/
https://bbs.archlinux.org/viewtopic.php?id=162768
 
Last edited:
I've been able to get this working with an NVIDIA GTX 750 Ti card using the latest 347.52 drivers by using the following setup:

Install pve-kernel-3.10.0-5-pve

Add to /etc/modules:


Add the following options to /etc/default/grub on the GRUB_CMDLINE_LINUX_DEFAULT line:


Run: update-grub

Add the following to /etc/initramfs-tools/modules (find the PCI stub IDs for your card by running lspci -nn | grep NVIDIA):



Run: update-initramfs -u and then reboot into the new kernel.


Boot into the VM using the Proxmox web interface, and install the OS (I had better luck with Windows 8.1 - can't remember specifics though).

Add the following options to /etc/pve/host/qemu-server/vmid.conf (get the PCI address from lspci command, and I added the USB device address for my Avocent KVM DSRIQ USB module, you can do the same for a physical keyboard and mouse):



I need to run a custom KVM start command to remove the following two options (I believe there is some performance impact to doing so), which broke the later NVIDIA drivers:



To do this, I ran the VM from the Proxmox web interface, and ran:



Copy the KVM command and paste it into a shell script, and remove the two options above. chmod +x the script, then run from command line. Mine looks like this:



You can now attach a monitor to the graphics card, boot up the machine, and install the NVIDIA drivers. I also installed VB-Audio Virtual Cable http://vb-audio.pagesperso-orange.fr/Cable/ which provided virtual speakers. I mainly intend to use this machine for Steam in home streaming, so there is only a KVM device attached to the VGA port.

Does anyone know if it's possible to remove those two KVM options through the vmid.conf? It would be more convenient to load the VM through the web interface. Nevertheless, very happy to have this running! I hope this is helpful for others trying to get this working.

Much credit due to the following forum posts:
http://www.pugetsystems.com/labs/articles/Multiheaded-NVIDIA-Gaming-using-Ubuntu-14-04-KVM-585/
https://bbs.archlinux.org/viewtopic.php?id=162768

Thanks for the report !

Can I take your infos and put them in the wiki ?

I'll make a patch to remove hyperv enlightments (spinlock,relaxed) with x-vga=on
 
Thanks for the report !

Can I take your infos and put them in the wiki ?

I'll make a patch to remove hyperv enlightments (spinlock,relaxed) with x-vga=on

Absolutely! The patch would be great! Let me know if I can help to test.
 
Well,I did solve changing os type to other, thus removing hyper-v enlightments...


Sent from my iPhone using Tapatalk

Wouldn't have even thought of that... worked perfectly! Thanks.

I also wanted to mention I had to revert to 344.75 NVIDIA drivers - newer drivers seem to be inconsistent.
 
Wouldn't have even thought of that... worked perfectly! Thanks.

I also wanted to mention I had to revert to 344.75 NVIDIA drivers - newer drivers seem to be inconsistent.

Same driver here...
Hadn't thought of virtual speakers.

I was using an usb audio card...
I'll try and eventually remove usb card and pass through for it


Sent from my iPhone using Tapatalk
 
Absolutely! The patch would be great! Let me know if I can help to test.

What are your specs?


proxmox server and windows vm ?
I've having a lot of problem with steam streaming with audio loss.
Streaming starts and after 30 seconds gets cracked and finally silent.

Server: i5 3570
12Gb ram

Windows VM:
8gb fixed memory
4 cores assigned
gtx 750ti passed through
virtual audio device
8bit 48000khz

Client: intel nuc i3

Other vm:

Ubuntu 1 -
2gb ram
1 core
Handles nfs shares with lvm 3x4tb hard disks passed through

Ubuntu 2 -
2gb ram
1 core
Handles dvb-s. Pci-express dvb-s Satellite card passed through with installed VDR software.
 

I apologize - I only just saw this. I had moved to ESXi with an AMD R9 290 which worked very well - Nvidia has effectively rendered their newest drivers useless for passthrough. I'm now running Proxmox 4.0 Beta 1, and one change was that I needed to set cpu to host to make it work (BSOD without that set). Performance is good though I am still troubleshooting some stuttering in GTA5. My server specs are as follows:

Xeon 12 core/24 thread 30MB L2 cache @ 2.8ghz (Engineering Sample, so no specific model number)
96GB DDR4 RAM
OS running on OCZ Vertex 120GB SSD
Running gaming VM from a separate SSD

Gaming VM has 12 total cores assigned, and 32GB RAM.

The client PC is an Intel NUC with an i5 processor. I've never had any luck with Wi-Fi for streaming, and am currently using powerline ethernet adapters until I get a chance to run a physical CAT5/6 cable.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!