Live data from Hacker News

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

looking-glass.io

241–250 of 312 posts

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

#241
post #75

I thought it was Project Looking Glass [1] from Java era. It was really cool back then. [1] https://en.wikipedia.org/wiki/Project_Looking_Glass

Ah yes, I still remember little Jonathan Schwartz presenting project Looking Glass! Those felt like good days, even though it was clearly the end of Sun Microsystems.

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

#242
post #82

Earlier quoted context omitted.

> 3. No, we capture everything now, even the windows Login screen and windows updates, etc. B3 and B4 both have pretty huge improvements here, but there are still a few rough corners. For example, when logging out the host shuts down immediately upon request, so you can't see the "program X is blocking shutdown" dialog. But ultimately this is a very minor papercut for a very impressive and useful project.

Really? I see this all the time with my VM when I shutdown via LG.

Huh, so this is a bit more involved than I thought. I just tried again to confirm (still on B4).

The first time I tried I just got the Looking Glass splash as soon as I clicked shut down. When I cancelled that and tried again I was able to see both the throbber and the prompt. When I let the VM sit idle for a while before trying again, the LG splash was back. Rebooting the VM also seems to bring back the splash reliably.

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

#243
Very very impressive!

Is there anything similar in the works for a Linux-on-Linux scenario? My usecase is gaming without the host needing the proprietary nvidia crap (pass-through of the nvidia card for doing CUDA stuff in the guest already works great, but that doesn't help for e.g. Steam games).

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

#244

Earlier quoted context omitted.

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.

I wrote a `viewsetup` tool for setting up a /dev/mapper device (and VMDK file pointing to it) that I use for exposing a set of native Windows partitions while masking off the active Linux partitions. It's enough to allow booting Windows natively or in a VirtualBox VM using the same partition. But the steps to create backing files, run dm-setup to create the /dev/mapper device, and create the VMDK are all separate, so you ought to be able to use this with any virtualization tool.

I sort of have it documented at https://github.com/hotsphink/sfink-tools/blob/master/doc/Vir... though that's really a set of instructions intended for a new PC that a bunch of us at my employer recently received. You just want the `viewsetup` stuff. You probably want to leave off the `--auto` flag, so that it'll prompt you per-partition.

The tool goes to some effort to only expose the specific partitions needed. It also makes the virtual disk exactly match the native disk, copying small partitions (and gaps between them) to files and exposing those over loopback interfaces, so that Windows can go crazy and write over everything and it won't break your Linux setup. (The Linux partitions themselves are exposed as loopback devices to empty sparse files of the right size.)

Get the single script file at https://hg.sr.ht/~sfink/sfink-tools/raw/bin/viewsetup?rev=ti... or check out the full repo at either https://hg.sr.ht/~sfink/sfink-tools/ (mercurial) or https://github.com/hotsphink/sfink-tools (git). I keep both up to date.

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

#245
post #244

Earlier quoted context omitted.

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

I wrote a `viewsetup` tool for setting up a /dev/mapper device (and VMDK file pointing to it) that I use for exposing a set of native Windows partitions while masking off the active Linux partitions. It's enough to allow booting Windows natively or in a VirtualBox VM using the same partition. But the steps to create backing files, run dm-setup to create the /dev/mapper device, and create the VMDK are all separate, so…

Thanks! I will test this out later.

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

#246

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…

why don't you require clients to provide a lab machine for all their requirements?

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

#247
I was confused for quite some time--I thought this was the same company that creates the holographic display, and this software is used to display content on the device. Which didn't make sense to me since it simply acts as an external monitor. The more I read, the more I got confused.

Just a warning to readers that it's not the same company :)

https://lookingglassfactory.com/

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

#248
post #217

Does it work with desktops with two PCIe GPUs or is it only for laptops? Do I need HDMI dummy plug in "Windows" card?

Yes, desktops with two PCIe GPUs is actually the more common use case. As for dummy plug, it's most likely need to convince windows to turn on the GPU when you are not plugging a monitor.

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

#249

FWIW, I got native windows performance on a Linux host just using virtualbox and (the key part) a virtual disk file that I manually edited to point directly to a windows partition on disk. This made it obvious that file IO was the bottleneck...

Is it really native performance? I find it hard to believe but now I'm curious and will have to try this out...

Close to native disk performance, but graphics performance (and capability/compatibility) are not at all native.

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

#250
post #100

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…

You can't mention VFIO without mentioning the amazing subreddit, r/VFIO[0]. [0]: https://www.reddit.com/r/VFIO/

Even more amazing on the old interface:

https://old.reddit.com/r/VFIO/

Post reply on HN