PCI Switching (Swapping PCI-e passthrough per-VM)

MouldMox

New Member
Jan 13, 2026
1
0
1
Hi everyone!

This is my first post, so apologies if it's in the wrong place.

I have a very specific use-case that I would like to achieve, I'm new to proxmox and hypervisors as a whole, but I've learned a lot over the past month or so and I've got a few VMs set up and working perfectly with PCI-e passthough. I've researched what I want to achieve, and I'm not sure if it's possible. This is the final hurdle that's holding me back from switching over from a dual boot setup to using proxmox as my daily driver.

I want my workflow to look like this:
  1. Running an OS (Windows) in a VM with passed-through PCI-e device (GPU)
  2. Want to run a Linux-only app, or otherwise switch over to the Linux VM
  3. Pause VM, UN-pass-through the PCI-e device
  4. Windows VM is now paused, its state saved to disk, and it has released the GPU
  5. Linux VM now starts, taking control of the GPU
  6. When I want to switch back, the process runs the same as above but switching from Linux to Windows.
Note: The VMs will never run at the same time. Only one will be active at a time, so VMs fighting for control over the GPU will not be an issue.
I will have other VMs running that will not use GPU passthrough. But at least for the main 2 I want both to have full control over the GPU.

I understand this is an incredibly niche use-case and it's likely that no one has done this before (as I can't find any sources where someone has done this). But is this even remotely possible?

If I can't do this, then simply dual-booting multiple OSes would be more efficient and would offer quicker switching. But I really like proxmox from what I've used of it and having near instant switching from OS to OS with full GPU acceleration would be incredible.

I've tried hibernating a VM, but it is not supported with GPU pass-through, you can't seem to hotplug PCI-e devices from what I've seen so that was out the window. The closest I got was pausing the VM (VM1), then ejecting the GPU in Windows then modifying the config to remove it. Then trying to start VM2 with pass-through enabled. This didn't work as the GPU was still being controlled by VM1, despite it being removed. (Probably because the VM was paused so it was still holding on to the device) This also completely broke VM1 and I had to reimport it.

I've seen vGPU, and I'm thinking I may need to go this route to achieve what I need, but I don't need to split the GPU across multiple VMs. I want each VM to use 100% and they won't run in tandem.

In the highest-level terms, I simpy want a way to pause or hibernate a VM that is using GPU pass-through so I can quickly switch between 2 or more VMs that each have full control over the GPU. Achieving the same goal as dual-booting operating systems, but with instant switching between operating systems.

Any help or pointers in the right direction would be extremely appreciated.
Thank you!
 
Last edited:
Im new to proxmox, this week actually but I need this too. I dont how much you've worked on this but I currently have mine set up for bazzite with nvidia 5080 and tiny win 11. I attach the gpu to bazzite with windows shutdown and everything works. when I need windows I shut down bazzite, remove pcie device. then go to windows settings and add the gpu and start and it works. Currently I need to do this on my laptop because I loose the display in between switching.

-apparently some OS, bazzite is one, can pause a vm and and remove gpu and add later and resume without issue. I haven't tried it yet.
-after that testing and i know if they need complate shutdown or not i plan to make a bash script when i can ssh from my phone and type say "windows" or "bazzite" and the respective command will shutdown or pause the VM remove gpu, add gpu to the other then pause or start and vica versa. how far did you get with it.

-it does seem with all consumer grade gpus however that you have to disconnect the gpu to switch passthrough.