ERROR: x86 emulation currently requires hardware acceleration!` in android studio on google cloud virtual machine - google-cloud-platform

Currently new to google cloud
and working on vm.
Can anyone help me how can i use android emulator on vm.
it shows me
Emulator: emulator: ERROR: x86 emulation currently requires hardware acceleration!
now how can i enable hardware acceleration on vm??

First of all you can not access BIOS on Google Compute Engine VM. When you restart the instance you will be automatically disconnected from the SSH session. As soon as you open another SSH session again you will be already logged in to the os.
Android Studio Emulator is another Virtual Machine that emulates the operation of an Android device. So what you are looking for is VM nested inside a Google Compute Engine VM, you can refer to the Enabling Nested Virtualization for VM Instances documentation, for further information.
However, you can use arm64-v8a or armeabi-v7a ABI. They are pretty slow but you will be able to test your applications there. You can make them faster, but it will require a powerful VM that will cost a lot of money. To use those images in Android Studio emulator:
Go to Tools > AVD Manager.
On the bottom left corner click on + Create Virtual Device ....
In Choose a device definition, choose any device you want and click Next
In Select a system image go to Other images tab
Choose any arm64-v8a or armeabi-v7a ABI. (Download if you don't have one)
Click on Next, give a name and click Finish
Run the Virtual Device and give it some time, according to how powerful is your VM it will take some time to load. You will see an Android logo loading and after few minutes you will see the Home Screen. If it takes too long, try restarting the AVD and the Android Studio, then leave it some time to load. It is pretty slow, but it is working, I tested it myself.

Try below steps -
Open SDK Manager (In Android Studio, go to Tools > Android > SDK Manager) and Download Intel x86 Emulator Accelerator (HAXM installer) if you haven't.
Now go to your SDK directory C:\users\%USERNAME%\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager\ and run the file named intelhaxm-android.exe.
In case you get an error like "Intel virtualization technology (vt, vt-x) is not enabled". Go to your BIOS settings and enable Hardware Virtualization.
Restart Android Studio and then try to start the AVD again.

Related

How to fix "Please ensure that target device has developer mode enabled" error in Hololens Emulator

The problem that I have is that after I have built my Unity project using Microsoft's Mixed Reality Toolkit and the Windows SDK 10.0.18362.0 I try to deploy it using the Hololens 2 emulator (version: 10.0.18362.1019). The result is that even though the emulator opens, my Unity application does not get deployed and the following error is being shown in Visual Studio's error list:
Please ensure that target device has developer mode enabled. Could not
obtain a developer license on 192.168.9.57 due to error 80004005
I found several articles online that had the same problem like me, and they either referred to resetting the HoloLens device (which I do not need to do, since it is an emulator) or enabling the Developer Mode on the host machine (in my case a fully updated Windows 10 Enterprise Edition computer), which I already have. Nevertheless the error persists.
I just hope that there will be a way to get rid of this error and manage to deploy my Unity application onto the HoloLens emulator.
It seems that the solution is very simple. If you actually run Visual Studio as an Administrator the application is successfully deployed onto the emulator.

virtualbox - virtualization is enabled but not working

Ok, I have the most recent version of virtualbox installed, my computer (HP) has an AMD A10, 64bit Windows 10 OS and 6Gb RAM.
I created a virtual machine with Windows 7, there I wanted to create a new virtual machine (a VM2 in a VM1), but I cant run it because I have no virtualization enabled in the VM1.
ok, so I checked the VM1 configuration and the virtualization is enabled in the virtualbox settings. I've tried with all the Paravirtualization interfaces and always having the Hardware Virtualization enabled (VT-x and AMD-V).
I really don't know why this is happening if this is all suposed to be enabled and there arent documentations of similar issues.
I tried changing the number of CPUs used by the VM1 and all the interfaces.
I seach for 2 days and nothing worked for me.. then i find the solution:
The problem is in Windows 10... u need to disable Hyper-V Manager ...
1) make sure in your BIOS cpu virtualization is enable.
2) open your CMD as administrator
3) in your desktop folder type bcdedit and look for hypervisorlaunchtype in the bottom ... if it is Auto or enable we need to disable it !!!!!!
See this picture
4) type in your cmd bcdedit /set hypervisorlaunchtype off
5) Restart your OS and be happy !!!
i know this is a old question ... but for everyone who have a similar problem i hope it helps !!
Turn off the core isolation security provided in the Windows Defender Security Centre.
I found that enabling it turn off your Intel Virtualization technology feature while it is enabled in BIOS.
Steps to follow:
1. Go to Windows Defender Security Centre.
2. Search for Device Security in the left Panel and click on it.
3. Now click on core isolation.
4. Turn off the memory intergrity security.
If it didnt turn off and show (This is managed by your device Administrator) then follow the steps by searching on google.
You may need to download a file and enter into registry to turn it Off. Just google it.
The answer is correct, however there is something worth mentioning:
Usually the Hyper-V Manager is enabled by Docker (Docker runs on top of HV Manager), in my case it only worked after :
Removing Docker
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
the command line will ask you to restart, then you will able to run VX images!
In my case, my os is windows 10, I enabled virtualization VTx and Vtd in BIOS, but it didn't work. After seaching online, I sovled this problem. Hope this can help people.
Press Windows key + X and select "Apps and Features".
Then click "Programs and Features" link.
Then click the "Turn Windows features on or off" link on the left pane.
Locate "Virtual Machine Plateform" option and check it.
(These two steps I'm not sure : Locate "Hyper-V" and "Windows Hypervisor Plateform" option and unmark them.)
Click OK to save the changes and reboot.
Below is the screenshot:
enable Virtualization
And you can check if it is working fine in task manager, in the performance tab you can see whether the virtualization enabled or not.

VT-x is disabled in the BIOS for both all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED)

Downloaded Xamarin Android Player and with >>next>> progress installed Virtual Box.
When I tried to start an emulator I got
Failed to initialized device (name Of the emulator)
VboxManager Commendt Failed
and the detail of the error in Oracle Vm Virtualbox is
VT-x is disabled in the BIOS for both all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED)
How can I fix this?
I have found the solution of my problem, put some images to help others, thanks
go here
It is a RAM related issue. The documentation is self explanatory:
You are trying to allocate >3GB of RAM to the VM. This requires: (a) a
64 bit host system; and (b) true hardware pass-through ie VT-x.
Fast solution
Allocate less than 3GB for the virtual machine.
Complete solution
Make sure your system is 64 bit.
Enable virtualisation in your host machine. You can find how to do it here or there are many other resources available on Google.
Turning PAE/NX on/off didn't work for me. I just needed to turn on virtualization on my computer. I was working on a HP Compaq 8200 and followed the steps below to turn on virtualization. If you are working on a different computer, you probably just need to look up how to turn on virtualization on your pc. The steps below for HP Compaq 8200 (or similar) is copied verbatim from the comment posted by the user qqdmax5 on Hp discussion board here.
To run Oracle VM Virtual Box / VMware machines on 64-bit host there is a need to enable Virtualization Technology (VTx) and Virtualization Technology Directed I/O (VTd).
Usually these setting are disabled on the level of BIOS.
To enable VTx and VTd you have to change corresponding settings in the BIOS.
Here is an example how to do it for HP Compaq 8200 or similar PC:
Start the machine.
Press F10 to enter BIOS.
Security-> System Security
Enable Virtualization Technology (VTx) and Virtualization Technology Directed I/O (VTd).
Save and restart the machine.
There is also some discussion on this on askubuntu.
In Virtual Box "Settings" > System Settings > Processor > Enable the PAE/NX option. It resolved my issue.
I had this issue when tried to run a 32-bit OS with more than 3584 MB of RAM allocated for it. Setting the guest OS RAM to 3584 MB and less helped.
But i ended just enabling the flag in BIOS nevertheless.
Follow the steps below in Oracle VM VirtualBox Manager:
Select the Virtual device and choose Settings
Navigate to System and click the Processor tab
Tick the check-box, Enable PAE/NX
Click OK and you are done
To verify, start the Virtual device from Oracle VM VirtualBox. If all has gone well, the device boots up.
Close this device and open it from Genymotion.
For latest Windows 10 (HP & Intel motherboard/processor),
Follow the below steps, starting with :
Settings ->
Update & Security ->
Recovery ->
Advanced startUp -> Restart now
F10 (System Recovery) -> System Configuration tab -> Virtualization Technology
Enable
F10 to save and exit
For Ubuntu on HP (Intel processors),
Press F10 on booting the system, it will enter into system setup mode.
You will find tabs on top like Main, Security, Advanced.
Go into Advanced >> and click on System settings.
Mark the check boxes on Enable Virtualization Technology (VTx) and Virtualization Technology Directed I/O (VTd).
Back to Main, click on save changes and exit.
enable PAE/NX in virtualbox network config
My BIOS VT-X was on, but I had to turn PAE/NX off to get the VM to run.
You need to enable virtualization using BIOS setup.
step 1. Restart your PC and when your PC booting up then press your BIOS setup key (F1 or F2 or google it your BIOS setup key).
step 2. Go to the security menu.
step 3. Select virtualization and enable it.
Note:- BIOS setup depends on PC Manufacturer-brand.
If you're on 32-bit machine don't allow more than 3584 MB of RAM and it will run.
I had to turn PAE/NX off and then back to on...voila !!
Make sure Virtualization is enabled in your bios.
Simply check how many CPUs you are allocating. With one CPU you do not need to play with your bios.
Open your BIOS and enable virtualization.

Unable to power on VMware

I installed VM ware recently now whenever i try to power on VMware it shows the below message:
"Not enough physical memory is available to power on this virtual machine with its configured settings.
To fix this problem, adjust the additional memory settings to allow more virtual machine memory to be swapped.
If you were able to power on this virtual machine on this host computer in the past, try rebooting the host computer. Rebooting may allow you to use slightly more host memory to run virtual machines."
I am not able to change the memory setting .It just shows an option to resume the virtual machine, All other options are disabled. I have by mistake increased the VM ware memory in run time .Could any one help?
For anyone who encountered this problem recently, please visit this link:
http://blogs.vmware.com/workstation/2014/10/workstation-10-issue-recent-microsoft-windows-8-1-update.html
Go to Control Panel -> Programs -> Programs and Features,then uninstall the Windows 8.1 Update KB2995388 may help
--* Edit *--
The Optional Update for Windows 8.1 for x64-based Systems (KB2995388) published on 10/13/2014 may causes issues when running VMware Workstation on a Windows 8.1 host with it installed.
And a message saying "not enough physical memory" will be reported.
Because the VMware team hasn't fix the issue, you can follow steps below to uninstall the update to boot your virtual machine:
1.Go to Control Panel -> Programs -> Programs and Features, then select View installed updates at the top left corner.
2.Scroll down the list and locate Update for Microsoft Windows (KB2995388), select it and click on the Uninstall button.
3.Follow the steps to finish the uninstallation.
In the comment list, someone also reported a fix from VMware communities:
Open the config.ini file located at C:\ProgramData\VMware\VMware Workstation.
Add this line:
vmmon.disableHostParameters = "TRUE"
Save & reboot your PC
It sounds like your VM machine is in a suspended state. What you need to do is follow the steps outlined here in this help ticket. Do these steps while vmware is not running. And once you do this, start vmware again and then you should be able to edit your memory settings.
Run it in Administrator mode in Windows 8.1. Probably a Windows Update... Deleting the suspended state didn't work for me.
Before proceeding with any alternative solutions/workarounds, please always double ensure you have updated to the latest version of VMWare Player.
My machine was running VMWare Player, Version 6.0.*, and this issue was occurring (my local machine's Operating System is Windows 8.1). The relevant error(s) were resolved after updating to the latest build currently available, VMWare Player, Version 7.0 (Please note: I did not have to remove/uninstall any Windows Updates/Features)
Just spent a few hours trying to get my VMware to boot. Power flickered off enough to shut down the computer while the VMware was in suspension and recieved this message.
Make sure the update isn't installed. Make sure to follow the accepted answer. What made it work for me was:
Right click on your development name tab
Click on "Manage" and then "Clean up disk"
It worked for me. I'm not sure why it worked, but it was able to fix my issue. Didn't need to restart.
Follow these steps:
Close the VMware.
Select VMware icon.
Run VMware as Administrator.

Attaching Unity's integrated profiler to Mobile Devices

Has anyone successfully used the Unity profiler with a physical mobile device? (i.e. the Unity 3.4 IDE tool that provides real-time stats on Unity calls, not the iOS or Android internal profilers). And if so, can you post the details about your setup and your experience?
I'm starting to get the feeling that people aren't using the profiler to test their games on real devices, given how little I can find in the Unity documentation and forums or on the web in general. In particular, dreamora is the only person I have heard of who has successfully attached the Unity profiler to a real device running a game (and then, only on iPhone not Android). It is also suspicious to me that the Android remote tool for Unity 3.4 which I downloaded form the marketplace requires a cable to connect to the Unity IDE and doesn't seem to have a wireless option; I see this as a red flag that wireless profiling by attaching the Unity profiler to an Android device may be impossible (please correct me someone if I'm wrong).
I would like to know your experiences (good or bad) with this tool, and assuming you have been able to profile a device, specifically I would like to know:
1) Did you connect to and Android or iOS?
2) What device and API version (i.e. Nexus S1 AndroidAPI=2.3.7 Kernel=2.6.35.14 running Cyanogen MOD 7.10)
3) What type of computer are you using (Windows or Mac, and OS)?
4) What is the nature of the connection you were able to make between your computer and the device?
4.1) Wired or wireless?
4.2) If wireless, ad-hoc from computer to device, tethering from device to computer, or both connected to the same WLAN router?
4.3) If wireless, what is the setup (DHCP, Static IP, ttl=4, etc?)
5) What are the Unity build settings (i.e. Development Build checked/unchecked, Autoconnect Profiler checked/unchecked, etc?)
6) What were the specific steps you took to connect to the device? (i.e. Build and run on device, then restart Unity twice, then offer up a prayer to the gods by sacrificing a Symbian phone, then connect via the Active Profiler pull-down, etc.)
Let's get to the bottom of this together, I will repost any information this community can provide me with in the Unity forums as well.
Well, I am going to partially answer my own questions here: By following these steps I was able to connect to and profile my Android Nexus running the Cyanogen Mod (7.1) using my MacBook pro (running 10.6.8 "Snow Leopard") on both Unity 3.4.1 and 3.4.2:
Create a WiFi Hotspot using Internet sharing on your Mac. Use the "Share your connection from: Ethernet" and "To computers using AirPort (AirMac)" options. I did not password protect my network.
Connect to this the WiFi network on your Android.
Quit Unity.app (if you already launched it).
Disable the Ethernet interface under System Preferences -> Network (select 'Off' from the Configure IPv4 pull-down menu)
Launch Unity.app
Enable Ethernet interface under System Preferences -> Network (select 'Using DHCP' from the Configure IPv4 pull-down menu)
Now Your Android should be in the list of the Profiler window. Of course, you will need to launch a Unity application that was built with the 'Development Build' and 'Autoconnect Profiler' checkboxes selected under Build Settings (that's what I did at least).
Happy Hunting!
-Arun
If the above don't work or you need to profile specifically on a Windows Phone, try the following...
1.) Make sure in Build Settings you set it to 'Development Build'.
2.) Connect your phone to your Wifi Network, then click on the wifi connection to see your phone's IP address
3.) Enter the phone's IP address in the profiler, and press the 'Record' button and the profiler will begin profiling on your phone.
4.) Run your game from Visual Studio, wait and you will see the profiling will begin.
If you don't see your phone in the profiler, try this alternate method
1.) Connect the phone to your PC
2.) Make sure in Build Settings you set it to 'Development Build'.
3.) Build the game to Visual Studio
4.) Run the game in 'Debug' mode from Visual Studio
5.) When the game is running on the device and is past any loading screens, click on the 'Active Profiler' dropdown in the profiler, and the device should be listed there