Zend certified PHP/Magento developer

How to enable avx2 for Ubuntu 22.04 guest VM in VirtualBox 7, on Windows 11?

I cannot enable avx2 on Ubuntu 22.04 guest VM in VirtualBox7. I followed different ways but the issue persists (i.e., I get nothing when I do grep avx /proc/cpuinfo in my guest VM).

What I have tried:

First I tried VBoxManage setextradata "guest_name" VBoxInternal/CPUM/IsaExts/AVX2 1 and VBoxManage setextradata "guest_name" VBoxInternal/CPUM/IsaExts/AVX2 1, but didn’t get avx2 according to /proc/cpuinfo of my guest.

Then, based on the answer to this I tried the following:

  • Opened a Command Prompt in Windows Host as Administrator and did bcdedit /set hypervisorlaunchtype off
  • then, I do DISM /Online /Disable-Feature:Microsoft-Hyper-V. But I get this error:
Error: 0x800f080c
Feature name Microsoft-Hyper-V is unknown.
A Windows feature name was not recognized.
Use the /Get-Features option to find the name of the feature in the image and try the command again.

So, I checked the list of features through Control Panel->Program And Features to see whether I have any features seemingly relevant to hyper-v, but there is none.

I also unchecked the feature Virtual Machine Platform through Control panel to see whether it makes any difference, after I try VBoxManage setextradata "guest_name" VBoxInternal/CPUM/IsaExts/AVX2 1 again, but I still don’t have avx2 on my guest VM.