Live data from Hacker News

Looking Glass: Run a Windows VM on Linux in a window with native performance

looking-glass.io

171–180 of 312 posts

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#171

I run a VFIO setup with a single GPU - the linux host is headless, and Windows runs on top with the GPU. Its pretty awesome. Windows runs at native performance - no problem gaming or running other heavy workloads. The linux host acts as a devbox and runs a few other homeserver style services. It's difficult to set up right but it taught me a lot about VMs and hardware. Once you get it setup well enough, its relativel…

If you have more than one GPU (even as in one on-board and one discrete) you can, with some effort, dedicate one of them to a VM and let the host use the other. Low-yield crypto mining is a common usage for that kind of arrangement, but I suppose VMs would work just fine too.

Or go full Unix and attach a serial terminal to the console port and happy linuxing from there while you ignore the built-in gaming console running off a VM. This is more or less what every modern console does anyway - a hypervisor under everything. ;-)

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#172

I'm an engineering software contractor and every client has a whole bucket load of outdated IDEs and random USB interface drivers they want me to install on my machine. Often this stuff has weird specific version dependencies, kernel level drivers that cause weird things to happen (like the computer to BSOD if you boot it up with other USB devices attached), random system level crashes, and when you go to the driver…

I would probably run proxmox if I was you and kit your device with extra peripheral cards that you pass through to the VM, with ZFS you can snapshot your vm volumes and proxmox has builtin support to do full backups and either store on your local machine or ship them off to a remote location. If you pass the GPU through to Windows you're going to be essentially native speed along with great security and flexibility. If you want to have multiple windows machines you could just rdp them unless you need GPU acceleration in them too.

If you're working on a laptop I would not recommend ZFS, ZOL doesn't implement freeze and thaw.

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#173

Earlier quoted context omitted.

I wrote this another comment, but instead of getting too much into an arms race, studios should invest more on server-side anti-cheat mechanisms. You could correlate community feedback and some machine learning, while also picking easy-to-catch impossible actions.

Server-side solutions don't catch all cheats. They can block actions that are impossible according to the game rules but they cannot prevent clients from disclosing too much information to the player about other players, or automating actions that are technically possible, like using aimbots.

Don't disclose to the client anything not in their view.

I know this is sometimes impossible and/or too costly to implement but it should be possible to find a compromise that prevents most of the blatant cheaters, eventually.

Also helpers like: In any score event, for randomly selected players, analyze the last actions taken.

You just cannot trust the clients. People will find creative ways of reading the memory of their own hardware, whatever you do.

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#174

Malwarebytes blocks this domain as a trojan, that's a false positive though, isn't it?

Indeed, AV vendors flag LG because the windows executable we host:

  1) It's not a signed executable (FOSS project, signing is a PITA without corporate sponsorship)
  2) Microsoft Defender flagged the exe for wanting admin privs
  3) Google were dumb and flagged us because MS did
  4) All other AV vendors flagged us because google flagged our website.
We had to put the exe into a password protected zip to stop Google flagging us as we couldn't convince the idiots (robots) there that it was a FOSS project with all sources available for review.

Feel free to help us out and report the false positive to your AV vendors! :)

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#175
post #18

If anyone is interested, the main developer, who goes by 'gnif' spends a decent amount of time on the dedicated Looking Glass sub-forum on the Level1Techs forum, here: https://forum.level1techs.com/c/software/lookingglass/142 Level1Techs also has a ton of information and help both on the forum, and their YouTube channel, about setting up Looking Glass and VFIO. The main host of the YouTube channel, Wendell, has forgo…

Gnif also has a patreon to support his work https://www.patreon.com/gnif (mentioning this because I only discovered it a long time after using looking glass)

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#176

Earlier quoted context omitted.

why don't you go the other way round, Windows native ane WSL2? Beside wanting to hack and learn things, obviouvsly.

This is an interesting question, since it's actually the underlying strategy of Microsoft (I don't imply it's a wrong thing). My personal motivation is that Linux power users will miss the control, or at least, customizability, of the operating system, which is something Linux does, and Windows doesn't (as they have different targets). Also, not to be underestimated, security (although for me it's only a very small f…

WSL2 doesn't support hardware perf counters, which means `perf` and `rr` won't work.

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#177

Earlier quoted context omitted.

Server-side solutions don't catch all cheats. They can block actions that are impossible according to the game rules but they cannot prevent clients from disclosing too much information to the player about other players, or automating actions that are technically possible, like using aimbots.

Don't disclose to the client anything not in their view. I know this is sometimes impossible and/or too costly to implement but it should be possible to find a compromise that prevents most of the blatant cheaters, eventually. Also helpers like: In any score event, for randomly selected players, analyze the last actions taken. You just cannot trust the clients. People will find creative ways of reading the memory of…

> Don't disclose to the client anything not in their view.

Either full of edges cases (how do you efficiently compute visibility, and can you prevent models from popping in as a result of latency) or computationally expensive[0]. Valorant, CSGO, League of Legends, Dota 2 are some of the games that I know about that implement server-side occluding to minimise the impact of wallhacks, but eventually a client will still need information like the position of an audio cue such as footsteps that cheats can make use of.

[0]: https://technology.riotgames.com/news/demolishing-wallhacks-...

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#178

Earlier quoted context omitted.

If this uses vfio then no, the host never sees the GPU, it's blind to it from boot.

What is stopping GPU hot plugging from working? There was this recent improvement at least: https://phoronix.com/scan.php?page=news_item&px=Linux-5.14-A... edit: seems there are some howtos - eg https://github.com/joeknock90/Single-GPU-Passthrough

Two reasons (in the context of a standard desktop user, not headless server):

1. Desktop environment, which uses the video card; this is not a big deal, since one can terminate the session

2. video drivers correctly and fully releasing the card; this is possible, but in my opinion, not stable.

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#179

I run a VFIO setup with a single GPU - the linux host is headless, and Windows runs on top with the GPU. Its pretty awesome. Windows runs at native performance - no problem gaming or running other heavy workloads. The linux host acts as a devbox and runs a few other homeserver style services. It's difficult to set up right but it taught me a lot about VMs and hardware. Once you get it setup well enough, its relativel…

> most online games with anti-cheat etc.

Any notable exceptions?

What's the performance like compared to the same games in a native Windows install. I tried proton several months ago and I had to go back to Windows because it wasn't even close to good enough as far as compatability goes.

I'd really love to abandon Windows as a desktop OS and just game in a VM though.

Re: Looking Glass: Run a Windows VM on Linux in a window with native performance

#180

Earlier quoted context omitted.

That sounds very interesting. Does that mean I should be able to load a VM containing my windows partition fron linux, even without a dedicated GPU? Do you have a pointer to a tutorial explaining the setup ?

Yes, I can confirm that this works. I have one windows installation and can either directly boot windows on the host or start it within Linux with VFIO.

Do you know where this is documented? This would be very useful to me.
Post reply on HN