Cannot get AVX2 working in VM

Discussions related to using VirtualBox on Linux hosts.
Post Reply
JamesS
Posts: 2
Joined: 17. Jun 2024, 21:20

Cannot get AVX2 working in VM

Post by JamesS »

I am working within VirtualBox to use a piece of software that requires AVX2. I have confirmed my host machine (Ubuntu 22.04) has AVX2 using "lscpu | grep avx2" but I do not have access to AVX2 in the Virtual Machine. I have already gone to Settings > System > Processor and Enabled PAE/NX and Nested VT-x/AMD-V and I tried enabling AVX2 manually using "VBoxManage setextradata <vm_name> VBoxInternal/CPUM/IsaExts/AVX2 1". I have checked my VirtualBox Logs and I have the line "00:00:03.996244 AVX2 - Advanced Vector Extensions 2 = 0 (1)" which I think indicated it is detected on the host but disabled for the VM. What else can I try to do to get access to AVX2 within the VM?
klaus
Oracle Corporation
Posts: 1215
Joined: 10. May 2007, 14:57

Re: Cannot get AVX2 working in VM

Post by klaus »

Please provide a complete VBox.log file, otherwise it's useless guessing why AVX2 isn't working in your case.
JamesS
Posts: 2
Joined: 17. Jun 2024, 21:20

Re: Cannot get AVX2 working in VM

Post by JamesS »

Here are my log files:
VBox_Logs.zip
(185.05 KiB) Downloaded 2 times
klaus
Oracle Corporation
Posts: 1215
Joined: 10. May 2007, 14:57

Re: Cannot get AVX2 working in VM

Post by klaus »

Thanks. VirtualBox can't deal with your CPU yet because the XSAVE buffer area is too big... we'll see what we can do.
klaus
Oracle Corporation
Posts: 1215
Joined: 10. May 2007, 14:57

Re: Cannot get AVX2 working in VM

Post by klaus »

This is already fixed in VirtualBox 7.0. In 6.1.50 the associated fix isn't present (the buffer for XSave is too small) and will never be integrated because 6.1 is out of support for half a year now. Please switch to version 7.0 and it should just work, without even the extradata tweaking.
Post Reply