Can I run AVD on a Virtual Windows 10 Desktop - android-studio

I am currently working form home for an organisation.
Is it possible to run Android Emulator via Android Studio on a Virtual Desktop which has Windows 10 installed.
Also, should I keep my specs low for the Emulator, as I have enough RAM in my VDI.
And do I need to ask the organisation to enable Virtualization in the Virtual Machine, As it may not be possible for me to do so. Or, there is no such things in Virtual Machines?
Currently, When I try to run Emulator, it just gets stuck on black screen forever and timeouts.
I have tried multiple options. But none of them works.

No, after digging in a lot.
It was Azure VDI, windows 10.
And it's not possible to run a virtual machine (Android Emulator) inside another virtual machine.
It may be possible to run in another OS.
But not on Windows which asks to enable Hyper-V.
Which won't allow installation of Intel HAXM.

Related

Trouble installing HAXM in Android Studio (Windows 10)

Brand new to app development and am having a bit of trouble activating an Android Virtual Device (AVD) for Android Studio (Windows 10). I am trying to install HAXM but receive the attached message.
Upon going into my /installed programs/ directory to uninstall Microsoft Hyper-V, the program is not listed. Would the Hyper-V program be listed under another name, or rather, could anyone please provide feedback as to resolving this message? Any feedback would be greatly appreciated!
For AMD system, you can use Windows Hypervisor Platform (WHPX) under Windows 10 since Version 1803:
To enable Windows Hypervisor Platform (WHPX) do the following steps:
From the Windows desktop, right-click the Windows icon and select Apps and features.
Under Related settings, click Programs and Features.
Click Turns Windows Features on or off.
Select Windows Hypervisor Platform
click ok and reboot.
Now create a new Android Virtual Device (AVD).
Yes the same was here too,
Ok there are 2 ways of solving this ,
First you can go to BIOS and disable the Hyper V and enable the VT x for intel. If you had not the VTx or with disabling Hyper v nothing has solved then come to Second solution.
The second is there is not a solution available for you and your computer just like me. Your cpu and computer cant install HAXM which mean you cant install and run emulator , but hang on, google has added new property to emulators to run without HAXM and you need to install those package of SDK api which has Amd virtualization or non HAXM, also even this one has not helped me, so if you were like me then you can use physical device for testing or installing linux instead of windows and use Hyper v to run emulator in android studio instead of HAXM, and i prefer Lubuntu cause of speed it will gives you if you wantes to install.

Android Studio running on VMware virtual machine: KVM is not installed

I'm running Android Studio on a Ubuntu VMWare virtual machine. The problem is that when I try to run an app with the AVD emulator I get the following errors in the console:
/home/verite/Android/Sdk/tools/emulator -avd Nexus_5_API_22_x86 -netspeed full -netdelay none
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure KVM is properly installed and usable.
CPU acceleration status: KVM is not installed on this machine (/dev/kvm is missing).
I've tried to solve the problem by doing this:
sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
sudo adduser `id -un` libvirtd
sudo adduser `id -un` kvm
and restarting, but it doesn't work. When I issue the command:
sudo kvm-ok
I get
INFO: Your CPU does not support KVM extensions
KVM acceleration can NOT be used
Could someone tell me how to fix the problem, please?
Thanks
I faced the same problem. I searched and I found the solution it works with me now:
In VMware:
Open Virtual machine setting.
Go to the processor.
Check the virtualize Intel VT-x/EPT or AMD-RVI option.
Click ok and run the Virtual machine, it should work fine with you.
Hope that works with you.
This link HW virtualization in VMware (KVM - Android Studio) helped me to find the solution.
Bad news found in the Using the Emulator section of the official Android developer website:
Not Inside a VM - You cannot run a VM-accelerated emulator inside
another virtual machine, such as a VirtualBox or VMWare-hosted virtual
machine. You must run the emulator directly on your system hardware.
So it seems my best alternative is look for a real device compatible with the Android Studio for running the apps.
You have vCenter and vSphere Web client use this to edit the VMs config Right click the Your_Windows_GuestOs > Edit Settings > CPU > Check the box "Expose hardware assisted virtualization to the guest OS
.
Install Android on a Cloud Virtual machine (AWS windows server)
Since my machine was slow with Android Studio I created a virtual machine on windows server on AWS with the best processor and RAM configurations, which gave me seamless programming and execution experience. But to use the emulator I face the error listed below.
Error:
Unable to install Intel HAXM
HAXM doesn't support nested virtual machines.
Unfortunately, the Android Emulator can't support virtual machine acceleration from within a virtual machine.
Here are some of your options:
1) Use a physical device for testing
2) Start the emulator on a non-virtualized operating system
3) Use an Android Virtual Device based on an ARM system image (This is 10x slower than hardware accelerated virtualization)
Since we can't connect our device to the Cloud machine, the option #3 is the best way to go.
Once the Android studio is installed,
Go to Tools -> Android -> AVD Manager
Click "Create Virtual Device"
Select which device you want to use from the list (i.e Nexus 5) and click "Next".
Here you're given a list of android release versions. Look at the ABI column.
Choose "Armeabi-v7a" for whichever API Level you want.
Hit "Next" and modify name/size, click "Finish" when done.
if 'Next' doesn't work, download the desired image and continue
I have android emulators running inside VMWare guest. It is utilizing Windows and not Linux, but the principles apply. As has been mentioned, the biggest item is ensuring the the VMWare processor setting for virtualization is checked.
Here are my specifics:
I'm running Win10 for both Host and Guest.
I have Android studio and android emulators running inside of a single VMWare guest which is being run using VMWare's player software.
Here are the versions:
Windows 10 64 bit both host and guest.
Windows 10 guest Ram 6 Gig
Android studio 3.3.2
AVD Emulator
VMWare Player 12, 12.5.1 build-4542065
VMware Number of Processors: 1
VMWare Setting for Processors: Virtualize Intel VT checked.
I faced this exact same error while running AVD in a cloud VM, adding a license solved it.
So, VMWare any cloud provider will not provide you the ability to create nested virtual machines. It is blocked by default so the Android studio would work but you would not be able to run an AVD, that’s not much useful.
To allow this you would then add the following license while VM creation-
https://compute.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx
Note: This works only for GCP, you need to add different licenses for VMWare
This was just a short just of what you would do and the major steps involved, however, I highly recommend you to read this blog by me which provides a step by step guide to doing so.
I also urge you to check this answer by me where I explain this in greater detail for GCP.

Windows Phone Emulator error, Hyper-V components not running, Windows 8.1 hosted in Windows Azure

Environment:
Windows 8.1 Enterprise 64-bit hosted in Windows Azure
Visual Studio Ultimate 2013 (Update 2)
I get the following error when trying to run a very simple phone app. I know MS says a VM-within-a-VM environment isn't supported, but I know it can work. Has anyone had success with this? Any help is greatly appreciated.
Windows Phone Emulator
The Windows Phone Emulator wasn't able to ensure the virtual machine was running:
Something happened while starting a virtual machine: 'Emulator WVGA 512 MB.' failed to start.
(Virtual machine ID CADD6546-129A-4683-9A2D-52EAE777E888)
The Virtual Machine Management Service failed to start the virtual machine 'Emulator WVGA 512 MB.'
because one of the Hyper-V components is not running
(Virtual machine ID CADD6546-129A-4683-9A2D-52EAE777E888).
Prior to seeing the error, the emulator emits the on-screen messages:
Loading ...
The Windows Phone OS is starting ...
And then the error. Of all the Hyper-V services available, the Hyper-V Virtual Machine Management service is the only one which is running.
Thanks,
Chris
I had the same issue with Visual Studio running on windows 8.1 in vmware player
What I had to do to solve the problem was this :
Tick the box "Virtualize Intel VT-x/EPT or AMD-V/RVI" in the processor settings of your VM
Add the line "hypervisor.cpuid.v0 = FALSE" in the file "Windows 8 x64.vmx" (add it between line 5 and 6. Not sure this matters, but at this line I'm sure it works)
Should be working fine
"You cannot host it in Azure. It needs to be a physical machine." -- Jeff Sanders (MSFT)
Florian.C's answer got me on the right track to get the emulator working correctly in VMware Fusion on my MacBook Pro. In Fusion, the settings are under the "Processors & Memory" section. You have to open the "Advanced" section at the bottom and check the "Enable hypervisor applications for this virtual machine". Once that was done, I had to also open the .vmx file and add the "hypervisor.cpuid.v0 = "FALSE"" line. Originally I copied and pasted from SO and the VM threw an error when I booted it. It turns out the " I added around FALSE were not normal quotes. Once I fixed that, the VM booted and the emulator ran just fine under Fusion. Thanks for the great info!

Windows Phone 8 via USB does not display in VS2012

I was working on my windows 8.1 OS on my Virtual Box running Visual Studio 2012. Yes I am working on an 8.0 with a feature and after planned on migrating everything to 8.1 since it can be integrated more easily with PC And tablet. Everything was working fine and my windows phone 8 was connected via my virtual box via USB and showed up in VS2012. My Virtual Box did 2 random shutdowns and now my VS2012 only shows an option to use an emulator. This was never working before which is why I always debugged via my windows phone. Hyper-V and all of that stuff specified it was installed using a CoreInfo.exe file I got off the web to check to make sure the appropriate stuff was enabled. Now after the 2 random virtual machine shutdowns the emulator is the only option showing when I want to debug.
Things checked:
Restarted both phone and virtual box OS.
Uninstalled device driver on the virtual box machine.
The 2.0 option is checked in the settings for the virtual box OS and can see the windows phone connected on the virtual machine via the device manager.
It mysteriously started working again where the windows phone was connected instead of to a 7.1 emulator. I wish I could give a reason or an explanation to what I did to fix it but I didn't do anything to create this specific issue nor to fix it. I put this up just in case anyone was reading it.

Genymotion on VMWare

I'm on Xubuntu running with VMWare on Windows 7. I'm developing an android app' and use genymotion to run virtual android device. But from few days, when I try to run my virtual device genymotion show me this error :
(translated from French)
Impossible to run the Genymotion virtual terminal.
The Genymotion virtual terminal haven't obtained IP address.
For an unknown reason, the VirtualBox's DHCP server haven't assigned IP address to the virtual terminal. Please run VirtualBox to find a solution for the issue.
For further help, please go to :
https://cloud.genymotion.com/page/faq/#collapse-nostart
So, I followed the link and see that I should have the same IP address for the adapter and the DHCP server and explain how to modify. I change the IP of the DHCP server to be the same as the adapter. But looks like it doesn't fix the issue because the same message appear after the modification.
A friend of mine told me to download the latest version of Genymotion. I did but there's still the same issue.
For the reason why I'm on such virtual device is because I had lot of problem have a stable installation with dual boot windows/linux so I choose a virtualisation of linux instead. And I can't work on windows because it's a team work and work on windows have some conflict with work on linux.
I hope I've been understandable and excuse me for the language fault.
EDIT :
I've try creating a new virtualisation of Xubuntu and install genymotion to see if it was an update I mad or an other mistake I could have done that broke genymotion.
But the same problem appear. I think the problem come from the double virtualisation but I don't know how to fix it.
Actually I just found what my problem was (or look's like). In the settings of the virtual device, in the CD/DVD (SATA) section I choose "use ISO image file" instead of "use physical drive".
I don't know why the issue was related with the CD/DVD. But now I can run the genymotion virtual device. It's slow as hell but it work.
I also found a way to run Android Emulator on MAC (running with VMWare on Windows):
First open VirtualBox and start your Android device. Then start the same device in Genymotion.
To have a relative smooth reaction time - set video memory to 128MB and Motherboard memory to 1024MB in VirtualBox.
You cannot really do virtualisation from a virtualized guest.
You must install Genymotion on the host OS.
You can see an entry on this subject on the Genymotion FAQ here: https://cloud.genymotion.com/page/faq/#genymotion-from-virtualized-host
To run the android apps on genymotion or your device from vm, you can follow these instructions:
Install genymotion on your local os
Install arm translation app on your genymotion
Reboot genymotion
Install google play service on genymotion
Reboot again
Download & install adb wireless app from play store on genymotion
Run adb wireless then get allocated ip address that generated by
this app
Run this command on vm
adb connect <IpAddressGeneratedByAdbWireless>
enjoy!

Resources