Live data from Hacker News

Windows Subsystem for Linux 2 Moving into General Availability

infoq.com

391–400 of 420 posts

Re: Windows Subsystem for Linux 2 Moving into General Availability

#391
post #27

Earlier quoted context omitted.

> Presumably, this also means you have to have Hyper-V enabled, crippling all other VM software How does hyper-V cripple other VM software? I just had to enable it to use a prebuilt VM I need, now I’m a little worried

Last time I checked (months ago) VirtualBox just couldn't run under Hyper-V. If you Google around you'll see lots of threads, e.g. https://superuser.com/q/1208850 Apparently they claim that as of February 19, 2020, they've "Restored the ability to run VMs through Hyper-V, at the expense of performance". https://www.virtualbox.org/wiki/Changelog-6.1

VirtualBox seems a victim of Oracle's usual apathy as a project custodian. Nearly every other VM vendor has added or accepted (Microsoft employees were even directly involved in PRs to qemu and other) performance improvements on Hyper-V.

It's almost like Oracle is trying to upsell VM servers at the expense of the day-to-day operations of the once well regarded open source project they maintain?~

Re: Windows Subsystem for Linux 2 Moving into General Availability

#392

Earlier quoted context omitted.

I use Cmdr (with solarized theme and Consolas font) with Zsh and Oh My Zsh (with agnoster theme), but it is really a matter of taste.

Another happy cmder and Consolas user here! Never used Zsh tho - what benefits does it have?

For one thing, with Oh My Zsh, you can use nice themes like this: https://github.com/agnoster/agnoster-zsh-theme

Zsh have a long list of nice features that Bash lacks. Two of my favourites:

1. Imagine you are in a directory with file1.ext and file2.ext. You type f[TAB], it autocompletes it to file. So far, Bash and Zsh are the same. If you continue pressing [TAB], bash prints a list of files so you can complete typing the name yourself. Zsh starts cycling through filenames.

2. In Zsh, you can type for example /u/lo/b[TAB] and it automatically expands the path to /usr/local/bin. If multiple paths match the original expression, it shows a list and pressing tab cycles through the options.

Zsh is quite feature-rich, and for the most part a drop-in replacement for Bash. See this slide deck for more Zsh awesomeness:

https://www.slideshare.net/jaguardesignstudio/why-zsh-is-coo...

Re: Windows Subsystem for Linux 2 Moving into General Availability

#393
post #328

Earlier quoted context omitted.

For now.

Even if Microsoft was willing to throw away what makes Windows have the desktop market that Linux will never have, and go back to its Xenix roots, Linux would probably get as much back as it has been getting from all those Android OEM contributions. So not really a reason to cheer what would be yet another pyrrhic victory in the desktop/mobile space.

> Microsoft was willing to throw away what makes Windows have the desktop market

I certainly neither said, implied, or agreed with that concept, no.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#394
post #280
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.

Did the same. Just that i use emacs with x410. Only gripe I have at the moment that docker eats up a lot of memory. But everything else works perfectly fine. Was quite surprised and happy.

X410 is a bit more inconvenient w/ WSL2 because the VM has it's own IP address vs using whatever local magic it did before.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#395
post #145

Earlier quoted context omitted.

I think you read it backwards. It's cygwin that doesn't. WSL1 did.

Ah. My bad :) Should’ve known better than to comment here before I had my coffee.

Hah, no worries, it took me 2-3 reads to parse that correctly too.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#396
post #316
post #116

Earlier quoted context omitted.

I use Docker on macOS daily for work. I love it, and am grateful for it, but the experience is NOTHING like using Docker on Linux. Docker for macOS runs in a virtual machine, and requires dedicating RAM to the daemon. You aren’t directly using the host OS’ kernel either, which can lead to wonky behavior, especially in regards to networking (IME).

Have you tried podman ( https://podman.io/whatis.html )?

How would podman help here? It doesn't run on macOS at all.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#397

Earlier quoted context omitted.

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

Starts in one second.

That's not a feature. And in practice it's not even relevant, because you can start your VM at Windows startup and use Putty to ssh into booted system which takes a fraction of second.

Also slim CentOS image boots, well, not in one second, but something like 5 seconds. Fast enough IMO.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#398

Earlier quoted context omitted.

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…

Nested virtualization only works when the outer hypervisor supports all the features that the inner hypervisor needs. If the outer hypervisor is Hyper-V, then that limits the inner hypervisor to the features that Hyper-V bothered to implement.

In other words, you can't implement a hypervisor more advanced than Hyper-V.

If you instead want to be on the outside, with Hyper-V on the inside, then you can't just write a driver. You have to implement a boot loader. You also have to implement nested virtualization, even if you otherwise had no need to do so.

Re: Windows Subsystem for Linux 2 Moving into General Availability

#399

Earlier quoted context omitted.

Unfortunately Git on Windows is also extremely slow. Especially using Magit in emacs, which does a lot of git calls, works much, much faster for me if it's sshing to a Linux VM for each call then running natively on Windows.

Git is not slow for me. Don't know about Emacs, but I'm using git from command line and from Idea and it works just fine, instantly for ordinary tasks. Commiting 1000+ files takes few seconds. Given the fact that Git is used for Windows development with monster monorepository, I think that something's wrong with your setup rather than Git on Windows in general.

Git itself is decent, the problem is that Magit calls git a lot of times for a single GUI action. For some things, it can call git 5-10 times for a single key press. If every git invocation is around 1 second, that becomes a noticeable delay...

Re: Windows Subsystem for Linux 2 Moving into General Availability

#400

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…

If microsoft implemented the host side of virtio-fs then the guest could make use of that. Also, IO performance of WSL1 wasn't exactly great either compared to native linux filesystems.

Apparently[1] virtio-fs wasn't mainlined in Linux until 5.4, which was rolled last November. I thought it had been mainlined years ago. That helps to explain why support is lacking everywhere.

[1] https://kernelnewbies.org/Linux_5.4

Post reply on HN