Hey everyone, I finally got around to assembling a rough guide on beginning to work on your own gaming virtual machine on both desktops and laptops in under 30 minutes! This guide is a bit more focused on Arch and Arch-based distros and focuses on Nvidia cards (note: Error 43), but with a few package manager changes here and there it'll work on all modern distros and cards!
This is my first time making a tutorial video on Linux, so hopefully it helps all of you out!
I forgot to bring this up in the beginning, but you NEED a VT-d and VT-x compatible CPU before doing this, and you need to enable both settings in your BIOS beforehand. For example, an i7-3632QM can't do it (rPGA CPUs are weirdly limited like that), but an i7-3720QM can. The reason VT-d is so important is that it's built into the CPU to allow devices to be passed through. There may be possible software alternatives, but they're rare, slow, usually not Windows friendly, and just generally not worth it. Also, you'll need to make sure the primary card being used on your OS isn't the one you want to use in the VM.
Tips and tricks from my video:
After installing libvirtd, dnsmasq and ebtables, enable them as a service with your system's respective service manage (ie; for systemd users, sudo systemctl enable libvirtd dnsmasq ebtables)
For "/etc/libvirt/qemu.conf", add:
nvram = [
"/usr/share/ovmf/x64/OVMF_CODE.fd:/usr/share/ovmf/x64/OVMF_VARS.fd"
]
Command to find your lspci ID = "lspci -nnk" (it'll be the value that starts with 10de:, usually.)
Intel Kernel Parameters = "intel_iommu=on vfio-pci.ids=VALUEHERE" (under options in systemd-boot, under GRUB_CMDLINE_LINUX_DEFAULT in GRUB)
AMD Kernel Parameters = "iommu=pt vfio-pci.ids=VALUEHERE" (under options in systemd-boot, under GRUB_CMDLINE_LINUX_DEFAULT in GRUB)
If you're not sure how to modify your kernel parameters, do as follows:
GRUB: Go to Terminal, type "sudo nano /etc/default/grub", type your password, then look for the field that says GRUB_CMDLINE_LINUX_DEFAULT, and at the end of that before the last bracket, add the commands from above with no quotation marks. Then upgrade GRUB either via the default "sudo update-grub" on Debian-based distros, or the default "sudo grub-mkconfig -o /boot/grub/grub.cfg" on Arch-based distros.
systemd-boot: Go to Terminal, type "sudo nano /boot/loader/entries/distro.conf", distro being whatever distro entry you have installed, then appending the kernel parameters to the end of "options".
For systems with only one Nvidia/Radeon GPU, you'll want to blacklist it in /etc/modprobe.d/blacklist.conf, as follows:
blacklist nouveau
blacklist nvidia
# or if you're an AMD user #
blacklist radeon
Then save and you're all golden. Note that you'll have to remove these if you want to use your card within Linux.
If you have any questions or comments, please leave them down below and I'll get back to you ASAP. My apologies for the weird flickering on the right side of the screen, it wasn't an issue while I was recording, so I don't know where it came from.
List of resources that helped me get to this point, and can hopefully help you!
Passthrough Post - [ Ссылка ]
Virsh Patcher - [ Ссылка ]
ArchWiki - [ Ссылка ]
Passthrough Post Evdev Passthrough (for sharing a single keyboard and mouse between host and VM) - [ Ссылка ]
Looking Glass, a KVM Relay host/client software that allows you to use only one display on both machines via shared memory between the two operating systems. - [ Ссылка ]
VFIO Reddit - [ Ссылка ]
eGPU Reddit - [ Ссылка ]
My Website: [ Ссылка ]
Donate to my Patreon and help me make more videos!: [ Ссылка ]
Ещё видео!