|
|
|
|
|
by therein
2260 days ago
|
|
Of course. Here it is. boot.kernelModules = [ "kvm-amd" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
boot.extraModprobeConfig = "options vfio-pci ids=10de:1e04,10de:10f7,10de:1ad6,10de:1ad7";
boot.kernelParams = [ "amd_iommu=on" /*"video=efifb:off" if you have only one GPU and want to keep the vBIOS intact*/ ];
virtualisation = {
lxc.enable = true;
lxd.enable = true;
libvirtd = {
enable = true;
qemuOvmf = true;
qemuVerbatimConfig = ''
namespaces = []
dynamic_ownership = 0
'';
};
};
Make sure your environment.systemPackages include qemu-kvm and virtmanager.And that's about it really. All you need to do after this is to go to virt-manager and create a new VM and add your GPU. |
|