1

I would like to create some applications in React Native and I'm having problems with my PC that force me to use a virtual machine to code. I've chosen Oracle VM VirtualBox with Ubuntu for my virtual machine. I use Android Studio to test my application on an Android emulator. Unfortunately, when I select an image system, I get the following error:

Your CPU does not support required features (VT-x or SVM).

So I enabled the Enable VT-x/AMD option in my machine settings, then rebooted my computer, but the problem is still there.

My Virtualization Technology is enabled. My processor is: Intel Core i5 8300H @ 2.30GHz. My OS is: Windows 11

Rohit Gupta
  • 3,499
ImEmo
  • 13
  • 3
  • 1
    You are not forced to use a virtual machine. Simply connect an ADB enabled Android phone via USB to your PC and use it instead of the emulator. BTW: Why have you chose "VirtualBox" as emulator? Simply use the emulator included in Android Studio/ Android SDK or are you trying to run an emulator within a virtual machine? – Robert Nov 24 '23 at 10:27
  • @Robert I'm having storage problems on my Windows disk (C:), even after trying to clean it up as much as possible. Since I'm planning to code several projects, I thought the virtual machine was the right solution. So I installed a virtual machine on my Data (D:) disk. I chose VirtualBox because it's a free emulator with good reviews and I used it during my training. If you have any other options, I'd love to hear from you. I had tried to install Android Studio on my host, on the Data disk (D:), but some files were taking up space on my Windows disk (C:). – ImEmo Nov 24 '23 at 10:47
  • I thought it would be better to code with an android emulator, but if there's no solution to my problem, I'll just use my own phone with the Expo app. – ImEmo Nov 24 '23 at 10:50
  • 1
    Sorry but using a virtual machine just because of storage problems is a stupid idea (e.g. because of problems connecting real Android phones, the USB pass through into a VM is often not very reliable). If you really want to go that way make sure you have enabled "Nested VT-x/AMV-V" for the VM. IMHO you should better make yourself familiar with workarounds for your storage problem, e,.g. installing software on your D drive and redirecting folders from C drive to D-Drive using NTFS soft-links. – Robert Nov 24 '23 at 10:53
  • As I said, "I enabled the Enable VT-x/AMD option in my machine settings, then rebooted my computer, but the problem is still there." – ImEmo Nov 24 '23 at 11:02
  • 1
    The Machine settings are you system BIOS, I was talking about the virtual machine settings. First you have to enable VT-x in system BIOS, then in the VM configuration, because usually a VM inside a VM is not possible in default settings of VirtualBox. – Robert Nov 24 '23 at 11:06
  • “Unfortunately, when I select an image system” - [Edit] your question to indicate if your installing Android Studio on the host or guest. Furthermore, double and triple check, that virtualization is not only enabled on the host machine but also enabled within the virtual machine. You will also have to enable nested virtualization to use Android Studio within a VM. If the checkbox is grayed out but checked it means nested virtualization is actually NOT enabled. – Ramhound Nov 24 '23 at 22:03
  • "I'm having problems with my PC that force me to use a virtual machine to code." - Typical XY problem? "Your CPU does not support required features (VT-x or SVM)" - Since you run in VM the message is about the VM not the PC. – Joep van Steen Nov 30 '23 at 11:09

1 Answers1

0

As you are trying to run an Android emulator within a VirtualBox you have to enable VT-X/AMD-V at two places:

  1. In your physical PC system BIOS (not the BIOS of the VM): check your PC mainboard documentation
  2. In the VirtualBox VM settings you need to enable the option Enable Nested VT-x/AMD-V (can be found in System settings of the VM -> Processor tab).

enter image description here

Robert
  • 7,858
  • Yes, the VT-X/AMD-V option is activated in both places. I'll look for an alternative solution. – ImEmo Nov 24 '23 at 12:59
  • @ImEmo As I wrote, developing apps for phone in a VM is a bad idea. There a a lot of ways to get more space on the system disk like moving folders to a different drive and retaining just an NTFs softlink: https://superuser.com/q/1020821/62676 – Robert Nov 24 '23 at 13:10
  • Thanks, I'll do that – ImEmo Nov 24 '23 at 13:23
  • 2
    @ImEmo - If you had already done what was suggested in this answer, and it didn’t answer your question, why did you accept the answer? – Ramhound Nov 24 '23 at 22:00