13 lines
280 B
Text
13 lines
280 B
Text
|
#!/bin/bash
|
||
|
|
||
|
## Load the config file
|
||
|
source "/etc/libvirt/hooks/kvm.conf"
|
||
|
|
||
|
## Unbind gpu from vfio and bind to nvidia
|
||
|
virsh nodedev-reattach $VIRSH_GPU_VIDEO
|
||
|
virsh nodedev-reattach $VIRSH_GPU_AUDIO
|
||
|
|
||
|
## Unload vfio
|
||
|
modprobe -r vfio_pci
|
||
|
modprobe -r vfio_iommu_type1
|
||
|
modprobe -r vfio
|