I'm a game developer and often need Windows for testing builds, using Visual Studio, and MS Office. I run Windows in a virtual machine (VM) and find it performs well, but I'm missing out on hardware acceleration. I'm considering getting a gaming laptop with an Nvidia GPU and isolating that GPU for the Windows VM, while letting Linux use the integrated GPU. Is this feasible? Do laptop GPUs support this kind of virtualization? I don't need SR-IOV, just want to allocate the GPU to the VM only. Has anyone tried this? What features or specifications should I consider when choosing a laptop?
4 Answers
Wait, but can’t I just use RDP instead of going through all that hassle? I’m not particularly concerned about latency but just want some rendering acceleration in the VM.
I've heard of people using VMs for gaming on Linux—KVM supports PCIe passthrough, which could be what you need. I found a guide that focuses on Ubuntu, but it should help you get insights for your setup, even if you’re using a different distribution.
If you have a muxed laptop, it might be possible! Check your BIOS settings to see if you can switch to "discrete GPU." If that option is there, you’re likely on the right track. If not, unfortunately, using SR-IOV would be your only way to share the iGPU with the VM.
It actually works well in many cases! I bypass the latency from SPICE for better performance in my VMs. However, there are challenges. You might need a dedicated mouse and keyboard to connect to the VM since passing through the built-in ones is hit or miss. Also, you’ll be limited to external displays because the built-in screen is wired to the integrated GPU. If you plan to buy a new one mainly for this purpose, consider opting for a desktop instead—it’ll be easier to set up without the portability issues.

Thanks! That’s super useful! I’m on openSUSE but this will definitely guide my research.