Rendered at 23:46:59 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
chao- 14 hours ago [-]
Having gone this route in the past*, once I accepted that I needed a second GPU dedicated as owned by the VM, most issues went away. No SR-IOV battles, just the simplicity of "Linux owns GPU A, Windows VM owns GPU B".
If I am remembering my build from the time, I had an RX 580 for Linux, and a GTX 1070 as passthrough to the Windows VM. At first, it felt like I was "giving up" on solving some problem that felt like it should be solvable, but it worked so well that I couldn't argue with the results.
It also assumes you have a motherboard with the right slots and enough PCIe lanes to get the performance out of two GPUs, and assumes you have a PSU with the power budget to support both GPUs. It definitely was a compromise, not perfection.
*Approx 2017 to 2020, before Proton or when it was was still new/immature. I now no longer care enough about games to play one when it doesn't just work on Linux. I assume the author does not feel this way.
yrjrjjrjjtjjr 8 hours ago [-]
Wouldn't it make more sense to use igpu for host than two discrete ones?
chao- 5 hours ago [-]
Yes, that would work the same way! However, I was on an HEDT system, with no iGPU and many PCIe lanes to spare.
cedws 14 hours ago [-]
I had a stint with VM gaming over Christmas but gave up after wasting too much time trying to bypass anti-cheat detection. My desire came from security concerns; games have a massive attack surface and running them on bare metal makes me uncomfortable. I've always wanted an ephemeral Windows environment for gaming, but it's too much effort to make it work.
I run CachyOS on my gaming PC now and I'm pretty happy with it.
I did give up as well though, all of this is just too much of a faff. Hopefully Intel continues to make strides with their discrete graphics. They are the only manufacturer without DRM blocking this feature which the hardware can obviously do.
ysleepy 14 hours ago [-]
Yeah, my proxmox game vm start/stop script does the unload unbind, works most of the time, the reset and start nvidia-persistenced.
Setup isn't perfect, but I rarely game and it has very little overhead.
audio does glitch from time to time though, probably scheduler delays or whatever.
sureglymop 15 hours ago [-]
I use libvirt, vfio pci passthrough, evdev and some other stuff and have been smoothly VM gaming for a few years. Mostly just followed the arch wiki when I set it up back then.
I get throwing in the towel with all these issues but I personally didn't encounter half of them.
kstenerud 15 hours ago [-]
I finally just set up sunshine + moonlight and moved my big machine to the basement. Works great for non twitch games, and there are clients available for pretty much every platform.
m463 21 hours ago [-]
I have a windows 11 VM under proxmox for gaming
- I bought windows 11 retail on a USB stick. (before the AI nonsense, etc)
- I run windows in a VM without a network interface. This eliminates SO MANY PROBLEMS. microsoft being problem #1
- I disabled all nonsense, windows defender was slightly harder
- I share a drive with linux (only one booted at once)
- linux runs lgogodownloader to load all my gog games onto the shared drive
- I install the games under windows from the shared drive
- someday I might change shared drive to virtiofs
- gpu passthrough
- I pass through an entire USB controller for audio, and plug in a USB schiit dac + headphones. passing the controller is key for glitchless audio
- some day maybe I'll figure out a steam VM. like maybe connect stuff once, download game for offline play, then take it off the network forever. Maybe have VMs for collections of games.
justinclift 11 hours ago [-]
> download game for offline play, then take it off the network forever.
From rough memory, even in offline mode Steam requires people to re-auth after... um... I think it's every 7 days?
Not sure about the timeframe, but it's one of those things where you can't be offline "forever".
thot_experiment 21 hours ago [-]
Do you only play singleplayer games?
m463 21 hours ago [-]
In the windows vm yes.
johntash 18 hours ago [-]
have you tried using proton//steam on linux lately? I find almost every game I want to play actually works decently well now. The ones that don't are multiplayer/online ones that require some sort of anti-cheat.
bigstrat2003 16 hours ago [-]
There are a few games I've found that don't work under Proton. Rome 2 Total War crashes frequently, Battletech ( the tactics game from a decade or so ago) doesn't always launch and has sound issues, and MechWarrior 5 joystick support doesn't work (the game is fine if you do another input method, but I'm not gonna play a sim game and not use my nice joystick). The instances of games which don't work in Proton are thankfully few and far between, but unfortunately it isn't just games with anticheat rootkits.
vitonsky 17 hours ago [-]
> GPU sharing with docker and VMs
Yeah, we really live in age of Internet Explorer 6 yet.
We already have cool features in browsers, like transparent backgrounds, rounded borders, and even HTML 5 video elements, but we still cannot use VM intensively for any purpose with no hassle.
Maybe 10-50 years later we finally can use Linux laptop with RTX 5060, and just run a Call Of Duty multiplayer while a local LLM will fix bugs in our code.
vimredo 5 hours ago [-]
Apples aren't oranges. Making achievements in nuclear power will, 99% of the time, not apply to hydro. What are you trying to say?
dodos 21 hours ago [-]
I also went down this path but for a different reason. Game streaming to my steam deck from my ultrawide monitor wasn't practical. The games on whales project is really good, it's not VM but rather containerized game sessions. It has numerous issues with podman sadly which is why I now use edvi and various scripts to just generate a fake monitor to stream.
no-name-here 21 hours ago [-]
Interesting article.
So for someone who is constrained to one PC, is dual booting the better option, or is there something else?
thot_experiment 21 hours ago [-]
The best option is to run a Windows host with WSL and an extra EXT4 volume mounted to both windows and linux (this is a non issue as long as it's not the boot drive for linux). User WSL for everything linux, optionally you can also just mount the EXT4 volume with all your stuff to a real VM if you need to (this lets you have windows GUI apps in windows, tho maybe WSL does this now too?). Everything works, you have the best of all worlds.
rrgok 17 hours ago [-]
I did not understand the extra EXT4 volume. Do you mind explaining me the advantages of this workflow?
guilhas 12 hours ago [-]
Best/easiest is probably virt-manager, with 2 GPUs, a cheaper one for the host
And you can swap between linux and windows VMs, or copy them to test things, break/fix it
I have a light Devuan linux host. And several QEMU VMs on top, one Win10 for gaming, one linux PopOS as a "server" with docker and llms, and other VMs..
guilhas 14 hours ago [-]
> UNSOLVED: GPU sharing with docker and VMs
Giving up because you can't solve 'cold fusion' is a common mistake, when we so focused on the problem and forget the goals
At some point is just cheaper to get a second cheaper GPU. Or use a CPU with integrated GPU
> GPU has to be bound to VFIO at boot
You can bind and unbind them at any time. There are several guides for people doing it with only 1 GPU
Just keep it simple
With an amd gpu, using virt-manager I can GPU/USB passthrough with just a few clicks and no command line needed
The other day upgrading VM Win 10 nvidia drivers got a black screen, and was able to copy it as many times to install again other versions
iugtmkbdfil834 36 minutes ago [-]
Ok. This whole blog post is weird.
I am currently using unraid as my server and used it for gaming as well ( though deck mostly took over that particular distraction ). In a sense, playing in VM was the initial draw. I stayed for everything else.
But the points the author is making kinda contradict themselves. Before I go to the actual claims within the post, please be aware that gaming these days is not exactly cheap. Technically, neither is running decent NAS, or server or anything these days. Not really. However, if you are trying to trying to do VM gaming ( and gaming is generally resource intensive ) and run NAS and docker and whatever else tickles your fancy, you cannot reasonably complain, because, well, you set it all up..
Claims:
<< Today I wouldn't recommend it to anyone unless you are severely constrained in your budget or space.
Again, this whole thing is backwards. Unraid is not about budget or space. If anything, doing it well may end up being more expensive especially if you want to do gaming, AND docker, AND mebbe CV and random testing VMs and backups and NAS.
<< I am currently running 60 docker containers and idle at 14GB/32GB free RAM with a cpu usage of 10% across all 6 cores, starting the VM reserves my RAM usage to near max,
Does it sound more like an actual user issue? I might not be a heavy user, but there are very few times, I run things at all times. I can't tell if the user is complaining that unraid does not do schedule resources for them ( turn off things as it sees fit ) or expects that docker magically requires less resources.
<< Multiplayer games and anti-cheat
About the only semi-valid complaint, but here it is not even an unraid issue. It is gaming ecosystem issue, but I am willing to accept it, because there is really no solving without gamers as a group actually agreeing on maximum level of bs they are willing to accept.
<< KVM XML tuning became a constant maintenance task to avoid regressions, lag and lockups. I experienced VM degradation, Windows VMs that used to work properly became unbearably slow for no apparent reason
I suspect that the author had some sufficiently custom setup, because while none of my stuff is edge tech, I never ran into a problem that did not, at the end of the day, result from somewhere between the user and keyboard. You do have to learn a lot ( if you did not know anything about virtualization beforehand ), but that is true of most linux distributions in general. By comparison to where it used to be, the ecosystem now is fairly user friendly.
<< Another interesting use case would have been running multiple VMs using a single GPU. You can attach the GPU to multiple VMs but by default only one VM can be running which utilises the GPU.
Semi-reasonable issue, but the appropriate approach here is multi-gpu rig, which, again, if you buy into unraid for VM gaming, is, maybe expected is too strong, but, but complaining about it is like pouring cheap leaded gasoline to a lambo.
<< I was hoping I could use the GPU if the VM was not used for docker containers. This is possible but not user friendly, the GPU has to be bound to VFIO at boot.
Here I am willing to agree despite not running into that issue sine I use dedicated box for more intensive gpu stuff that is not gaming.
deafpolygon 12 hours ago [-]
Honestly, the future is probably going to be something like Amazon Luna, where you don’t run the game locally. Cloud streaming is going to be the norm unless we start pushing back.
guilhas 10 hours ago [-]
That would probably kill modding, and possibly kill future gaming innovation
ismailmaj 13 hours ago [-]
I had a much better experience gaming on MacOS than I ever did using Linux + X (it was first dual boot with Windows, then double GPU + VM, then proton).
But it's mainly because I do not target anymore games with stringent anti-cheats or with high setup requirements (though the M5 is quite powerful right now), and a lot of games are ported natively to macOS but not Linux (most recent to date is Age of Empire 2 Definitive Edition 1 week ago).
If I am remembering my build from the time, I had an RX 580 for Linux, and a GTX 1070 as passthrough to the Windows VM. At first, it felt like I was "giving up" on solving some problem that felt like it should be solvable, but it worked so well that I couldn't argue with the results.
It also assumes you have a motherboard with the right slots and enough PCIe lanes to get the performance out of two GPUs, and assumes you have a PSU with the power budget to support both GPUs. It definitely was a compromise, not perfection.
*Approx 2017 to 2020, before Proton or when it was was still new/immature. I now no longer care enough about games to play one when it doesn't just work on Linux. I assume the author does not feel this way.
I run CachyOS on my gaming PC now and I'm pretty happy with it.
This should work without needing a reboot. You do have to bind the vfio driver at boot, but the archwiki gives a script to unbind vfio and load the Nvidia driver: https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#Bi...
Which anecdotally worked fine on my RTX3050.
I did give up as well though, all of this is just too much of a faff. Hopefully Intel continues to make strides with their discrete graphics. They are the only manufacturer without DRM blocking this feature which the hardware can obviously do.
Setup isn't perfect, but I rarely game and it has very little overhead.
audio does glitch from time to time though, probably scheduler delays or whatever.
I get throwing in the towel with all these issues but I personally didn't encounter half of them.
- I bought windows 11 retail on a USB stick. (before the AI nonsense, etc)
- I run windows in a VM without a network interface. This eliminates SO MANY PROBLEMS. microsoft being problem #1
- I disabled all nonsense, windows defender was slightly harder
- I share a drive with linux (only one booted at once)
- linux runs lgogodownloader to load all my gog games onto the shared drive
- I install the games under windows from the shared drive
- someday I might change shared drive to virtiofs
- gpu passthrough
- I pass through an entire USB controller for audio, and plug in a USB schiit dac + headphones. passing the controller is key for glitchless audio
- some day maybe I'll figure out a steam VM. like maybe connect stuff once, download game for offline play, then take it off the network forever. Maybe have VMs for collections of games.
From rough memory, even in offline mode Steam requires people to re-auth after... um... I think it's every 7 days?
Not sure about the timeframe, but it's one of those things where you can't be offline "forever".
Yeah, we really live in age of Internet Explorer 6 yet.
We already have cool features in browsers, like transparent backgrounds, rounded borders, and even HTML 5 video elements, but we still cannot use VM intensively for any purpose with no hassle.
Maybe 10-50 years later we finally can use Linux laptop with RTX 5060, and just run a Call Of Duty multiplayer while a local LLM will fix bugs in our code.
So for someone who is constrained to one PC, is dual booting the better option, or is there something else?
And you can swap between linux and windows VMs, or copy them to test things, break/fix it
I have a light Devuan linux host. And several QEMU VMs on top, one Win10 for gaming, one linux PopOS as a "server" with docker and llms, and other VMs..
Giving up because you can't solve 'cold fusion' is a common mistake, when we so focused on the problem and forget the goals
At some point is just cheaper to get a second cheaper GPU. Or use a CPU with integrated GPU
> GPU has to be bound to VFIO at boot
You can bind and unbind them at any time. There are several guides for people doing it with only 1 GPU
Just keep it simple
With an amd gpu, using virt-manager I can GPU/USB passthrough with just a few clicks and no command line needed
I also like gentoo QEMU guides https://wiki.gentoo.org/wiki/GPU_passthrough_with_virt-manag...
The other day upgrading VM Win 10 nvidia drivers got a black screen, and was able to copy it as many times to install again other versions
I am currently using unraid as my server and used it for gaming as well ( though deck mostly took over that particular distraction ). In a sense, playing in VM was the initial draw. I stayed for everything else.
But the points the author is making kinda contradict themselves. Before I go to the actual claims within the post, please be aware that gaming these days is not exactly cheap. Technically, neither is running decent NAS, or server or anything these days. Not really. However, if you are trying to trying to do VM gaming ( and gaming is generally resource intensive ) and run NAS and docker and whatever else tickles your fancy, you cannot reasonably complain, because, well, you set it all up..
Claims:
<< Today I wouldn't recommend it to anyone unless you are severely constrained in your budget or space.
Again, this whole thing is backwards. Unraid is not about budget or space. If anything, doing it well may end up being more expensive especially if you want to do gaming, AND docker, AND mebbe CV and random testing VMs and backups and NAS.
<< I am currently running 60 docker containers and idle at 14GB/32GB free RAM with a cpu usage of 10% across all 6 cores, starting the VM reserves my RAM usage to near max,
Does it sound more like an actual user issue? I might not be a heavy user, but there are very few times, I run things at all times. I can't tell if the user is complaining that unraid does not do schedule resources for them ( turn off things as it sees fit ) or expects that docker magically requires less resources.
<< Multiplayer games and anti-cheat
About the only semi-valid complaint, but here it is not even an unraid issue. It is gaming ecosystem issue, but I am willing to accept it, because there is really no solving without gamers as a group actually agreeing on maximum level of bs they are willing to accept.
<< KVM XML tuning became a constant maintenance task to avoid regressions, lag and lockups. I experienced VM degradation, Windows VMs that used to work properly became unbearably slow for no apparent reason
I suspect that the author had some sufficiently custom setup, because while none of my stuff is edge tech, I never ran into a problem that did not, at the end of the day, result from somewhere between the user and keyboard. You do have to learn a lot ( if you did not know anything about virtualization beforehand ), but that is true of most linux distributions in general. By comparison to where it used to be, the ecosystem now is fairly user friendly.
<< Another interesting use case would have been running multiple VMs using a single GPU. You can attach the GPU to multiple VMs but by default only one VM can be running which utilises the GPU.
Semi-reasonable issue, but the appropriate approach here is multi-gpu rig, which, again, if you buy into unraid for VM gaming, is, maybe expected is too strong, but, but complaining about it is like pouring cheap leaded gasoline to a lambo.
<< I was hoping I could use the GPU if the VM was not used for docker containers. This is possible but not user friendly, the GPU has to be bound to VFIO at boot.
Here I am willing to agree despite not running into that issue sine I use dedicated box for more intensive gpu stuff that is not gaming.
But it's mainly because I do not target anymore games with stringent anti-cheats or with high setup requirements (though the M5 is quite powerful right now), and a lot of games are ported natively to macOS but not Linux (most recent to date is Age of Empire 2 Definitive Edition 1 week ago).