News for hackers. Stuff that matters.
Re:Microsoft submits Linux kernel patches to enable complete... by AshamedCaptain on Wednesday September 16, 2020 @06:17AM (#24491228)
It doesn't matter how the hypervisor is arranged, but it is still just a virtual machine. Just because it happens to run on a type1 vs type2 hypervisor means not much, or just go ask around whether Xen is any faster than KVM these days.
Re:Microsoft submits Linux kernel patches to enable complete... by danieldk on Wednesday September 16, 2020 @06:22AM (#24491246)
But the filesystem integration is much better than a VM in macOS, being able to run Window programs from Linux, etc.

Also, Windows has decent X11 servers that work well with retina displays, which can't be said of XQuartz.

Re:Microsoft submits Linux kernel patches to enable complete... by tremon on Wednesday September 16, 2020 @07:50AM (#24491693)
The filesystem integration is not without flaws though, it doesn't seem to implement full posix semantics.

Many times in WSL2 I've had a git rebase fail because it couldn't overwrite existing files, and every time it could be fixed by just running git rebase --continue. The actual problem seems to be that WSL2 system calls return before the NTFS operation completes, so quick successions of create-after-unlink or write-after-rename can have unexpected results.

For this reason I still keep a WSL1 environment, it doesn't have the same issues (and doesn't appear to be any slower for filesystem operations).

Re:Microsoft submits Linux kernel patches to enable complete... by Filligree on Wednesday September 16, 2020 @09:11AM (#24492347)
> For this reason I still keep a WSL1 environment, it doesn't have the same issues (and doesn't appear to be any slower for filesystem operations).

It's definitely a great deal slower for filesystem operations inside the Linux system. Filesystem operations outside the VM's disk image go through 9p, which gives you basically the same performance for both.

Re:Microsoft submits Linux kernel patches to enable complete... by AshamedCaptain on Wednesday September 16, 2020 @06:41AM (#24491319)
"Windows programs for Linux"? It doesn't really have any better filesystem integration. The filesystem is stored on a disk image on WSL2 as on any other VM. You can mount other host filesystems from inside the VM in any hypervisor I know of.

Ack on XQuartz being crap (thought it does have Retina support these days, at least for non-rootless mode), but this is not really a problem of the VM.

Re:Microsoft submits Linux kernel patches to enable complete... by skinkestek on Wednesday September 16, 2020 @06:53AM (#24491368)
It works so crazy well that sometimes it works and then I stop and think: how did that work.

Example: I type code ./somefolder in WSL and it opens VSCode on Windows, editing the folder I specified.

Edit: danieldk replied just before me, but I think my answer adds to that instead of just duplicating danieldks.

Also danieldks answer highlights something important: it doesn't seem to be just magic shell wrappers (or if it is they are truly magic).

VSCode is somewhat special when it comes to editing files, Notepad is not.

Re:Microsoft submits Linux kernel patches to enable complete... by danieldk on Wednesday September 16, 2020 @06:50AM (#24491355)
"Windows programs for Linux"?

Whoops, typo. Windows programs from Linux, I'll fix that.

You can mount other host filesystems from inside the VM in any hypervisor I know of.

In most hypervisors you can't do a

  notepad.exe foo.txt
or

  TextEdit.app foo.txt
for that matter in a Linux VM,
Re:Microsoft submits Linux kernel patches to enable complete... by microcolonel on Wednesday September 16, 2020 @08:48AM (#24492126)
With virtio-fs I think this is becoming more doable. Of course, it's not quite as fast as running a guest filesystem on virtio-blk yet, but maybe it'll get there.
Re:Microsoft submits Linux kernel patches to enable complete... by fomine3 on Friday September 18, 2020 @12:12AM (#24512921)
WSL can run `notepad.exe foo` from bash. Not only fs integration.
Re:Microsoft submits Linux kernel patches to enable complete... by microcolonel on Friday September 18, 2020 @09:42AM (#24516654)
> WSL can run `notepad.exe foo` from bash.

Isn't that just a binary loader, like you can do with wine/qemu on any Linux? Surely it's mostly just proxying the pipes, replicating the working directory, and maybe keeping some of the environment variables. The filesystem integration seems like the trickiest part of that altogether.

Re:Microsoft submits Linux kernel patches to enable complete... by dboreham on Wednesday September 16, 2020 @10:40AM (#24493137)
Also networking. e.g. you can spin up a Node.js server in Linux then connect to it with Chrome on Windows at http://localhost