Notes, scripts, XML files, and README

This commit is contained in:
2021-11-10 11:44:40 +00:00
parent 4fa8bb36e5
commit a08865d18c
12 changed files with 710 additions and 1 deletions

View File

@@ -0,0 +1,36 @@
#!/bin/bash
set -x
# Load Variables
source "/etc/libvirt/hooks/kvm.conf"
# Stop LightDM
systemctl stop lightdm.service
sleep 2
# Unbind VTconsoles
echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
# Unbind EFI-Framebuffer
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
# Avoid a race condition by waiting a couple of seconds. This can be calibrated to be shorter or longer if required for your system
sleep 2
# Unload all Nvidia drivers
modprobe -r nvidia_drm
modprobe -r nvidia_modeset
modprobe -r drm_kms_helper
modprobe -r nvidia
modprobe -r drm
# Unbind the GPU from display driver
virsh nodedev-detach $VIRSH_GPU_VIDEO
virsh nodedev-detach $VIRSH_GPU_AUDIO
# Load VFIO kernel module
modprobe vfio
modprobe vfio_pci
modprobe vfio_iommu_type1