[vfio-users] GTX 770 & GTX 960 for multiple virtual systems

Alex Williamson alex.l.williamson at gmail.com
Wed Oct 28 20:20:56 UTC 2015


On Wed, Oct 28, 2015 at 2:09 PM, Alex Holst <a at mongers.org> wrote:

> I would appreciate hints on the following long-standing problem with
> getting two
> virtual gaming systems running so I can play games alongside my daughter:
>
> I have a Core i7 with two nVidia GPUs: GTX 770 and a newer GTX 960. When
> I invoke a virtual machine against the 960 head with the following
> script, the physical display inits, shows BIOS POST and the virtual guest
> boots:
>
> kvm -M q35 -m 8192 -cpu host,kvm=off \
>   -smp 4,sockets=1,cores=4,threads=1 \
>   -bios /usr/share/seabios/bios.bin -vga none \
>   -device
> ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
>   -device
> vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on \
>   -device vfio-pci,host=02:00.1,bus=root.1,addr=00.1 \
>   -device vfio-pci,host=00:1a.0,bus=pcie.0 \
>   -device vfio-pci,host=00:1d.0,bus=pcie.0 \
>   -nographic -boot menu=on /vm2/maya-pew.img
>
> When I create virtual gaming systems via libvirt, I can access the
> virtual console and do a full install via VNC, but the attached displays
> never init.
>
> How do I create create two virtual clients in virsh / virt-manager and
> see their attached physical displays doing a normal BIOS POST?
>

The obvious difference between your commandline version and the libvirt
version is that one uses x-vga=on and the other doesn't.  Without that, the
VM BIOS won't be able to post the card and whether it works in the guest OS
depends on its dependencies on the VGA address space.  I describe a method
for adding that x-vga=on option to a libvirt managed VM in part 5 of my
howto series:


http://vfio.blogspot.com/2015/05/vfio-gpu-how-to-series-part-5-vga-mode.html

The basic idea is to replace the <emulator> in your xml with a wrapper
script that dynamically inserts the x-vga=on option in the correct place
and exec's the real QEMU binary.  Of course given the newness of your
cards, a UEFI based VM using OVMF would eliminate the need for that option
at all.  Thanks,

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20151028/c1ff0984/attachment.htm>


More information about the vfio-users mailing list