3 ms·
Yes WSL2 uses Hyper-V so you'll have the same problems. Hyper-V is a type-1 hypervisor, meaning it runs at the hardware level with exclusive access to the CPU v
by manigandham 6y ago
Yes WSL2 uses Hyper-V so you'll have the same problems. Hyper-V is a type-1 hypervisor, meaning it runs at the hardware level with exclusive access to the CPU virtualization extensions. When enabled it runs Windows itself as a VM which is why it requires a reboot to disable.
VirtualBox is a type-2 hypervisor running on the guest/Windows OS but can't access the CPU extensions since Hyper-V has already acquired them. Running Linux containers on Windows (using Docker or otherwise) always involved Hyper-V, just with different hosts from LinuxKit to WSL2. Docker on Mac OS uses hyperkit which seems to also be a type-2 hypervisor which doesn't conflict with VirtualBox (and in fact the docs state that Docker on MacOS uses VirtualBox drivers to create VMs).
VirtualBox 6.0 is supposed to detect and use the Hyper-V API as well as support nested virtualization but its still experimental. Also I believe you can run 32-bit VirtualBox while Hyper-V is enabled, have you tried that?
I think you're in a tough position and the best solution is probably to make the business case in either upgrading away from Vagrant/VB to Docker or getting some proper standalone Vagrant servers to develop with.
- developer2 6y agoThank you so much for the reply; it at least helps me understand why things are the way they are. VirtualBox's own docs have said since some 5.x version that it's compatible alongside Hyper-V. However, we've had developers on the latest 5.x as well as 6.x of VirtualBox, and the bugs that appear are out-of-this-world impossible to debug. Basically, running VirtualBox with Hyper-V enabled on a Windows host will appear to work at first, but you'll very quickly run into some random weird bug (often related to networking) that cannot even be Googled because it's a unique one-time error that seems to occur purely because of which cpu instruction was being executed during a particular nanosecond. So even WSL2 will not help us, unless we can migrate all VirtualBox boxes to Docker or native Hyper-V. Sigh. Fuck companies who produce software purely for Linux servers, who force their developers to work on Windows machines because of ActiveDirectory, and their relationship with kissing Dell's ass for hardware I could piece together from a garbage dump.