Live data from Hacker News

Windows Subsystem for Linux 2 Moving into General Availability

infoq.com

341–350 of 420 posts

Re: Windows Subsystem for Linux 2 Moving into General Availability

#341
post #206
post #53

Earlier quoted context omitted.

Stop blaming Hyper-V for "crippling other VM software". You ever tried to run VBox and KVM together? It's a limitation of the processor's virtualization extension.

Yes, I have? I am... currently doing so... Although, I don’t know if both kinds of VMs can run in parallel. I recall at least doing so with VMWare in the past. The thing is, when enabling Hyper-V on Windows, you can’t do anything without fully rebooting. On Linux I know for a fact you do not need to reboot to switch between VMs.

Hyper-V is a type 1 hypervisor. Even windows runs within it when enabled. Comparing to KVM would be better rather than VBox or VMWare. Try VBox with KVM to see same effect.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#342

VMWare [0] will also support the Hypervisor Platform Api [1] allowing it to run besides WSL2 which uses Hyper-V. VirtualBox is still struggling and runs slow if at all with WSL2 and Hyper-V [2] This of course has implications on how you setup Docker on a Windows machine, each way having pros and cons. [0] https://blogs.vmware.com/workstation/2020/01/vmware-workstat... [1] https://docs.microsoft.com/en-us/virtualizati…

This is a worrisome development. We seem to be heading toward a future where hypervisor drivers can only be provided by Microsoft, and you're out of luck if they don't do the job. Hypervisors that need more capability are going to have to do some crazy stuff to stay compatible. One option is to save and restore the whole hypervisor state whenever it runs. Another option is to be some sort of boot loader, seizing the…

Type 2 hypervisors are going to be in an interesting state. The Windows bootloader already has a flag you can easily toggle (without removing the Hyper-V role or config) but the problem is more features are starting to depend on Hyper-V being there one layer up (it's a type 1 hypervisor). I'm surprised nested virtualization can't be used for the type 2 hypervisor since Hyper-V picked this feature up a few years back and it seems like that would have solved all of the problems.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#343
post #7

I switched to WSL2 a month ago and it's been great. With WSL1 I'd regularly run into subtle compatibility problems but haven't seen anything like that with 2. Despite a handful of annoyances, the Win10+WSL2+Visual Studio Code Dev environment has been a lot more pleasant than OSX.

Cool thanks for the info. Can i just update from wSL1 or do i need to be careful? Bit scared that it will screw up some things :-)

Thanks

Re: Windows Subsystem for Linux 2 Moving into General Availability

#344

Earlier quoted context omitted.

Integration is even tighter now its not just a VM like many commented here.

Can you write a single feature that's available in WSL 2 but not in VirtualBox?

- seamless file system integration - network (you can use 127.0.0.1 to access services in WSL2 or Windows) i.e. it runs on the same home IP.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#345

Earlier quoted context omitted.

That has been my experience as well. WSL2 is much much faster.

Do you specifically mean \\wsl$ is much faster on WSL2?

Any interaction with the linux filesystem.

With WSL 1 installing an Ubuntu package or performing an upgrade was unbearably slow, with WSL 2 it feels normal.

\\wsl$ is also much faster, yes

Re: Windows Subsystem for Linux 2 Moving into General Availability

#346

Earlier quoted context omitted.

Presumably the draw is UNIX, not the Terminal app itself.

One of my main pain points in Windows is that the terminal app options are so crap compared to iterm2 or even the plain terminal app. The app itself is definitely a draw too

Were you thinking of the Console Window? If so, that's not a terminal in the UNIX sense.

These days, there's the Windows Terminal, which is fine, surely, https://www.microsoft.com/en-us/p/windows-terminal-preview/9...

Re: Windows Subsystem for Linux 2 Moving into General Availability

#347

Earlier quoted context omitted.

Do you specifically mean \\wsl$ is much faster on WSL2?

Any interaction with the linux filesystem. With WSL 1 installing an Ubuntu package or performing an upgrade was unbearably slow, with WSL 2 it feels normal. \\wsl$ is also much faster, yes

Normal interactions from within WSL of course feel normal. It's just a VM with a fancy name after all. Which is removing pretty much all the overhead of the Windows I/O system, and which has hence been faster for ages. I'm surprised \\wsl$ would be faster though; that should have more overhead going through a VM, not less. If I ever try out WSL2 I'll have to give it a shot, but somehow my past experiences don't leave me optimistic...

Re: Windows Subsystem for Linux 2 Moving into General Availability

#348

Earlier quoted context omitted.

Go to \\wsl$\ and it mounts the WSL instances as network drives.

So the idea is that you put all your work in that network drive and then open it across the network from your IDEs and Explorer etc? I mean, not hating it, but that doesn't feel all too straightforward, definitely less sonthab wsl1 :/

I think you can mount to a drive letter as well.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#349

In WSL1, running "wsl git status" on a moderately sized repo on an NTFS (Windows side) drive or SMB file share is nearly instantaneous. In WSL2, running the same command takes over 30 seconds. WSL2 is a massive hit to the seemless experience between the two operating systems with filesystem performance from Linux to Windows files orders of magnitude worse. Yes, unzipping tarballs or manipulating and stat syscalls are…

WSL2 is really not designed for using Linux tools on your NTFS-based filesystem. Store everything on the WSL filesystem, that works perfectly. If you need GUI tools try VcXsrv.

I have my projects in WSL and IDE (jetbrains) in Windows. Works fine, obviously IDE file system responsiveness is lower than native but the execution / build performance of project in WSL makes up for it.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#350

Earlier quoted context omitted.

Integration is even tighter now its not just a VM like many commented here.

Can you write a single feature that's available in WSL 2 but not in VirtualBox?

I don't use virtualbox, so I'm guessing at some features:

* The Linux filesystem shows up in Windows as a disk even when the underlying VM is not booted, you can see an example here: https://redmondmag.com/articles/2020/04/08/~/media/ECG/redmo...

* And for me the nice one is the integration with VS Code, I just select which distro I want to work in and VS Code will start it (if it isn't running), connect to it as a remote dev environment, and be able to control it as if the VM were within VS Code. It can be done manually with VirtualBox, but VirtualBox gives me no advantages in return.

* The networking implementation makes both 127.0.0.1 which is occasionally useful for me.

Post reply on HN