I've followed the famous "vfio tips and tricks" blog up until the 4th installment, which is distro specific.
My VM is able to recognize my GPU, I believe the problem is that my GPU /IS/ able to recognize my VM, as per: http://vfio.blogspot.com/2014/08/vfiovga-faq.html (see question 10).
I cannot manually set a vmid.conf that invokes kvm as is suggested by the FAQ (e.g. I cannot use 440 chipset, and the hyper_v extensions are always included, but should not be) but based on "qm showcmd 100" I'm trying to manually generate a working command, and work backwards from there. What I have now is:
Unless I misread the FAQ, the -cpu argument should be enough to hide KVM from nvidia.
Before the nvidia driver has a chance to detect it is in a vm however, I still don't see the BIOS splash screen on the GPU's display. This makes me wonder if there is not a secondary problem.
I've read that I should turn -vga to none, however, due to a bug in Proxmox, the OVMF bios does not persist between boots, so I must manually set the boot device each time, and I need a screen to do that.
There is a mailing list for vfio, and the guy who maintains the "tips and tricks" blog made some suggestions:
1) Use OVMF.
So I created a new VM as such.
2) Use pc, not q35
This appears to not be supported in proxmox, despite what the vm.conf manpage says. I think I'm missing a config file for the platform.
3) Avoid using emulated GPU.
Unfortunately, if I turn video off I cannot get into windows, as OVMF bios forgets boot order and goes to shell. Still, as I mentioned above, I feel like I should see the OVMF splash screen anyway.
Any help is much appreciated.
Here is my vm.conf:
Thanks in advance
My VM is able to recognize my GPU, I believe the problem is that my GPU /IS/ able to recognize my VM, as per: http://vfio.blogspot.com/2014/08/vfiovga-faq.html (see question 10).
I cannot manually set a vmid.conf that invokes kvm as is suggested by the FAQ (e.g. I cannot use 440 chipset, and the hyper_v extensions are always included, but should not be) but based on "qm showcmd 100" I'm trying to manually generate a working command, and work backwards from there. What I have now is:
/usr/bin/kvm -id 100 -chardev socket,id=qmp,path=/var/run/qemu-server/100.qmp,server,nowait \
-mon chardev=qmp,mode=control \
-pidfile /var/run/qemu-server/100.pid \
-daemonize \
-smbios type=1,uuid=96ca332e-4376-49de-b272-5dacc6f01335 \
-drive if=pflash,format=raw,readonly,file=/usr/share/kvm/OVMF-pure-efi.fd \
-drive if=pflash,format=raw,file=/tmp/100-OVMF_VARS-pure-efi.fd \
-name test \
-smp 8,sockets=1,cores=8,maxcpus=8 \
-nodefaults \
-boot menu=on,strict=on,reboot-timeout=1000 \
-vnc unix:/var/run/qemu-server/100.vnc,x509,password \
-no-hpet \
-cpu host,kvm=off,+kvm_pv_eoi,hv_vendor_id=Nvidia43FIX \
-m 8196 \
-k en-us \
-readconfig /usr/share/qemu-server/pve-q35.cfg \
-device usb-tablet,id=tablet,bus=ehci.0,port=1 \
-device vfio-pci,host=04:00.0,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-iscsi initiator-name=iqn.1993-08.org.debian:01:3f1e9afe6fdb \
-drive file=/dev/zvol/rpool/data/vm-100-disk-1,if=none,id=drive-virtio0,cache=unsafe,format=raw,aio=threads,detect-zeroes=on \
-device virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=200 \
-netdev type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on -device virtio-net-pci,mac=32:63:66:65:35:36,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 \
-vga std
-mon chardev=qmp,mode=control \
-pidfile /var/run/qemu-server/100.pid \
-daemonize \
-smbios type=1,uuid=96ca332e-4376-49de-b272-5dacc6f01335 \
-drive if=pflash,format=raw,readonly,file=/usr/share/kvm/OVMF-pure-efi.fd \
-drive if=pflash,format=raw,file=/tmp/100-OVMF_VARS-pure-efi.fd \
-name test \
-smp 8,sockets=1,cores=8,maxcpus=8 \
-nodefaults \
-boot menu=on,strict=on,reboot-timeout=1000 \
-vnc unix:/var/run/qemu-server/100.vnc,x509,password \
-no-hpet \
-cpu host,kvm=off,+kvm_pv_eoi,hv_vendor_id=Nvidia43FIX \
-m 8196 \
-k en-us \
-readconfig /usr/share/qemu-server/pve-q35.cfg \
-device usb-tablet,id=tablet,bus=ehci.0,port=1 \
-device vfio-pci,host=04:00.0,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
-iscsi initiator-name=iqn.1993-08.org.debian:01:3f1e9afe6fdb \
-drive file=/dev/zvol/rpool/data/vm-100-disk-1,if=none,id=drive-virtio0,cache=unsafe,format=raw,aio=threads,detect-zeroes=on \
-device virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=200 \
-netdev type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on -device virtio-net-pci,mac=32:63:66:65:35:36,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 \
-vga std
Unless I misread the FAQ, the -cpu argument should be enough to hide KVM from nvidia.
Before the nvidia driver has a chance to detect it is in a vm however, I still don't see the BIOS splash screen on the GPU's display. This makes me wonder if there is not a secondary problem.
I've read that I should turn -vga to none, however, due to a bug in Proxmox, the OVMF bios does not persist between boots, so I must manually set the boot device each time, and I need a screen to do that.
There is a mailing list for vfio, and the guy who maintains the "tips and tricks" blog made some suggestions:
1) Use OVMF.
So I created a new VM as such.
2) Use pc, not q35
This appears to not be supported in proxmox, despite what the vm.conf manpage says. I think I'm missing a config file for the platform.
3) Avoid using emulated GPU.
Unfortunately, if I turn video off I cannot get into windows, as OVMF bios forgets boot order and goes to shell. Still, as I mentioned above, I feel like I should see the OVMF splash screen anyway.
Any help is much appreciated.
Here is my vm.conf:
Code:
#hostpci1%3A 04%3A00.1,pcie=1,x-vga=on
#hostpci2%3A 05%3A00.0,pcie=1,x-vga=on
#hostpci3%3A 05%3A00.1,pcie=1,x-vga=on
bios: ovmf
boot: dcn
bootdisk: virtio0
cores: 8
cpu: host
hostpci0: 04:00.0,pcie=1
machine: q35
#machine: pc
memory: 8196
name: test
net0: virtio=32:63:66:65:35:36,bridge=vmbr0
numa: 0
ostype: win8
smbios1: uuid=96ca332e-4376-49de-b272-5dacc6f01335
sockets: 1
vga: std
virtio0: local-zfs:vm-100-disk-1,cache=unsafe,size=120G
Thanks in advance