Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can you clarify what you mean?


I believe the problem is that if you're running WSL2, you're automatically running Hyper-V, which monopolizes hardware virtualization on the machine, so you can't run VirtualBox, VMware, etc.


VMware are doing some work to integrate with the Windows Hypervisor platform (https://docs.microsoft.com/en-us/virtualization/api/hypervis...). IIRC they have a release coming early next year that will allow VMware Workstation and Hyper-V to coexist. I suspect other tools also need to support that if they want to run side-by-side with Hyper-V.

EDIT: More info at https://blogs.vmware.com/workstation/2019/08/workstation-hyp... and https://techcommunity.microsoft.com/t5/Virtualization/VMware....


Wait, it's not a kernel personality anymore?


They've moved away from that due to complaints about I/O performance. There was no way to "fix" it without the hyper-V shim.

https://devblogs.microsoft.com/commandline/announcing-wsl-2/


WSL was a failed attempt by Microsoft, WSL2 will not be any better. Look at the problems it is causing for people already, and it isn't even GA yet.


WSL2 now uses an actual virtualized linux kernel because the performance and compatibility are both better.


I'm confused how the performance can be better. There's two competing kernels that both think they're running the system, how can that not be slower than mapping some POSIX calls over?

I mean I trust that it's true, and I'd love to understand why :D


Because there's fundamental issues with POSIX use cases and NT's VFS(well, IFS), and cache layers.

Basically the block cache on NT exists between user space and the filesystem, not the filesystem and the block device. For metadata heavy ops (like open(), stat(), etc.) the regular cache isn't in play, and the little caches in the NTFS driver aren't nearly as smart as the regular cache layer. You could stick a cache between NTFS and the IO driver, but that would mean heavily changing the IFS interface, and heavily changing the NTFS driver itself. Unfortunately, the NTFS driver has been referred to as "a purple opium-fueled Victorian horror novel that uses global recursive locks and SEH [Structured Exception Handling] for flow control" by a kernel dev. I can't even imagine how scary adding a cache layer under it might be.


It's because there's some serious mismatches in how a lot of the APIs work that causes it. Raw compute performance is slightly slower this way, but the better match for IO and other systems make the overall performance and experience much much better in the end.


That's odd because NT debuted with a Posix "personality," so it must have been taken into account with the original design. Processor independence was another goal, though abandoned for a long time.

In other words, they should have taken this into account unless the personality thing was just for show.


This is covered in https://en.wikipedia.org/wiki/Microsoft_POSIX_subsystem. Version history:

The POSIX subsystem was replaced in Windows XP and Windows Server 2003 by "Windows Services for UNIX", (SFU) which is based in part on technology Microsoft acquired by buying Interix. SFU was removed from later versions of Windows 8 and Windows Server 2012. SFU is logically, though not formally, replaced by the Windows Subsystem for Linux (WSL) in the Windows 10 Anniversary Update and Windows Server 2016 Version 1709 respectively.

I agree that this was originally mostly for show since the customer base was very specific. That was a different time and place from now. I guess WSL started as an experiment to see how they could serve customers, was validated to some degree, and now they need to perfect it. A lot of related work on the Windows Console is now open source so I take that as a demonstration of how serious they are, but I don't expect it all to be open source. Maybe they'll surprise us.


Neither are running the system. When you install HyperV your Windows installation is virtualized, so both Windows and WSL are running as VMs.


Sort of. The Windows side has direct access to the hard drive, AFAIK.


WSL2 uses hypervisor in a way which makes Virtualbox (or any other VM manager) unusable.


The same happens with Device Guard/Credential Guard, it monopolizes the hypervisor.


HyperV is different virtualization technologoy compared to Virtuakbox and most others. It actually virtualizes everything, whereas others typically are a level higher up. It seems both at the same time often doesn't work that well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: