News for hackers. Stuff that matters.
Re:Looking Glass: Run a Windows VM on Linux in a Window with... by DoofusOfDeath on Saturday April 18, 2020 @03:19PM (#22910321)
Slightly off-topic:

I'm getting ready to build a new Linux gaming PC. I'm considering installing Windows 10 in a guest VM so I can run a few modern games that do poorly under Steam / Proton.

Anyone suggestions for good sources of info regarding which software stacks (e.g., Ubuntu 19.10 + VMWare) are likely to provide a good experience? Graphics performance matters.

I'm unwilling to run Windows 10 as the host OS because of personal feelings about telemetry.

Re:Looking Glass: Run a Windows VM on Linux in a Window with... by pvik on Saturday April 18, 2020 @03:45PM (#22910523)
My main desktop runs Linux, I do have a Windows VM (on qemu/libvirt) that I use primarily for Fusion360 and some gaming.

I had to setup GPU passthrough with a second GPU for this.

It is not that hard, you will however need to make sure your motherboard supports proper IOMMU grouping. This however, is the tricky part since most motherboard manufacturers do not really provide this information.

[1] More info on ArchWiki: https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVM...

Re:Looking Glass: Run a Windows VM on Linux in a Window with... by DoofusOfDeath on Saturday April 18, 2020 @05:58PM (#22911459)
So IIUC your approach, you're exposing the actual GPU to the guest OS via PCI-passthrough. And in practice that means you'll want two GPUs: one for the host and one for the guest.

But looking at the online docs for VMWare Workstation, it sounds like they take a different approach: the guest VM has a virtual device driver that lets both host and guest OSs use the same GPU at the same time.

I would think the VMWare Workstation-like approach is preferred, because it avoids the hassle of using two graphics cards. I know that Workstation is expensive ($250) and not OSS. Besides those two reasons, are there still reasons to prefer the PCI-passthrough approach?

Re:Looking Glass: Run a Windows VM on Linux in a Window with... by comex on Saturday April 18, 2020 @08:46PM (#22912438)
> Besides those two reasons, are there still reasons to prefer the PCI-passthrough approach?

The software approach generally has lousy performance due to the extra overhead of forwarding rendering commands between the guest and host. In addition, since this approach requires writing a completely new graphics driver for the guest, there tend to be limitations with rendering API compatibility, as well as bugs. With the hardware approach, the guest can use the GPU vendor’s normal driver.

Re:Looking Glass: Run a Windows VM on Linux in a Window with... by aakresearch on Monday April 27, 2020 @01:16AM (#22993076)
Just yesterday I finally got to running actual tests of graphical performance between my host (Windows 7 Ultimate, NVIDIA GTX 950 - not top of the range :)) and guest (Windows 10 Pro running inside VMWare Workstation 15). Used "PerformanceTest 10" from Passmark. Host scored 6015, ran all benchmarks nicely. Guest scored 1645, only ran some benchmarks (due to lack of Dx12 and compute capabilities), and even those were penalized.

Virtualbox guest didn't participate in the contest, as I find graphical performance of VBox guests noticeably worse.

I must add though, that for desktop tasks VMWare Workstation performance is absolutely adequate, able to run double 2K monitors wonderfully. For gaming setup I'm personally planning to play with PCI-passthrough. The only problem is not to get lost in the tinkering, before playing any actual games :)

Re:Looking Glass: Run a Windows VM on Linux in a Window with... by pvik on Sunday April 19, 2020 @08:27AM (#22915439)
I did not try VMWare Workstation, but I did try VMWare Player and VirtualBox to see if I can get away with running Fusion 360 on a plain VM, and both had extremely horrible performance.

I remember even SketchUp wouldn't start in VirtualBox. I was able to get SketchUp running in VMWare Player, but the performance was very bad.

edit: this was also about 1.5 years ago, not sure how much improvements VMWare and VirtualBox have made in that time in terms of virtualizing GPU calls.

That is why I decided to end up setting up a VM with GPU passthru. It works extremely well for my usecase. I was able to score a cheap GPU for my Linux host (since I do not do anything graphically intensive on Linux, just need to drive 3 monitors), and was able to passthru my more expensive GPU over to the Windows VM. I would assume if you have integrated graphics on your CPU, you could use that for your host OS and get away with having only a single GPU.

Re:Looking Glass: Run a Windows VM on Linux in a Window with... by DoofusOfDeath on Sunday April 19, 2020 @04:56PM (#22918719)
With your setup, is there a convenient way to flip back and forth between which GPU is used by the Linux host vs. which GPU is used by the Win10 guest?

I'd still like to use Windows 10 only for those games that I can't make work on Linux.

Re:Looking Glass: Run a Windows VM on Linux in a Window with... by pvik on Monday April 20, 2020 @07:33AM (#22922944)
I use a separate GPU for my linux host and the windows VM.

I am 99.9% sure you can not passthru a GPU to a VM that is being used by the host.

edit: I think I misunderstood your question. The GPU that gets passed thru to the VM, never gets initialized by the host system during boot. So, if you want to change which GPU you want to passthru to the VM, you will have to reboot to allow your host to use the other GPU (and not init the on you want passed thru to the VM).

I would suggest you look at a youtube video where they run thru setting this up, so you get a better idea of what this entails!

Re:Looking Glass: Run a Windows VM on Linux in a Window with... by DoofusOfDeath on Monday April 20, 2020 @08:06AM (#22923114)
Thanks! I'm still deciding if it's worth the effort just to play certain games on Windows 10. The ease with which I can change the OS-GPU association may be the deciding factor.
Re:Looking Glass: Run a Windows VM on Linux in a Window with... by swebs on Saturday April 18, 2020 @03:36PM (#22910450)
I haven't tried it myself, but there's a bit of info on the /g/ wiki with a hardware database linked at the bottom.

https://wiki.installgentoo.com/index.php/PCI_passthrough

Re:Looking Glass: Run a Windows VM on Linux in a Window with... by dehrmann on Saturday April 18, 2020 @04:15PM (#22910734)
I've used PCI passthrough with VMWare ESXi. It's good when it works, but when it doesn't, you're out of luck. I doubt GP will have much luck with VMs once it gets to 3d acceleration.
Re:Looking Glass: Run a Windows VM on Linux in a Window with... by deadbunny on Saturday April 18, 2020 @06:07PM (#22911524)
GPU passthrough with qemu/kvm works spectacularly to 3D applications, I've been using it for years to play Windows only games from my linux desktop.
Re:Looking Glass: Run a Windows VM on Linux in a Window with... by cercatrova on Saturday April 18, 2020 @04:24PM (#22910801)
I run Proxmox (Debian) with an AMD GPU as well as Nvidia. I can pass both to Windows and they work fine, the Nvidia one is much more of a hassle though, you can run into Code 43 issues, meaning that Nvidia detects you're in a VM and refuses to start. On AMD this is much less of a problem.