NVIDIA vGPU software graphics driver fails to load on KVM-based hypervsiors
Description
The NVIDIA vGPU software graphics driver fails to load on hypervsiors based on Linux with KVM. This issue affects UEFI VMs configured with a vGPU or pass-through GPU that requires a large BAR address space. This issue does not affect VMs that are booted in legacy BIOS mode. The issue occurs because BAR resources are not mapped into the VM.
On a Windows VM, error code 12 is reported in Device Manager for the vGPU or pass-through GPU.
Workaround
- In virsh, open for editing the XML document of the VM to which the vGPU or GPU is assigned.
# virsh edit vm-name
- vm-name
- The name of the VM to which the vGPU or GPU is assigned.
- Declare the custom libvirt XML namespace that supports command-line pass through of QEMU arguments.
Declare this namesapce by modifying the start tag of the top-level
domain
element in the first line of the XML document.<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
- At the end of the XML document, between the
</devices>
end tag and the</domain>
end tag, add the highlightedqemu
elements.These elements pass the QEMU arguments for mapping the required BAR resources into the VM, setting the MMIO aperture size to 262144. If necessary, replace the value of 262144 with the MMIO aperture size that your VM requires.
</devices> <qemu:commandline> <qemu:arg value='-fw_cfg'/> <qemu:arg value='opt/ovmf/X-PciMmio64Mb,string=262144'/> </qemu:commandline> </domain>
- Start the VM to which the vGPU or GPU is assigned.
# virsh start vm-name
- vm-name
- The name of the VM to which the vGPU or GPU is assigned.
Status
Not an NVIDIA bug
Ref. #
200719557