Due to specific development requirements, I’ve configured my machine with both WSL and VirtualBox running Ubuntu to accommodate different needs. This allows me the flexibility to choose the most suitable option for a given task.
When utilizing WSL, it’s crucial to have the hypervisorlaunchtype
set to ON. However, for running Ubuntu + MongoDB 5 on VirtualBox, the hypervisorlaunchtype
needs to be set to OFF. A solution to this issue is outlined in a post on Stack Overflow, which can be found at the following link:
When opting to run MongoDB 5 on VirtualBox, one can easily choose an older version such as 4.4 or disable the hypervisorlaunchtype
:
bcdedit /set hypervisorlaunchtype off
DISM /Online /Disable-Feature:Microsoft-Hyper-V
Conversely, when using WSL, it’s necessary to re-enable the hypervisorlaunchtype
:
bcdedit /set hypervisorlaunchtype auto
To check the current status of hypervisorlaunchtype
, you can use the following command:
bcdedit /enum | findstr -i hypervisorlaunchtype
Please note that executing these commands requires administrative privileges in PowerShell, and it’s essential to reboot the machine after making these changes for them to take effect.
搶先發佈留言