Open jlearman opened 4 years ago
@kenny1983 VMWare is not really a replacement since it is not open source, and only the expensive Pro version supports shapshots. Also, it's always good to support alternative software to create some diversity and competition.
@Cito I've been using VirtualBox religiously since v2.x or v3.x, so trust me, it wasn't an easy decision for me to make. And yes, the limitations of VMWare are annoying to say the least. But if one product works and the other doesn't...well at least until VB fixes this, I'll be using VMWare. Waiting over an hour for a VM to boot is not an option for me, and I doubt that any sane person would stick with VB in those circumstances.
@kenny1983 I think WSL 2 is still pretty new and VB needs to be given some time to properly support it and fix bugs and make adaptations to the new platforms and APIs provided by Microsoft. In fact the situation got better with every recent version of VBox, so that I see they are working on it. In the current version I can boot up Linux guests just fine and quickly. I know that users with different hardware are still facing issues, and I myself see still issues with Windows guests. I can understand that if you are affected and need to get work done you switch to VMWare. But that should not mean that all people should now totally abandon VBox. It's still a great piece of open source software that should be kept alive as an alternative and should be continually improved. And we should continue to report issues such as this one so that they can be fixed.
But that should not mean that all people should now totally abandon VBox. It's still a great piece of open source software that should be kept alive as an alternative and should be continually improved. And we should continue to report issues such as this one so that they can be fixed.
Yes I totally agree, and apologise for the harshness of my previous comment. I had been struggling to get VBox working for almost an entire day at that point, so I did give it more than a fair chance to work for me. But that caused some obvious frustration and anger, so I indirectly lashed out at the VBox devs.
You make some very good points about the relative age of WSL2 and how the VBox devs have improved things significantly through the past few releases. I haven't experienced how bad things were in the beginning, but can imagine from what I've read online how frustrating it would have been to use VBox alongside WSL2 back then. So yes, the devs deserve a break and big kudos for coming as far as they have.
I too agree that VBox is not for the dumpster. I use it on Linux hosts all the time. I know VMWare is not free for the richer feature set but in my experience I've never regretted paying for it. I'm already using licensed software for the Windows host. I also don't entirely trust Oracle to keep the license free, ahem java and mysql. I plan on getting VirtualBox up and running again after this mess gets sorted out. I like to keep my options open.
Update on VMW Player:
I installed a Centos 8, Fedora 33, Kali, Xubuntu 20.04, and OpenSUSE Leap 15.2. They all run smoothly and without any flaws so far. I particularly like not having to insert a Guest Additions disk. I barely read the documentation at all and the process has easily been brought up to a level that meets my needs. Most of these automatically resize the guest desktop to full screen mode on my 2560x1600 display. The ones that didn't were easy to successfully set to that resolution. I haven't tried sharing folders between the guest and host yet, but it looks like it will be the same as it was in VMW Fusion on the Mac. I'm happy with the freeware experience and will probably spend the money to upgrade to the Pro version soon.
After I changing the setting of "Paravirtualization Interface" at "guest machine setting-System-Acceleration" from Legacy to Hyper-V, the Windows guest can boot properly.
VirtualBox:
* 6.1.16 r140961
Host Machine:
* CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz 1.99 GHz * Windows 10 Pro build 19042.610
Guest OS:
* Windows Server 2012 R2 Datacenter
Enabled Windows Features:
* Virtual Machine Platform * WSL2
Disabled Windows Features:
* Hyper-V
I found that I also have to disable 'nested paging' to make it work.
I added another level of complexity to my virtualization environment. I can verify that on my machine, running the latest Windows feature update, that WSL, VMWare Player, and now Docker all coexist successfully. I have high hopes that Virtualbox will soon run alongside my current setup.
I'm one of those people who also want to run Docker Desktop on wsl2, still be able to use my WSL2 installations, and use my virtual machines. With the new collaborative spirit between Docker (which recently moved to wsl2) and Microsoft, perhaps we should officially request feature enhancement, here, to allow more than one third-party virtualization? For the record, I'm trying this on Windows Professional.
@sondraschroder I'm able to run Docker Desktop, WSL2 and Virtualbox 6.1.16 together. Although I think Virtualbox runs slower now.
I am still having trouble, maybe it is an issue with ubuntu/linux VMs? Any help appreciated!
Host Machine: Windows 10 Version 20H2 (OS Build 19042.685) Virtual Box: 6.1.16 r140961 (Qt5 6.2) Guest OS: generic-ubuntu.2004 (64-bit) Vagrant Box: "generic/ubuntu2004" Vagrant: 2.1.14
Enabled Windows Features:
Disabled: Hyper-V
Vagrant VM settings to set hyperv
provider and disable nested paging
:
v.customize [ "modifyvm", :id, "--paravirtprovider", "hyperv" ]
v.customize [ "modifyvm", :id, "--nestedpaging", "off" ]
Result: VM not starting & VirtBox showing Invalid settings detected
Interesting log bits:
00:00:01.245573 HM: HMR3Init: Attempting fall back to NEM: VT-x is not available
00:00:01.375631 NEM: WHvCapabilityCodeHypervisorPresent is TRUE, so this might work...
...
00:00:02.220652 ERROR [COM]: aRC=VBOX_E_VM_ERROR (0x80bb0003) aIID={4680b2de-8690-11e9-b83d-5719e53cf1de} aComponent={DisplayWrap} aText={Could not take a screenshot (VERR_NOT_SUPPORTED)}, preserve=false aResultDetail=-37
00:00:02.240664 ERROR [COM]: aRC=VBOX_E_VM_ERROR (0x80bb0003) aIID={4680b2de-8690-11e9-b83d-5719e53cf1de} aComponent={DisplayWrap} aText={Could not take a screenshot (VERR_NOT_SUPPORTED)}, preserve=false aResultDetail=-37
Any comment from @Microsoft?
@brucejo75
I still have the same issue too. I spent a day trying different solutions and I can confirm that VirtualBox 6.1.16 with AMD hardware and WSL2 doesn't work well together.
@brucejo75
Can also confirm I could not get Virtualbox & WSL to work with my Ryzen 3600
i have a feeling WSL2 also conflicts with VMWare manager's ability to launch nested VMs ? I get
Module HV power on failed
on VMWare Workstation VMs which are attempting to launch VMWare Workstation VMs that allow CPU virtualization
Glad I found this thread. I just spent full 2 days on this issue. I reinstalled my Windows 10, thought it was because of "Home" edition. Then I found out it also doesn't work on Pro version (rip $$). As soon as I run bcdedit /set hypervisorlaunchtype off
and reboot I was able to run VirtualBox (6.1.18) VMs, but WSL2 broke. I tried every combination of Hyper-V, Virtual Machine Problem, Windows Hypervisor Platform, Windows Subsystem for Linux. Also tried disabling nested Pages, Acceleration type to Hyper-V, KVM. None of them worked.
I guess I'll just give up ¯\_(ツ)_/¯
Btw, I found this tool Multipass from Canonical which runs Ubuntu VMs only. It's working fine for me. If you're on Windows 10 Pro or Enterprise you can use Hyper-V backend, If you're on Home only option is VirtualBox backend which is broken.
I had the same issue before and it is really a pain in the ass., but it is no longer occur since I use VB 6.1.16 and with those settings:
I had the same issue before and it is really a pain in the ass., but it is no longer occur since I use VB 6.1.16 and with those settings:
- Turn off: Enable 3D Acceleration
- Turn on: Enable PAE/NX Hope it helps you guys.
Could you please specify which host and guest operating systems are you using?
Thanks!
My host is windows 10 and my VM machines are Ubuntu 18.04 and Centos7
Tried multiple settings as outlined by individuals but mine gets hung and throws this error. The VM doesnt actually stop but it just sits there with a blinking cursor. https://forums.virtualbox.org/viewtopic.php?t=99335
"MsrExit/0: 0010:ffffffff8ce767fa/LM: RDMSR 00000140 -> 00000000 / VERR_CPUM_RAISE_GP_0"
Reversed to WSL1 so i could do chef and ansible testing with vagrant + virtualbox. Would be nice to have WSL2 working properly with VBox.
I'm definitely in the right place finally. I wanted to check out docker and mindlessly installed WSL2. Until then I had Virtualbox and WSL playing nice together. Every piece of developing in a VM is an entire area of specialization that each could be a career. I know I'm paying my dues but this thread is the most current, and I like the github culture more than oracle and Reddit.
Window10x64 Host with Unbuntu x64 on AMD Ryzen 7 Series HP Omen 15 Laptop Vbox 6.1.16 + Extension Pack
So what are my options here? Ditch Vbox and learn how to use Docker?
I feel like I'm circling the drain on recursively trying workarounds and alternate ways to get a Xilinx FPGA development environment setup and I'll be honest when I say I get crippling analysis paralysis. If I can get one of them to work I won't ever look back. Whatever WSL2 broke... it also took a piece of me with it. I can't tell you what a gauntlet this has been.
I'm going to carefully read this entire thread and see which option might work. I see some not exactly conflicting, but not exactly consistent messages. That isn't meant to be a judgement. I'm grateful to see some of you have this working.
Just installed VB 6.1.18 and to my surprise it's now working fine alongside with WSL 2. VB 6.1.14 still had big issues, in VB 6.1.16 it got much better and I was able to run Linux guests, but Windows guests still made problems. Now in VB 6.1.18 I can run both. Currently I have one Ubuntu box in WSL open, two different Ubuntu boxes in VB (one with KDE running a music video), and one Windows XP guest, all at the same time, and all with pretty usable performance. I also ran a large software update on a Linux guest and updated the guest extensions without problems.
I don't see any specifc fix for WSL 2 in the changelog for VB 6.1.18, but maybe the fix for nested VMs or other fixes solved this issue as side-effect. Or maybe it was a Windows 10 update, I'm curently running Win 10 Pro 20H2 19042.804. At least on my developer machine it's working now and I am totally happy about this.
Can anybody confirm that the VB 6.1.18 is working better with WSL 2?
Update: To confirm my subjective impression, I just checked with sysbench and could not notice any measurable performance penalty on a Linux VirtualBox guest with the WSL 2, Virtual Machine Platform and Windows Hypervisor Platform features enabled. CPU test was equally fast and memory test was even a bit faster.
Just installed VB 6.1.18 and to my surprise it's now working fine alongside with WSL 2.
Thank you for posting about your success.
Does this include the extension pack? How about guest OS addons?
@thecriticalpoint The extension pack seems to be working, it is installed and I can copy files from an USB stick. The guest extensions are also working fine in the guests.
@Cito What Linux guest flavor are you running? Is it 64bit? Did you create it after you installed WSL2 or before? Thank you for your time.
@thecriticalpoint all 64 bit, created before installing WSL 2. Maybe there were also changes in Windows 10 20H2 or Windows patches that solved the problem for me. Did you try it with the latest Windows update and the new VB version?
Just installed VB 6.1.18 and to my surprise it's now working fine alongside with WSL 2. VB 6.1.14 still had big issues, in VB 6.1.16 it got much better and I was able to run Linux guests, but Windows guests still made problems. Now in VB 6.1.18 I can run both. Currently I have one Ubuntu box in WSL open, two different Ubuntu boxes in VB (one with KDE running a music video), and one Windows XP guest, all at the same time, and all with pretty usable performance. I have also run a large software update on a Linux guest and updated the guest extensions without problems.
I don't see any specifc fix for WSL 2 in the changelog for VB 6.1.18, but maybe the fix for nested VMs or other fixes solved this issue as well. At least on my developer machine it's working now and I am totally about about this.
Can anybody confirm that the VB 6.1.18 is working better with WSL 2?
Update: To confirm my subjective impression, I just checked with sysbench and could not notice any measurable performance penalty on a Linux VirtualBox guest with the WSL 2, Virtual Machine Platform and Windows Hypervisor Platform features enabled. CPU test was equally fast and memory test was even a bit faster.
Windows OS Version: 10.0.19042 Build 19042
I installed today:
I got one more Problem, my vNetwork Adapter had some issues, i fixed it by following the guidelines from here
Then it ran smoothly.
@Genlight - You actually don't need to install the Hyper-V feature if you just want to use WSL 2 and VirtualBox, maybe it will be even detrimental to performance.
@Genlight - You actually don't need to install the Hyper-V feature if you just want to use WSL 2 and VirtualBox, maybe it will be even detrimental to performance.
Hyper-V is a requirement for installing and using WSL2 as confirmed by the WSL 2 FAQ.
Are you sure you are using WSL2 and not the old version WSL1? To be sure, you could try to run the following command from the command prompt:
wsl --list --verbose
@Genlight - You actually don't need to install the Hyper-V feature if you just want to use WSL 2 and VirtualBox, maybe it will be even detrimental to performance.
Hyper-V is a requirement for installing and using WSL2 as confirmed by the WSL 2 FAQ.
Are you sure you are using WSL2 and not the old version WSL1? To be sure, you could try to run the following command from the command prompt:
wsl --list --verbose
The Hypervisor Platform is required, not Hyper-V. Hyper-V is available on Windows Pro and used to manage and run generic virtual machines. That is distinct from WSL, which uses the hypervisor platform. They are each distinct features that can be enabled or disabled in Windows.
it seems wsl1 is a more viable option rather than wsl2
@ptagl: @EricPell is right. The FAQ says "The newest version of WSL uses Hyper-V architecture to enable its virtualization. This architecture will be available in the 'Virtual Machine Platform' optional component." I.e. the optional component (feature) that you need to install is the "Virtual Machine Platform". The Hypervisor Platform might be needed as well (not sure about that). The full "Hyper-V" feature allows to create your own VMs, similar to what VirtualBox provides. I don't need it because I use VirtualBox instead. And yes, I am definitely running WSL 2 without Hyper-V and it works.
@ptagl: @EricPell is right. The FAQ says "The newest version of WSL uses Hyper-V architecture to enable its virtualization. This architecture will be available in the 'Virtual Machine Platform' optional component." I.e. the optional component (feature) that you need to install is the "Virtual Machine Platform". The Hypervisor Platform might be needed as well (not sure about that). The full "Hyper-V" feature allows to create your own VMs, similar to what VirtualBox provides. I don't need it because I use VirtualBox instead. And yes, I am definitely running WSL 2 without Hyper-V and it works.
If I recall correctly, you also can't use Hyper-V with Windows 10 Home, so it's not just a matter of preference
@ptagl: @EricPell is right. The FAQ says "The newest version of WSL uses Hyper-V architecture to enable its virtualization. This architecture will be available in the 'Virtual Machine Platform' optional component." I.e. the optional component (feature) that you need to install is the "Virtual Machine Platform". The Hypervisor Platform might be needed as well (not sure about that). The full "Hyper-V" feature allows to create your own VMs, similar to what VirtualBox provides. I don't need it because I use VirtualBox instead. And yes, I am definitely running WSL 2 without Hyper-V and it works.
If I recall correctly, you also can't use Hyper-V with Windows 10 Home, so it's not just a matter of preference
Windows 10 Home allows you to use WSL2 which uses Hyper-V, well the hypervisor platform. As far as complications with VirtualBox it has the same complications as using Hyper-V Windows 10 Pro
@Cito Of course, one can use WSL without using hyper-v, required by WSL2. However, things like deep learning can be done very well on WSL2.
The issue that needs to be resolved is using thing that conflict, which are VirutalBox and WSL2. However, recent debugging has found that even with the versions of Ubuntu that are problematic have no issues with new installs. Only trying to take VirtualBox VM that was created before HyperV is done.
My experience has been consistent with what @EricPell states.
The issue that needs to be resolved is using thing that conflict, which are VirutalBox and WSL2. However, recent debugging has found that even with the versions of Ubuntu that are problematic have no issues with new installs. Only trying to take VirtualBox VM that was created before HyperV is done.
I will also concede that there are learning opportunities here too and that there is probably a need to differentiate HyperV from HyperVisor. I mean... seriously give two things similar enough names and this is bound to happen to anyone but the most educated designers.
WSL2, Docker, Virtualbox are all tools for getting dev environments running. People expect to be able to get them running so they can start the real work. Some toolchains are more complicated to setup than others I admit. But I don't think it's reasonable to expect that all users will need to or want to become fully versed in all the different Hyper (whatever) platforms exist. A lot of people are are lazy....and they just want everything to work.... and they want it to be free.... and they want immediate support and constant validation. I'm probably not so much different now that I think about it...
Anyway having said all that I'm grateful this thread exists so thank you to everyone in this community. I got my Xilinx FPGA build VM setup and working thanks to you.
The Hypervisor Platform is required, not Hyper-V. Hyper-V is available on Windows Pro and used to manage and run generic virtual machines. That is distinct from WSL, which uses the hypervisor platform. They are each distinct features that can be enabled or disabled in Windows.
Still not working for me.
Microsoft Windows 10 Pro, 64-Bit, Version: 10.0.19042, Build: 19042 VirtualBox 6.1.18
If I enable the following features:
Dism /online /Enable-Feature /FeatureName:HypervisorPlatform /All
Dism /online /Enable-Feature /FeatureName:VirtualMachinePlatform /All
my VirtualBox VM's won't boot anymore.
Does WSL2 require FeatureName:VirtualMachinePlatform
? Maybe only enable FeatureName:HypervisorPlatform
?
Does WSL2 require
FeatureName:VirtualMachinePlatform
? Maybe only enableFeatureName:HypervisorPlatform
?
The installation guide says it's needed.
Virtual Box 6.1.18 doesn't work along with WSL2 on my side but VMware does. and .... I don't want to disable WSL2.
@Genlight - You actually don't need to install the Hyper-V feature if you just want to use WSL 2 and VirtualBox, maybe it will be even detrimental to performance.
Hyper-V is a requirement for installing and using WSL2 as confirmed by the WSL 2 FAQ. Are you sure you are using WSL2 and not the old version WSL1? To be sure, you could try to run the following command from the command prompt:
wsl --list --verbose
The Hypervisor Platform is required, not Hyper-V. Hyper-V is available on Windows Pro and used to manage and run generic virtual machines. That is distinct from WSL, which uses the hypervisor platform. They are each distinct features that can be enabled or disabled in Windows.
indeed, I am using Windows Pro ed. and not Home. As far as I experience it, there is no performance loss when you activate the FOD "Hyper-V".
Virtual Box 6.1.18 doesn't work along with WSL2 on my side but VMware does.
@mictaege @jmeg-sfy Now the question is why VB is working for me but not for you. Different CPUs? Mine shows as "Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz". What else could be different? And: Can you create and run new VMs in VB while WSL2 is enabled? Some people reported that the problem exists only with older VMs.
@jmeg-sfy , it would be helpful to clarify what "does not work" means. In helping others debug we've found that existing VMs, specifically Ubuntu with certain kernel versions, don't boot with WSL2 enabled. However, those do work if installed fresh. Many other distros have no trouble either way.
@IvanPizhenko Yes, the virtual machine platform is required.
@mictaege Could you please clarify what "Won't boot anymore" means. Does it get stuck at a specific point? What OS, version, and maybe kernel if you have it, are you trying to boot?
For me won't boot is that it doesn't get past this point during boot
when doing verbose:
non verbose output:
this is me trying to boot an arch ISO image. Grub is loading perfectly fine, but after selecting any boot option, I always get stuck there. I left it running once over night, no success either.
Also happens with ubuntu or other distributions, either from ISO or disk image. No success.
@EricPell Ubuntu 20.04 behave exactly as above !
@jmeg-sfy , ok. Could you please clarify the remaining details I raised in my previous comment to you?
Is this an existing VM? Did you install it fresh? Etc.
@mictaege @jmeg-sfy Now the question is why VB is working for me but not for you. Different CPUs? Mine shows as "Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz". What else could be different? And: Can you create and run new VMs in VB while WSL2 is enabled? Some people reported that the problem exists only with older VMs.
@mictaege Could you please clarify what "Won't boot anymore" means. Does it get stuck at a specific point? What OS, version, and maybe kernel if you have it, are you trying to boot?
I'm facing the same behavior as @hellow554 has: after selecting the boot option the VM get's stuck with a blinking cursor. No error messages or other usefull information.
Actually I'm running some Vagrant Boxes with Oracle Linux 7 and Ubuntu 20.04.1 LTS, but in order to investigate in this case I have also created manually an Ubuntu 20.04.1 LTS VM using VirtualBox-UI. All of these VM's are showing exactly the same behavior.
The problem occurs right after enabling either the HypervisorPlatform
or VirtualMachinePlatform
feature or both of them at the same time. I've tested all combinations and the VM's will only boot corretly if both features are disabled.
All VM's have been created before I've enabled HypervisorPlatform
and/or VirtualMachinePlatform
and I was not able to setup a new VM after the features has been enabled (blinking cursor before Ubuntu installation was possible).
To make things clear, I've only enabled/disabled the both features HypervisorPlatform
and/or VirtualMachinePlatform
, nothing more. Not using other Hyper-V related features, not changing the WSL default version etc.
Putting things together, for me it looks more like a problem somewhere in the communication between the HypervisorPlatform and VirtualBox and has nothing to do with WSL2 itself.
Here are some informations about my environment
HOST
Get-ComputerInfo =>
OsName : Microsoft Windows 10 Pro
OsArchitecture : 64-Bit
OsVersion : 10.0.19042
OsBuildNumber : 19042
CsProcessors : {Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz}
Latest HotFixes =>
HotFixID Description InstalledOn
-------- ----------- -----------
KB5000802 Security Update 09.03.2021 00:00:00
KB5000858 Security Update 09.03.2021 00:00:00
KB4577586 Update 19.02.2021 00:00:00
KB4601050 Update 11.02.2021 00:00:00
KB4598481 Security Update 16.01.2021 00:00:00
KB4562830 Update 09.12.2020 00:00:00
GUEST (Test-VM)
uname -a =>
Linux micta-VirtualBox 5.8.0-44-generic #50~20.04.1-Ubuntu SMP Wed Feb 10 21:07:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
What's funny is that grub works perfectly fine, so it's something that linux does, but I have no clue what... enabling some mode, e.g. enabling real/long mode? I have no clue... but it bugs me!
@mictaege "All VM's have been created before I've enabled HypervisorPlatform and/or VirtualMachinePlatform and I was not able to setup a new VM after the features has been enabled (blinking cursor before Ubuntu installation was possible)."
Ok. That seems to be a known issue. Something about how the OS is configured depends on how it's virtualized with VBox. Until you can verify that it works with a clean VM it will be hard to debug further.
@EricPell so you mean just click NEW in the VirtualBox UI and create a new VM? I did that and still with the live image, nothing boots.
https://docs.microsoft.com/en-us/windows/wsl/wsl2-faq#will-i-be-able-to-run-wsl-2-and-other-3rd-party-virtualization-tools-such-as-vmware-or-virtualbox says:
Unfortunately, it's not true. Running Windows 10 version 2004 and VirtualBox 6.1, enabling WSL2 causes Ubuntu/VB to boot to a blank rectangular screen with rapidly blinking cursor. This happens despite the VM being configured to use HyperV and with HyperV enabled in Windows Features.
Worse yet, the only way I could manage to get VB working again was to restore to before installation of WSL2 and reinstall ("Repair") VirtualBox.
This is a duplicate of https://github.com/MicrosoftDocs/WSL/issues/536, but that issue is closed and I see no way to reopen it.
See also https://stackoverflow.com/questions/62184881/virtualbox-and-wsl2 and https://superuser.com/questions/1531337/cant-run-virtualbox-6-1-4-with-hyper-v