跳至主要內容

Configuring Hypervisor Settings for MongoDB 5.0+: A Guide for WSL and VirtualBox Environments

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:

https://stackoverflow.com/questions/70818543/mongo-db-deployment-not-working-in-kubernetes-because-processor-doesnt-have-avx

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.

分類:Issues

搶先發佈留言

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

由 Compete Themes 設計的 Author 佈景主題