Hardware passthrough
This is not related to the homelab itself, but specifically to Proxmox and passthrough of hardware. I, as mostly everyone, have been for years been using Windows on a PC to play games. This have worked very great, but for the past 5 years (or more), M$ have been doing some shading things and design decisions that have made me want to move from them. The problem is that I am both unsure how gaming on Linux works, and if it will work for a bunch of games that I play daily. I thought that maybe dual boot would work, but the problem there is that Windows are known to trash the boot loader after an update, at least if it is on the same partition. And what if something breaks? Therefore I came to the conclusion that I should virtualize it.
Virtualizing an OS is fairly straightforward: create a virtual machine, install the OS with an ISO like normal, and then use it. The problem arise when you realize that the GPU is not available. Here is where hardware passthrough comes in, and it is a rather huge subject. First, I need to make sure that my motherboard has support for virtualization, which is VT-d for Intel and SVM for AMD. This is pretty much a requirement for any type of virtualization. For passthrough you also need SR-IOV(May be per default) and IOMMU enabled. This created groups over your all your hardware, making it possible to pass them through to the specified VM.
Now comes the hard part: configuration.
Configuring your VM to allow passthrough at all is quite straightforward, if your hardware allows it. Otherwise you need to enable certain features like ACS and a bunch of other flags to make it work. For certain nVidia cards you also need to retrieve the firmware and modify it so the drivers can recognize it correctly, at least for Windows. On top of all this, you may want to hide the fact that you are running this in a VM, but that is an entire different topic in itself. There are more configs, but that is just too much for now.