Sunday, December 9, 2018

virtualbox - How can I run the Android emulator together with another VM?


Whenever I open an Android emulator when a different kind of VM is already running, I get the "usual" error messages:



emulator: Failed to sync vcpu reg
emulator: Failed to sync HAX vcpu context



Here it is recommended not to run another VM, but what if I need the another VM for development, or to run the server for my Android app on it? Is there a way to run a VirtualBox Linux guest VM and the Android emulator at the same time? My host OS is OSX if that matters.



Answer



Yes, there is a way to run a VirtualBox Linux guest VM and the Android emulator at the same time.


I have a working setup doing exactly this now, and its reasonably simple. To solve the problem above, you can run Genymotion as your Android emulator, and Virtualbox for your Linux guest VM virtual machine.



This counteracts the problem described in the answers above as Genymotion uses Virtualbox "underneath" as a hypervisor, meaning both of your Virtual Machines (The Linux Guest and the Android emulator) are running in the same hypervisor. This is exactly what hypervisors are meant for.


Also, to clarify the meaning of the poster in the link you gave, who states "it is recommended not to run another VM", I think what he means is that you can't also run other hypervisors (Docker and Virtualbox are described there) in parallel with Android Emulator, for the reasons described by other answers here.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...