Gaming on a Virtual Machine?

What is the best VM setup for running windows games with solid performance? For reference, I’m trying to get a VM setup to run this title linked below specifically.

https://steamdb.info/app/2507950/

Of course security is the priority here. Worst comes to worst I’ll just install it on my baremetall drive that already has windows on it. Just wanted to see if there was a solid VM setup that could work first. It would be nice to run this game on Linux more easily also…

https://steamdb.info/app/976730/

I know that it is possible to pass through your GPU to the VM, but I don’t know how to do that and I have a hunch that it will add quite a bit of latency no matter what. It might be best to install on bare metal if you plan to game. At least that’s what I would do.

1 Like

I ran a GPU pass-through setup with QEMU using virt-manager, with help from an AUR package called gpu-passthrough-manager. The easiest way to do this is with 2nd, dedicated GPU, one that your Linux box is not using. Sharing the keyboard/mouse is also a snap with evdev.

Before you decide to jump in, become as familiar with virt-manager as you can. You’ll need to be certain that your power supply is powerful enough to run the 2nd GPU, even when it’s not being used, or your system won’t boot. Also, make sure that you use a recent guide as the older ones required way more hoops to jump through that just aren’t necessary anymore.

The only reason I stopped using this setup was that the games I play run great under Steam/Proton.

1 Like

The best graphics performance comes with vmware. vmware-workstation is for free.

virtualbox or kvm are not as good as vmware in that regard.

GPU passthrough for kvm needs a second GPU.

PS
Some of the Delta Force games seem to run on LInux with Proton as well:

And Master Chief Collection too:

2 Likes

Delta Force, the new one that was released recently and that OP mentions in the first SteamDB link, doesn’t work on Linux because it uses kernel level anti-cheat.
One of the devs has confirmed that they will consider potentially adding support for Linux/Steam Deck, but I wouldn’t hold my breath for it.

The Master Chief collection seems to work, though, as you’ve said.

1 Like

You can pass-through your DGPU, but that’s possible on laptops only. On desktops however, that’s where you will need a second gpu

Basically, this video:

1 Like

I’ve never ran a game in a virtual machine before. But looking at your links I assume this request is to do with Anticheat implemented in those games.

I could be wrong but I’m sure secure boot and TPM would need to be activated. I’m unsure if this is possible with a virtual machine, and I think secure boot may need to be off when installing Linux and I’m unsure if that transfers in to virtual machines I use VIRT+QEMU and I see no options regarding secure boot in it (Other VMs may vary). And virtual machines also add additional latency to actions if these are competitive games.

I was also going to set up GPU passthrough at some point for the challenge of doing it but found out you need two GPUs so I didn’t bother in the end as I wouldn’t be able to use GPU passthrough as a reward of doing it anyway.

It may be worth keeping the games on a separate drive that has Windows installed on it for this. I have set up many games on my system and they all work but they don;t have Anticheat which will be a problem on Linux.

Anyone can correct me if I’m wrong though but this is how I understood anticheat based games.

Its totally possible with only one:

Did successfully done that in the past by patching my bios (2011 era so no real iommu support without that). Need to try on my new rig tho!

2 Likes

So he’s running this off a diffferent non-arch based distro. Are the commands that same for Endev in the sections where he is detaching and reattaching the GPU? I’m not sure if it’s relevant but this is the machine I’m using for this.

I’ll probably end up doing that. That said, I’d still like to get as many things running on Linux itself as possible so as to avoid having to reboot into windows just to play one or two games.

Thanks for sharing, I will have a look through and see if I can maybe re-ignite my challenge again.
I found a few guides for doing it on github too but would need two GPUs, never found this specific one though for single GPU, or rather I wasn’t sure if they would work since I read elsewhere from multiple places you need Two GPUs so I was worried the single GPU ones would not work. Since you managed to get this working I will take a look for myself.

Yeah i don’t know why its almost always what you found on the web. But it possible. The solution is pretty cleaver when you think about it.

1 - before the vm start the host release the gpu.
2 - the vm start with the gpu
3 - the vm close and release the gpu
4 - the host reconnect with the gpu

And done :rocket: Since then i’ve also discovered how to connect/disconnect/restart a usb device/hub/controller :grin:

1 Like

Pretty sure you can do the same on non-arch distros. Some commands will be different like the package installation, but it’s still possible.

As someone who has attempted this off and on for years, i can only conclude that your a vmware shill/fanboy. It’s fine to enjoy a piece of software but this statement is woefully incorrect.

I am certainly not a vmware fan boy. In fact, I have abandoned vmware more than a year ago and fully use kvm+libtvirt now. (reason for abandoning vmware was the broadcom deal)

But anyways, the better graphics performance of vmware is true. vmware has better 3D acceleration, opengl and directx support. And all benchmarks I have seen on the internet support that. I havent seen any benchmark that puts virtualbox in the lead.

You can find many other benchmarks and comparisons.

As far as I know, there is only one virtualization solution that has faster graphics performance than vmware. And that is kvm with GPU passthrough. But that only really works out with two GPU, which is expensive.

Then I should have seen it. And not found many other threads drawing the same conclusion as I have. I’ve always been stuck with software renders on vmware without failure, when games do actually run under vmware,