boot.kernelParams = [
"vfio-pci.ids=10de:1380,10de:0fbc"
"video=vesa:off"
"vga=normal"
];
systemd.services.libvirtd.preStart = ''
mkdir -p /var/lib/libvirt/hooks
chmod 755 /var/lib/libvirt/hooks
cat > /var/lib/libvirt/hooks/qemu <<EOF
#!/bin/sh
vm="\$1"
cmd="\$2"
if [ "\$vm" = "win10" ]; then
if [ "\$cmd" = "started" ]; then
systemctl set-property --runtime -- system.slice AllowedCPUs=6,7,8,9,10,11,18,19,20,21,22,23
systemctl set-property --runtime -- user.slice AllowedCPUs=6,7,8,9,10,11,18,19,20,21,22,23
systemctl set-property --runtime -- init.scope AllowedCPUs=6,7,8,9,10,11,18,19,20,21,22,23
elif [ "\$cmd" = "release" ]; then
systemctl set-property --runtime -- system.slice AllowedCPUs=0-23
systemctl set-property --runtime -- user.slice AllowedCPUs=0-23
systemctl set-property --runtime -- init.scope AllowedCPUs=0-23
fi
fi
EOF
chmod +x /var/lib/libvirt/hooks/qemu
'';