Hi there,
I’ve just recently started using Linux (Mint) and I’m pondering on if and how to change my setup.
Here’s how it is right now: I have 4 drives - 1 512GB ssd which has Windows installed on it, a 2 TB hdd that’s used for storage on the Windows part of my system, a 1 TB m2 ssd with Linux Mint and a 2 TB ssd for storage on my the Linux part of my system.
I can’t unfortunately get rid of Windows completely, as I need the Office Suite for Work - I do training sessions on process optimization mostly online via MS Teams.
At the moment, I have fmstrat/winapps installed, as well as teams-for-linux (which is just a web app as far as I know) for most basic things like outlook and teams messages. Both options (Web-apps and winapps) are not really suitable for online training sessions or more work intense sessions as they are simply too slow or missing features. For everything else, I’ll do a reboot into the windows system and after I’m done I reboot back to Linux.
Now here’s my question:
Is there a way, e.g. to put a VM fullscreen over both displays on one workspace and give it full power / resources so I won’t notice much difference to a native system (How good would my components need to be for this?) - and suspend the VM if I switch away from that workspace back to Linux. And would this be suitable to access my devices like the rodecaster pro duo or my cam (via CamLink 4K) and my streamdeck?
Do you have any other better ideas to get to my goal of basically having an easy way to switch between Win and Linux. The Windows VM would only be used for Office work and online Meetings but both should run without any noticeable lags or glitches.
Would another distro be better for this task? I like working with Linux Mint atm but I wouldn’t mind trying a different one as well - the Linux distro would have to be suitable for gaming though.
This is my go-to guide for virtualization on Linux desktops: https://www.youtube.com/watch?v=h7SG7ccjn-g The first part covers the Linux (Manjaro) installation. 12:00 is where GPU passthrough starts (see below), and 21:00 is where he sets up the virtual machine.
The video shows how to use KVM, or Kernel-based Virtual Machines. It’s a hypervisor built into the Linux kernel and much more performant than VirtualBox, but a bit more work to set up. If you give the VM about 6-8 GB RAM and at least 4 CPU cores, it’ll happily run Win10 at a reasonable speed and 25-30 FPS (assuming your computer is strong enough, as most of this load is CPU-bound). You won’t be using it to watch HD videos, but I think it’s good enough for office-type applications. Even now I’m using a Win10 VM to manage a domain controller.
One thing the video doesn’t cover is to install the spice-guest-tools service on the VM from spice-space.org to facilitate host-to-guest communication (SPICE being the protocol that shows you the VM’s graphical output, not unlike VNC).
put a VM fullscreen over both displays on one workspace and give it full power / resources
It’s called GPU passthrough, and not something I’d tell a new user to attempt. It requires some advanced tinkering, a second GPU (unless you’re willing to attempt a single GPU passthrough, which is even more sketchy), and a prayer to the Omnissiah. It involves detaching the PCI device from the host OS and handing it over to the VM so only the guest OS can use it. You can then attach a monitor directly to that GPU or use the Looking Glass application on a multi-GPU system to display the output in a window.
I like working with Linux Mint atm but I wouldn’t mind trying a different one as well
If you’re comfortable with Mint, it’s best to stay. Virtualization will work more or less the same. If you’re looking for an Arch-based distro, consider EndeavourOS. It’s basically Arch, but with an out-of-the-box experience comparable to Mint. Manjaro is another similar choice, but I can’t recommend it because they’ve made some choices that make updates risky and system maintenance a pain.
Thanks for the extensive answer and the video. I’ll put it to good use since I wanted to do a clean reinstall anyways.
Here is an alternative Piped link(s):
https://www.piped.video/watch?v=h7SG7ccjn-g
Piped is a privacy-respecting open-source alternative frontend to YouTube.
I’m open-source; check me out at GitHub.
this is a great bit of advice here. KVM with GPU passthrough is magical when you get it working. excellent comment.
Can looking glass passthrough a xbox controller
Check out Looking Glass.
Thanks that sounds promising
Install Windows in Virtualbox if all you need is the installed apps for screen sharing stuff. Make sure to install the Guest Additions, and it should be running at near native speed.
I wouldn’t recommend virtualbox on linux these days. It’s slower than kvm, and oracle is known to send hefty bills to companies when their employees install virtualbox’s proprietary extension pack on their machine.
Ignore the GPU-passthru suggestions (at least for now), as they would be overkill for running MS Office.
The best way to get a decent-performing, dual-screen, productivity oriented Windows to display is via RDP and FreeRDP. You can use the following command to run your VM in fullscreen across both your monitors:
xfreerdp /monitors:1,2 /multimon /v:<host>
But run
xfreerdp /monitor-list
to check your monitor numbers first.I use FreeRDP and Windows regularly for work (and my host OS is Linux), so I’ve explored multiple options and none of the usual Spice-clients were any good; FreeRDP was by far the best option I found. It also supports DPI scaling, shared folders, clipboard sharing etc - all work pretty much out of the box (you may need to pass the respective parameters to the command though - run
xfreerdp --help
to check the options)One thing though, make sure you get FreeRDP version 3.xx. Some distros are still on 2.xx for whatever reason, but I’d highly recommend upgrading to 3.xx because there have been a ton of performance and QoL improvements since then, that’ll make a big difference for your usage.
As for the VM performance itself, make sure you give it sufficient CPUs (at least 4 cores, and passthru the CPU topology) and RAM (at least 8GB). It might also be worth debloating your Windows VM, using a script such as Win11Debloat (it works with Win10 as well btw).
suspend the VM if I switch away from that workspace back to Linux
You can use the
virsh suspend
command for that. But to have it automatically suspend when you switch workspaces, you’ll need to manually set up some automation, which depends on your DE/WM. KDE for instance has KWin rules which you can use to trigger a script or a command, other DE/WMs might have something similar. So you’ll need to explore your DE/WM’s window/workspace management and scripting options.But get familiar with the virsh command, as that’s what you’ll be relying on to manage your VM via scripts. The documentation has more details on the shutdown/suspend/hibernate features that’s worth taking a look at.
Awesome thank you for taking the time too be so detailed! Ok I think I’m starting to see what I need to do.
Any links to beginner friendly tutorials and guides will also be highly appreciated!
Assuming you’re on desktop, just grab a cheap amd gpu and do the gpu passthrough setup with kvm and virt-manager. No need to get an expensive gpu if you don’t plan to play games on the vm. The cheapest, bargain-bin second hand gpu will do, as long as it’s not too old.
Maybe I’m missing something but what is wrong with the Windows VM? As long as you are using KVM as the backend and you have vfio installed you are fine.
I would also setup GPU acceleration
With winapps you mean the tool that lets you use RDP to control a Virtual Machine as if it were a regular linux window?(edit: stupid question - you even specified the repo you got it from) If that’s slow, that wouldn’t be a winapps problem but rather virtualization problem since you should not feel the difference between an app running in a VM and a native app if it’s set up properly.Have you tried Quickemu? It should setup your windows VM for optimal performance automagically. There is even a graphical interface for it called Quickgui and both are available by running a single command on Ubuntu/Mint. Another thing might be not enough cores/RAM given to the VM.
Someone mentioned looking glass, which is imo an overkill for you, unless you’re doing some graphically intensive stuff like gaming in the VM.
That’s the tool yes. I’ve followed a guide that should have also included optimization. One of the problems I encountered: it doesn’t recognize the monitors properly which makes it a pain e.g. opening an email in a new window. Also lots of flickering and "wrong"colors (Outlook icon is turquoise for example). Nonetheless I would need a “full” Windows environment for the training sessions anyways (don’t want to confuse the attendees more than necessary by showing them an unfamiliar OS)
I see. I honestly don’t know how to do the multi monitor thing. The lazy part of me would avoid it if possible. A simple alternative could be something like a real RDP session on one monitor and a virtual monitor on the other. Obviously the issue would be that you would have 2 sessions opened at the same time instead of a single desktop. Another simple hack would be to expand the spice client over both of your monitors and set the VM’s resolution equal to the size of your 2 monitors combined.
But yeah I highly recommend Quickemu. It basically looks just like Windows on full screen if familiarity is your main issue. It also has alternative spice viewers in settings if you dislike the stock one.
I’ll definitely look it up. Thanks for the help!