How to enable nested VT-x/AMD-v

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
Michellin
Posts: 1
Joined: 20. Nov 2023, 17:38

How to enable nested VT-x/AMD-v

Post by Michellin »

Dear Experts, Hello!

I am using VirtualBox Version 7.0.12 r159484 (Qt5.15.2) at Mac OS Sonoma14.1.1 running guest Windows 11 Pro 10.0.22621.

I want to install Android studio 2022.3.1 for Testing purpose using Device Emulation.

During installation I have got an error - You can't install Device Emulator because

Unfortunately, your computer does not support hardware accelerated virtualization. Here are some of your options: 1) Use a physical device for testing 2) Develop on a Windows/OSX computer with an Intel processor that supports VT-x and NX 3) Develop on a Linux computer that supports VT-x or SVM 4) Use an Android Virtual Device based on an ARM system image (This is 10x slower than hardware accelerated virtualization)

How to enable nested VT-x/AMD-v options in Virtual box. This options is disabled by default

Please See screenshot.[img]/img]

Android Studio Giraffe | 2022.3.1 Patch 4
Build #AI-223.8836.35.2231.11090377, built on November 13, 2023
Runtime version: 17.0.6+0-b2043.56-10027231 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 2
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
Attachments
Снимок экрана 2023-11-20 в 18.56.39.png
Снимок экрана 2023-11-20 в 18.56.39.png (20.29 KiB) Viewed 2817 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How to enable nested VT-x/AMD-v

Post by scottgus1 »

This is very likely because Sonoma forces using Apple's built-in hypervisor instead of Virtualbox's nested-capable hypervisor. You'll probably see a green turtle in the status bar of the VM, meaning that the Apple hypervisor is active. Apple will not allow turning off the Apple Hypervisor so Virtualbox's hypervisor can be used.

Your best bet is to get an Android emulator that will run directly on Sonoma so you don't need Windows. Or you can dual-boot Windows on your Mac if it is an Intel Mac, then run the Android emulator. Note that Android is not a supported guest OS in Virtualbox, so you might want to get a Windows-based Android emulator instead of running it in Virtualbox.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: How to enable nested VT-x/AMD-v

Post by fth0 »

In addition to what scottgus1 wrote: macOS Ventura (13) and macOS Sonoma (14) do not provide VT-x (directly) to VirtualBox. In consequence, VirtualBox cannot provide VT-x to its VMs.
Post Reply