LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Windows gaming VM and Linux work VM (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/windows-gaming-vm-and-linux-work-vm-4175602012/)

Marco2G 03-17-2017 01:17 PM

Windows gaming VM and Linux work VM
 
Hello everyone

I'm dealing with a tricky puzzle. I want to get rid of my aging gaming PC and instead put a decent GPU inside my Ubuntu server which is already running two VMs on KVM/QEMU.

So far, so good but I'd really like to limit my contact with windows to the bare minimum.

I thought about running the windows VM and ussing PCI passthrough, having it directly use the GPU. I could then virtualize linux in it and work on that.

Drawback is that all keystrokes would still pass windows.

Then there's having a linux VM and then virtualizing windows on it. To game, I'd have to pass through the GPU twice. I don't know whether this is possible nor do I think it very efficient.

The best idea, I think, would be to put my old GPU in as well and having something like a KVM switch.

Problem is the hardware is on another floor and another room than the peripherals. So it would have to be a KVM switch that could be switched over that distance. I have connected the peripherals through 10 to 15m long DP and USB3 cables.

Does anyone have a better idea on how to solve this? The ideal goal is to have to separate VMs on a more or less remote machine. Both should be accessible through my "terminal".

Regards and thanks in advance,

Marco


Edit: D'uh, I completely forgot that most KVM switches accept hotkeys to switch between machines. Only question that remains is is there such a hotkey solution integrated in the hypervisor, perhaps?

273 03-17-2017 01:27 PM

Could you not install the GPU in the server and tell the host not to use it, and then creat a Windows VM and a Linux VM which cannot be running at the same time and have both use the GPU passthrough?
I've not been patient enough to get GPU passthrough working myself so perhaps I missed something?

Marco2G 03-17-2017 01:38 PM

And how would you switch between the two?

273 03-17-2017 02:02 PM

Using the host OS? How do you switch between the existing VMs? I take it you are sitting near the server, or how would the GPU work?

Marco2G 03-17-2017 02:18 PM

As stated, 10 meters through several walls :D

The existing VMs are the firewall and a DMZ server respectively. I only need SSH for those.

273 03-17-2017 02:25 PM

Then you're not likely to get a gaming rig working. You need a monitor, mouse and keyboard physically attached to the machine to game on it.

Marco2G 03-17-2017 02:28 PM

Again, as stated, 10-15m Displayport and USB3 cable :)

273 03-17-2017 02:35 PM

Yes, very funny.
If you have physical connecions to the host OS then you access the guests through that?
You acceess the Windows and Linux VMs you created using the sam methods you use to access the other VMs but you have to have a physical connection between the graphics card dedicated to them and the monitor you wish to use.
I'll freely admit I'm thinking of this logocally rather than from experience so if you know better it may help your chances of an answer to chip in with what you do know?

Marco2G 03-17-2017 02:43 PM

The intention is to attach the monitor and the usb 3 cable (on which there is a dockingstation attached with keyboard, mouse and an audio card) to the GPU and an USB port both passed directly into the VM. Now if I were to have two GPUs in the machine and dedicated two USB ports, I could then pass them through to a gaming windows and a working linux vm respectively.

Using a KVM switch, I could then switch between the two VMs as if they were physical machines. The host OS has nothing to do with this at that point.

Now an alternative that comes to mind is having only one GPU and writing a script that will shut down the running vm, detach the GPU, reattach it to the other VM, reassign the USB port and then boot that second VM. Obviously, this switch would take longer. I would save money on the KVM switch, though.

Third option, if this is supported, would be to hot-swap the GPU and leave the vms running.

273 03-17-2017 02:55 PM

Quote:

Originally Posted by Marco2G (Post 5684850)
Now an alternative that comes to mind is having only one GPU and writing a script that will shut down the running vm, detach the GPU, reattach it to the other VM, reassign the USB port and then boot that second VM. Obviously, this switch would take longer. I would save money on the KVM switch, though.

that's roughly what I mean.

edbarx 04-24-2017 10:09 AM

Give USB access to QEMU guest (Windows XP)
 
Misposted. Deleting post.


All times are GMT -5. The time now is 10:44 PM.