https://build5nines.com/check-hyper-v-intel-vt-x-virtualization-support-on-macos-computer/

May 21, 2020

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/53eef602-b174-4c69-a57c-8f0691df9a25/Apple_Featured_Image.jpg

Many Developers and other IT Professionals use macOS (via a Macbook Pro or other Apple computer) and do need to run Windows on their machine under virtualization using Parallels or VMWare. Doing this allows you to run both macOS and Windows, or even Linux, operating systems and software on a single computer at the same time. When running Windows on top of macOS through virtualization you can use developer tools like Visual Studio, Windows Terminal, and others on macOS! However, using Windows Hyper-V to be able to run Windows VMs within your Windows VM requires the Intel VT-x virtualization support of the Intel CPU in the macOS computer to be enabled. This feature may not always enabled by default on macOS.

Let’s take a look at checking for status of Virtualization (VT-x) support, and enabling it so you can use Hyper-V and other virtualization within your Windows VMs running on macOS. This is something that may be necessary for running things like the Windows Subsystem for Linux 2 (WSL2) successfully within your Windows VM on top of macOS.

Check if VT-x is supported on macOS

To see if the CPU within your macOS computer (Macbook Pro, Mac Pro, or other Apple machines) support nested virtualization via the VT-x feature of the CPU, you will need to open the macOS Terminal and execute a command.

Run the following command:

sysctl -a | grep machdep.cpu.features

This command will output the instruction sets supported by your machines CPU. When running this command, look for the VMX feature in the list. If this is listed, then your CPU does in fact support VT-x virtualization.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/830ca193-d0a1-4902-987a-ae755cd7b347/macos-vtx-virtualization-cpu-feature-vmx.jpg

Terminal output looking for VMX cpu feature support

You can run the following command to check for hardware virtualization support on macOS as well:

sysctl kern.hv_support

The command output will look as follows when turned on showing the kern.hv_support value returning 1:

chris@Chriss-MBP ~ % sysctl kern.hv_support
kern.hv_support: 1

Just because the VMX feature of the CPU is listed, doesn’t mean it’s enabled within macOS, so let’s look at that next.

Enable VT-x Virtualization on macOS

All macOS computers that have an Intel i7 or i9 cpu should have VT-x virtualization support enabled by default. It is possible that if it’s not turned on for your computer, then you will need to update your computer to the latest software / firmware. This can be done through the Software Update feature of macOS, or by downloading Apple’s Firmware Update utilities.

It is also possible that for some reason it was disabled, and to re-enable the VT-x virtualization support, you will need to Reset the NVRAM or PRAM on your Mac. This can be done with the Option + Command + P + R keyboard combination at startup of your Mac.