270 points · by TiredOfLife · 7y ago · 195 comments
If WSL v2 is running VM under the hood, no wonder it will be Hyper-V. We already have such lightweight VM for "Credential Guard/Device Guard" and it already conflicts will any other hypervisor: VMWare workstation [1], VirtualBox. Resolution is to disable Hyper-V, for instance, with command line
bcdedit /set hypervisorlaunchtype off
So most probably WSL v2 will do the same, which means one cannot run WSL v2 and non Hyper-V VMs at the same time, because two different hypervisors can't coexist.At this rate -- for my uses, anyway -- I expect Microsoft to update and expand Hyper-V (and Sandbox, and WSL v2) in a much more timely fashion than Workstation, especially considering it's a core technology of theirs (across desktop and also server). On top of that, VirtualBox and QEMU now support the new Hypervisor APIs[1], so Workstation is the odd one out in my mind.
In the end between updating my license and sticking with this, I haven't gone back yet, but we'll see once I put Hyper-V in 1903 through the motions...
[1] I actually recently installed QEMU for Windows, followed some of those Rust OS tutorials, and booted my own disk image in QEMU's graphical mode, using the WHXP mode in QEMU (-accel whxp on Windows, instead of -accel kvm on Linux) and it all worked like a charm. Amazing how well QEMU seems to work these days on Windows.
[1] https://forums.virtualbox.org/viewtopic.php?f=6&t=90853 [2] https://docs.microsoft.com/en-us/virtualization/api/
I hope you don't have to have a non-home license for Windows to run WSL 2, that would be really annoying.
It's not running in a Hyper-V virtual machine, just like the Java virtual machine isn't a Hyper-V virtual machine.
It's more like how 16-bit Windows executables ran on 32-bit Windows - in a very thin "virtual machine" long before hypervisors were a thing.
I guess there is no hope that one will be able to continue to use WSL v1?
Looks like that guess is wrong:
“WSL 2 is a new version of the architecture that powers the Windows Subsystem for Linux to run ELF64 Linux binaries on Windows. This new architecture changes how these Linux binaries interact with Windows and your computer’s hardware, but still provides the same user experience as in WSL 1 (the current widely available version). Individual Linux distros can be run either as a WSL 1 distro, or as a WSL 2 distro, can be upgraded or downgraded at any time, and you can run WSL 1 and WSL 2 distros side by side. WSL 2 uses an entirely new architecture that uses a real Linux kernel.”
https://devblogs.microsoft.com/commandline/announcing-wsl-2/
Windows 10 support for things is fantastic. It's faster than Mac OS X and Linux for me. It multitasks better. The HDPI support is very mature compared to Windows 7/8. Multi-monitors just work. I love snapping windows (via corners and hot keys). Also Windows Key + Shift + S to click+drag screenshots to clipboard.
Everything just works. Or the driver is a Google away. Wireless printers and scanners. Bluetooth headphones. Apps like slack, trello, spotify.
While I haven't used the Surface, I was considering one for development, but the repairability on the Surface Book 2 (if that's what you mean) is worse than the Macbook Pro: https://www.ifixit.com/Teardown/Microsoft+Surface+Book+2+Tea...
On the other hand, Windows 10 "just works" on a lot of hardware. I recommend Lenovo X and T series. Dell XPS series are getting good reviews.
WSL: I'm running webpack via npm, postgres, django and flask. I keep the project files in the windows layer and symlink it into WSL. I turn off Defender because it's the only way to work. WSL is far too slow for me to use Defender on.
Despite that, I turn a lot of call home stuff off. There's tons of telemetry stuff that adds no value. I tried W10Privacy and OOSU10 for it. I wish Microsoft would just add a button to turn all the cloud cruft/call home stuff off.
There is a nasty issue where running rm -rf node_modules that can cause the system to freeze. So go into explorer to remove that with shift+delete. Sometimes I still have to restart.
Microsoft has won a lot of confidence from me with Windows 10, VSCode, and WSL.
Whatever approach they choose, I'm confident they have the ability to ship a Linux distro that runs Windows apps well. It would certainly be a lot easier than going the other direction (Linux compatibility in Windows).
Doing so might give them a more attractive offering for the future while retaining most of the Windows legacy business. It would also let them leave lots of legacy problems behind, and pick up a lot of the "real desktop computer for real work" business that Apple is pushing away in its own gradual transition to the "controlled purchasing portal" OS they love.
My thinking is mainly that while windows is still a little behind MacOS for some things, it's headed in the right direction, and MacOS is heading the other way. The hardware is superior in almost every way to what I was looking at in a MBP (my windows machine is a SB2), only complaints are about the location of the headphone jack, and the fact that the rubber "feet" on the bottom of the laptop have come unglued, which does kinda suck.
You may have some odd hardware issues with discrete GPUs and some other devices (I'm looking at you, Lenovo, and your gorgeous e-ink keyboard I want so much), but if you stay within the basics, there's no reason to assume Linux won't work with it.
As another osx refugee, I've spent time on both Windows and Linux. There's no "just" Linux, it has plenty of its own annoyances - to be honest it's a bit of a wash between it and Windows for me. WSL 2 could push me back.
Things take longer, and don't work out of the box.
I LOVE Ubuntu Server though, fav of all time.
Specifics here would be valuable input.
Dell, Razer and Lenovo's laptops have stagnated over the last few years. Huawei + Microsoft seem to be the ones with the freshest new offerings, but I am not buying a Huawei product.
So, I am hoping Microsoft delivers.
A BSD or Mach kernel, perhaps -- that's been done successfully already on the desktop. Linux? No chance.
Mine has handled every programming, design, and editing I've ever needed.
Btw, I just Virtual Machine or SSH my linux boxes.
This is a very interesting phrase. Linus often appeared to be yelling at developers not respecting the rule #1 of the kernel. However the kernel being strictly backward compatible is a boon for Linux users, most of the industry should be inspired by this strict policy.
Interestingly, Microsoft (compared to Google, Apple...) is the company providing the best long term support for its products.
So I'm really fond of that they wrote: "One of the great things about Linux is its stable and backwards compatible system call interface." I immediately added a big fat: "in contrast with the NT kernel" in my head :D
I don't think they officially guarantee it, but would you mind elaborating on this? They change the syscall numbers frequently, which you never ever use on Windows (you reference them by name instead), but any syscall that I've ever used (NtCreateFile, NtQuerySystemInformation, etc.) has been rock solid/stable. What syscalls have you seen broken in the past that users were actually relying on?
Any system that supports static binaries needs a stable system call interface if it wants binary compatibility. IIUC, Windows never supported static binaries.
Oh... And zOS/zVM. "Mature" no longer describe those two. "Timeless"/"Ageless"/"Eternal" would probably be better words.
Unfortunately the rest of the echo system like glibc people have not learned this rule. So practically it's not as beneficial as one would hope.
Edit: more info here: https://devblogs.microsoft.com/commandline/announcing-wsl-2/
"dramatic file system performance increases, and full system call compatibility, meaning you can run more Linux apps in WSL 2 such as Docker."
That will be welcome. I use WSL, but it's currently very slow for anything that touches lots of files, like a git clone, rsync, etc.
https://nickjanetakis.com/blog/setting-up-docker-for-windows...
https://nickjanetakis.com/blog/setting-up-docker-for-windows...
For me, personally, it seems like another failure. I don't see any reason not to use Linux in VirtualBox. It's simpler and it works. Their original approach was something new and interesting. Microsoft started to make very questionable decisions lately.
I hated dealing with the install, which often didnt work.
And getting anything to work perfect was too much work.
But I love Ubuntu Server, and the idea of being able to use linux without a separate install changes the potential of my Laptop.
Although, technically, wasn't that ABI translation layer a form of virtual machine? I wonder how much of the change to a VM is just nomenclature.
The problem with this is that you are always chasing down the corner cases.
One thing that is nice about WSL is that you don't worry about any of that. Am I going to see a 1gb block of memory reserved every time I start up an linux terminal?
I did use Windows & wsl for development for much of 2018, and (coming from a mac) found it surprisingly usable. The separate filesystem hierarchies was a bit of a pest, and I reverted to Linux for the first time in some years. But that has plenty of its own annoyances, and I'll be interested to check out wsl 2.
I personally think that this is a good thing in the short-term for both Linux users and Windows users in that it gives both platforms a sort of kick in the pants each to deal with one platform's deficiency by incorporating the other's strength. I could speculate about where this all could go wrong long-term, but that is basically a future resurgence of embrace-extend-extinguish, which anyone here can look up. What is important now is that people voted with their time, their wallets, and their voices to give Microsoft a strong enough signal to invest their future product development around. These people include Linux users, Linux developers (kernel and userspace), Windows users, and Microsoft itself and all of them deserve some amount of gratitude for getting us here today so thank you.
To be completely honest, the only way this news could be any better in my eyes was that if Microsoft also committed to being 100% privacy-focused and removed any and all telemetry from Windows, but I guess the four groups of people I laid out previously did not want that level of privacy just as badly.
As much as I'm also privacy minded, I do support telemetry in software (not the kind that touches my data) but if the developers can get traces of how people actually interact with their product and what happened when their product did crash - it helps a LOT, not only technically but also to shift management's focus onto an issue.
What do you have against telemetry in software? (again, not the kind that saps your data for gains).
Installing certain apps do tend to be on the slow side so if WSLv2 can resolve this, that would be great news. As for the implementation is concerned, I have no idea what they are talking about.
Good. I hope this trend continues.
Linux has already thoroughly trounced Windows in mobile (Android). It's done so in the web space. MS still has a strong foothold in enterprise, but it doesn't take a genius to see Linux continuing to expand on at least the backend in enterprise as well.
With more apps being delivered over the web, and web browsers being cross-platform, the desktop choice becomes less OS-centric for rote workers.
I can see this as Microsoft looking into a future where they lose relevance because of ChromeOS eating up the low end and MacOS eating up the high end, and they're left with institutional traction. Which they can coast on for many years, but not forever.
I wonder if they will be able to bridge that gap? I think I could be a happy windows user if I never had to touch PowerShell again.
Recent releases of WSL now let you access Linux files that are inside the distro from Windows using a special filesystem driver and magic path (\\wsl$\…)
https://devblogs.microsoft.com/commandline/announcing-wsl-2/
> WSL 2 uses the latest and greatest in virtualization technology to run its Linux kernel inside of a lightweight utility virtual machine (VM). However, WSL 2 will NOT be a traditional VM experience.
Emulating the Linux ABI is difficult (because it's full of crap).
At some point you get tired of emulating the garbage -- it's a large, underdocumented, and fairly fast moving target.
Next step: reverse this and make Windows run on Linux.
You can already do 90% of this. Only thing missing is allowing virtual machines to call up to the hypervisor to get a hook/render into sister machines.
https://github.com/kfroe/IndirectDisplay
It basically allows you to create a D3D device that delegates it's rendering to another D3D device in the system, and then the output surface can be either dealt with in software (CPU acts as protocol encoder), in hardware (ie. videnc/dec block + PHY hooked over USB/PCIe) or just memory mapped to host OS.
I'm inclined to think Windows is not a derivative work of the Linux kernel by any remotely tenable legal theory, but anyone with code in the kernel they are shipping willing to take the other side of that bet against Microsoft’s legal team has the option to try.
Longer guess: I suspect they are doing some fancy virtualization tricks here to service calls directly like they would a VM but in a VERY lightweight manner similar to containers. This fits with other announcements concerning containers that were also made today.
Again this is all supposition without any actual knowledge.
http://linuxdevices.org/using-a-hypervisor-to-reconcile-gpl-...
Such tricks are one of the reasons I support stronger copyleft like License Zero's Parity. Otherwise, they just loophole their way out of stuff.
The kernel part will be fully open source, which should be sufficient enough to comply with GPL
(IANAL)
this is an age-old debate. Some people say that it is e.g. legal to make (redistribute to precise) a GPL device driver for windows, and some argue that it is not, because the whole kernel should then be GPL.
> https://linux.slashdot.org/story/02/11/05/0051225/gpl-issues...
(You kind of need to be able to use GPL code dynamically to be able to run it from a proprietary OS of any kind in any way.)
So this starts to potentially make windows an alternative to macOS for developers. I moved to macOS because it was like having a linux/unix distribution that wasn't ugly, and just worked really well.
But I'm more than happy at the _idea_ that there's a viable alternative that allows me to still have high res displays and decent graphics and support, while allowing me to develop on a system that's a first-class citizen for most open source tools (which is Linux).
My impression is just as anecdotal as yours, but it's exactly the opposite. Windows seems to me to be gaining amongst developers, due to a combination of push and pull factors (respectively: Apple's declining hardware and Microsoft's improving software).
I'm a case in point: a few years ago I wouldn't have considered running Windows, but I was driven to trying it in 2018 by Apple no longer making any notebook hardware I was willing to use. Admittedly I'm now largely on Linux, but it's a close call between the two and I could be tempted back.
Not sure what you mean. Windows has been using PowerShell for almost a decade now as the Bash equivalent "everything at your fingertips" command line tool.
Personal opinion, in many ways PowerShell is more powerful than Bash. It's more verbose, but it's also easier to script.
Its designed to be integrated into everything. When my sysadmin GUI clicks vmWare I open PowerCLI. When my db admin uses networker for backup I use Sql Server Powershell Module. When my web dude clicks in IIS management studio and forgets the click I give him unmistakable ps1 script that crates IIS site and sets it up in 5 lines of code. Its like that forever.
Poweshell is no typical shell - u do business stuff in it, not text parsing all the time like in bash with 0.1% of what you actually want to do.
The thing that i personally miss is exporting config of Windows (control panel and friends) as powershell script(s). Something like DSC (or better, BoxStarter) but for grannies - press Start -> export everything to powershell script -> reinstall -> run ps1 -> run chocolatey -> show FTW sign.
It's not free of warts (the verbosity is annoying), but I personally find it much more readable than Bash scripts. The support for script modules also helps a lot if you are managing a lot of scripts.
https://docs.microsoft.com/en-us/powershell/scripting/instal...
This is opposed to WSL1 which is emulation and has extra layers to go through.
For example hyperkit.docker not running any container does ~90 wakeups/s on my machine. This comes mainly from just keeping the VM alive. This also prevents deeper sleep for CPUs.
The real issue is being able to read the WSL disk from Windows which you have to access as a network share from localhost