Skip to content

Enable AVX

Enable AVX in VirtualBox under Windows 11

From MongoDB version 5.0 and higher, your guest machine must support AVX. To enable AVX on virtual machines in VirtualBox under Windows 11, you must disable Hyper-V. Which is not obvious because usually trying to disable Hyper-V by unchecking the "Windows Features" boxes often does not completely disable Hyper-V.

To turn Hyper-V off completely, see this post : HMR3Init: Attempting fall back to NEM (Hyper-V is active)

To know if your Linux virtual machine supports AVX, run the command cat /proc/cpuinfo , then check that in the 'flags', you have 'avx' and 'avx2'.

Summary of the steps to follow (You must have administrator rights)

  • cmd window:

    bcdedit /set hypervisorlaunchtype off

  • Regedit:

    Computer\HKEY_local_machine\system\CurrentControlSet\Control\DeviceGuard\EnableVirtualizationBaseSecurity <- 0

    Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\SystemGuard <- 0

  • Rebooted the host machine (i.e. Windows)

  • Then, you need to enable AVX for the corresponding virtual machine ("Maggot VM")

    VBoxManage.exe setextradata <Maggot VM> VBoxInternal/CPUM/IsaExts/AVX 1 
    VBoxManage.exe setextradata <Maggot VM> VBoxInternal/CPUM/IsaExts/AVX2 1