Hi everybody,
Have a little project going on here with some questions. Have only 1 graphics card (GTX 1060) in my unraid system and with the shortage, won't be able to buy a new one anytime soon.
I use my unraid server both for a windows gaming vm with GPU passthrough AS using the plex docker with the nvidia driver for hardware transcoding. I know I can't do this at the same time. This is why by default, my graphics card is not bound to vfio-pci and it's being used by the plex container (I play around 1-2 times/week on my gaming vm)
If I want to use it for gaming, I need to do the following (and ofcourse vice versa if I want to switch back to plex)
1) Turn off autostart on my plex container and enable autostart on a "plex-nogpu" container (links to same appdata folder, has same config except no --runtime-nvidia and nvidia visible devices argument)
2) Bind graphics card to VFIO-PCI
3) Change CPU isolation to isolate 4 cores from my CPU for my VM
4) Enable autostart on windows VM
5) reboot my unraid server
I'm wondering if there is any way that I can automate this process (with a user script f.e., or using an api or something). Have noticed that:
- Binding of graphics cards is through vfio-pci.cfg on flash drive, so can write something to overwrite that file
- Isolating cpus is through syslinux/syslinux.cfg
But autostart (for vm/docker) changes don't seem to affect the flash drive at all... so I'm wondering how unraid is storing this and keep it persistent across reboots?
EDIT: even when manually creating a symlink in the /etc/libvirt/qemu/autostart folder to my windows xml file does not change the autostart status in the web gui...