Created
August 1, 2022 07:33
-
-
Save 266-750Balloons/383c3c330f819bd7d3bf57a893a03800 to your computer and use it in GitHub Desktop.
my unbind_vfio.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Load the config file | |
source "/etc/libvirt/hooks/kvm.conf" | |
## Unbind gpu from vfio and bind to amd | |
virsh nodedev-reattach $VIRSH_GPU_VIDEO | |
virsh nodedev-reattach $VIRSH_GPU_AUDIO | |
## Unload vfio | |
sudo modprobe -r vfio_pci | |
sudo modprobe -r vfio_iommu_type1 | |
sudo modprobe -r vfio |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment