Desktop setup

This commit is contained in:
Jonathan Cremin 2020-04-29 21:51:12 +01:00
commit a7eaa7dbfb
14 changed files with 325 additions and 0 deletions

View file

@ -0,0 +1,13 @@
#!/bin/bash
## Load the config file
source "/etc/libvirt/hooks/kvm.conf"
## Load vfio
modprobe vfio
modprobe vfio_iommu_type1
modprobe vfio_pci
## Unbind gpu from nvidia and bind to vfio
virsh nodedev-detach $VIRSH_GPU_VIDEO
virsh nodedev-detach $VIRSH_GPU_AUDIO

View file

@ -0,0 +1,3 @@
## Virsh devices
VIRSH_GPU_VIDEO=pci_0000_0c_00_0
VIRSH_GPU_AUDIO=pci_0000_0c_00_1

View file

@ -0,0 +1,13 @@
#!/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