Created
August 1, 2022 07:32
-
-
Save 266-750Balloons/dbbbffd1aaaf16becba35a8032886562 to your computer and use it in GitHub Desktop.
my bind_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" | |
## Load vfio | |
sudo modprobe vfio | |
sudo modprobe vfio_iommu_type1 | |
sudo modprobe vfio_pci | |
## Unbind gpu from nvidia and bind to vfio | |
virsh nodedev-detach $VIRSH_GPU_VIDEO | |
virsh nodedev-detach $VIRSH_GPU_AUDIO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment