Jump to content

Ideas for VM KVM ... On Demand Changing Passthrough for GPU/USB between VMs possible?


Recommended Posts

Posted

Hey Glorious Unraiders and KVMers.

 

I run 2-4 VMs at a time and I'd like to passthrough graphics and usb controllers.  Been doing research on that, no problem doing it. 

Is there a way to dynamically change which VM gets the passthrough?  It would work like a virtual KVM. 

 

I'd have one graphics card, one monitor, one mouse and one keyboard.  I'd like to chose which VM they get assigned to and switch among them.

I'm using VNC/Splashtop right now.  I'd keep that operational for remote access, but dont like that Splashtop needs internet to work.  Would like a non-network solution.

 

Current Idea is to create a passthough VM XML and a non-passthough XML.  Then I could write scrips to switch the VMs XML files, so the process would be.

  • If started, shutdown VM.
  • Copy in (or out) VM XML with passthough configured (or not configured)
  • Start VM

Would that work?  It's not ideal on a few levels.  Are there any better options?

Posted (edited)

That's perfect, thank you!  Hadn't seen that video in my research. Love spaceinvader videos.

 

This does 80% of what I'm after.  What would make it better, is if there was a way for the VM to run when GPU was disconnected and the ability to disconnect/reconnect the GPU while the VM is running.  That way I could have a task going on one VM and switch to another. 

 

I just had the idea of USB 3.0 external graphics cards. Not sure how good they are or of they'll work with some of my Linux distros.

Edited by Mysticle31
Posted (edited)
2 hours ago, Mysticle31 said:

disconnect/reconnect the GPU while the VM is running

Thats not possible. Always think of a real PC. Except from plug'n play storage devices, you can't rip out a device of your PC without causing damage. Most hardware has to be powered down to safely been removed. Sure in the enterprise segment are ways to even add "virtual" gpus to a vm which on hardware are multiple physical GPUs in one device or on another physical server but thats not possible on mainstream GPUs. At  least now now, maybe in 10-20 yrs.

 

Adding a external GPU to a running system you have to restart the PC to have full access to that device. A disconnect will force you into an reboot. So forget that idea 😂

 

Maybe someone can correct me, but thats the quirks of external GPUs since day one they've been released.

 

Edited by bastl
  • Thanks 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...