Skip to content

This vdsm hook sets the vendor_id and hides kvm from the guest, allowing GPU passthrough to work.

License

Notifications You must be signed in to change notification settings

sixdrum/ovirt_gpu_passthrough_hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

gpu passthrough vdsm hook

oVirt VDSM Hook for passing through GPU

Installation:

  • Use engine-config to create a custom property:
sudo engine-config -s "UserDefinedVMProperties=gpupassthrough=^(true|false)$"
  • To confirm that the property was added:
sudo engine-config -g UserDefinedVMProperties
  • Restart the engine:
sudo systemctl restart ovirt-engine
  • Place 99_gpu_passthrough in /usr/libexec/vdsm/hooks/before_vm_start:
sudo cp 99_gpu_passthrough /usr/libexec/vdsm/hooks/before_vm_start
sudo chmod +x /usr/libexec/vdsm/hooks/before_vm_start/99_gpu_passthrough

Usage: Edit the VM, add the following custom property to hide kvm from the VM and add a vendor id:

gpupassthrough=true

Details: This adds the following entries to the guest XML:

  <features>
    ...
    <hyperv>
      ...
      <vendor_id state='on' value='whatever'/>
    </hyperv>
    ...
    <kvm>
      <hidden state='on'/>
    </kvm>
  </features>

Adapted from this thread: https://www.mail-archive.com/users@ovirt.org/msg40377.html

Thanks, Martin!

About

This vdsm hook sets the vendor_id and hides kvm from the guest, allowing GPU passthrough to work.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages