add end script
This commit is contained in:
parent
eb628e5a74
commit
1a13656f95
3 changed files with 28 additions and 1 deletions
|
@ -9,8 +9,12 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "uas" "usbhid" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "uas" "usbhid" "sd_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ "vfio" "vfio_iommu_type1" "vfio_pci" ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.kernelParams = [
|
||||||
|
"amd_iommu=on"
|
||||||
|
"vfio-pci.ids=10de:2484,10de228b,1022:149c,15b7:5045,1dbe:5236,1022:149c"
|
||||||
|
];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
|
|
20
hosts/focalor/scripts/end.sh
Normal file
20
hosts/focalor/scripts/end.sh
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -x
|
||||||
|
|
||||||
|
virsh nodedev-reattach pci_0000_0a_00_0
|
||||||
|
virsh nodedev-reattach pci_0000_0a_00_1
|
||||||
|
virsh nodedev-reattach pci_0000_06_00_1
|
||||||
|
virsh nodedev-reattach pci_0000_06_00_3
|
||||||
|
virsh nodedev-reattach pci_0000_0c_00_3
|
||||||
|
|
||||||
|
modprobe -r vfio-pci
|
||||||
|
|
||||||
|
modprobe nvidia_modeset
|
||||||
|
modprobe nvidia_uvm
|
||||||
|
modprobe nvidia_drm
|
||||||
|
modprobe nvidia
|
||||||
|
|
||||||
|
modprobe -r xhci_pci
|
||||||
|
modprobe xhci_pci
|
||||||
|
|
||||||
|
systemctl restart display-manager
|
|
@ -17,6 +17,9 @@
|
||||||
}).fd];
|
}).fd];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
hooks.qemu = {
|
||||||
|
end = "./scripts/end.sh";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.extraUsers.regent.extraGroups = [ "libvirtd" ];
|
users.extraUsers.regent.extraGroups = [ "libvirtd" ];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue