The question:
I am getting an error when I try to start Genymotion. It says
The Genymotion Virtual device could not obtain an IP address.For an
unknown reason, VirtualBox DHCP has not assigned an IP address to
virtual device. Run the VirtualBox software to check for issues
Can someone please tell me how to start it?
The Solutions:
Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.
Method 1
I had this same issue and here are the specific configuration that I needed to get this to work.
First, go to the VirtualBox preferences -> Network.
For the “Host-only Networks” tab, focus on the vboxnet0.
Click the icon on the left that looks like a screwdriver.
For the Adapter tab, fill in the IPv4 Network Address as 192.168.56.1
Fill in the IPv4 Network Mask as 255.255.255.0
For the DHCP Server tab, select the check box for Enable Server to enable the server
Fill in the Server Address as 192.168.56.100
Fill in the Server Mask as 255.255.255.0
Fill in the Lower Address Bound as 192.168.56.101
Fill in the Upper Address Bound as 192.168.56.254
The DHCP server part is what was not correct for me and it fixed my problem.
Method 2
This worked for me..
Open Virtual Box and select your mobile VM. Right click->Settings
Change Promiscuous mode to Allow VMS and click ok
Method 3
In virtualbox, go to the settings / network, and remove all host only
networks. Make sure to go to the global settings of virtualbox, not the settings of your specific VM.
The settings screen should look like this:
Then restart your emulator in Genymotion.
Method 4
I think you should configure your VirtualBox network adapter:
The adapter’s IP address has to be in the same network
(192.168.56.0/24 by default) as DHCP server’s IP address and DHCP’s IP
address bounds. If all those addresses are not in the same network,
then your Genymotion virtual device might not be able to start.
https://cloud.genymotion.com/page/faq/#collapse-blank
Or check log files to get a clue:
For each platform, the log files are stored here:
Windows Vista/7/8: C:UsersUSERAppDataLocalGenymobile
Windows XP: C:Documents and SettingsUSERLocal settingsApplication DataGenymobile
Linux: /home/USER/.Genymobile
Mac: /Users/USER/.Genymobile
https://cloud.genymotion.com/page/faq/#collapse-logs
Method 5
If you are using a Windows PC, check this first (this list looks quite long, but the first three bullets will let you know if Hyper-V could be your problem, and the next five bullets will tell you if this answer will solve your problem – just a few moments!):
-
Open a good old-fashioned command prompt (not a PowerShell) with admin privileges and type:
bcdedit
Enter
-
Take a look for an item in the list called:
hypervisorlaunchtype
. -
If
hypervisorlaunchtype
isn’t in the list, or isOff
, exit this answer and take a look at one of the other answers on this page. -
If
hypervisorlaunchtype
is in the list and is set toAuto
, Hyper-V is installed and is enabled. -
Disable
hypervisorlaunchtype
by typingbcdedit /set hypervisorlaunchtype off
Enter
-
Reboot
-
Try to start your Genymotion device again.
-
If it still fails enable
hypervisorlaunchtype
by typing into an admin command prompt:bcdedit /set hypervisorlaunchtype Auto
Enter
-
Reboot
-
Exit this answer and take a look at one of the other answers on this page.
-
-
Otherwise, if your Genymotion device now starts, you have a choice:
-
If you don’t need Hyper-V remove it by un-checking it in
Turn Windows Features On or Off
and exit this question. -
If you do need Hyper-V, allow easy enabling and disabling as per Scott Hanselman’s blog post, which I will outline in the following bullets:
-
-
You can leave the default as
Off
and then add an item to the boot menu that allows you to switch it on, or vice versa. -
If you are leaving the default as
Off
type the following into the admin command prompt:bcdedit /copy {current} /d "Hyper-V"
Enter
and you will get a response like this:
The entry was successfully copied to {ff-23-113-824e-5c5144ea}.
-
then type:
bcdedit /set {ff-23-113-824e-5c5144ea} hypervisorlaunchtype auto
Enter
(ensuring you swap the GUID for the one your call to
copy
above gave you)- That’s it, your done. (In order to switch between the two hold down the Shift key when you go for a
Restart
and then selectOther Operating Systems
on the blue screen and thenHyper-V
on the subsequent screen and your OS will restart with Hyper-V enabled.)
-
-
If you want Hyper-V to be enabled by default type into your admin command prompt:
bcdedit /set hypervisorlaunchtype Auto
Enter
(which will revert the default boot to enabling Hyper-V)
-
Then type the following in the admin command prompt:
bcdedit /copy {current} /d "No Hyper-V"
Enter
and you will get a response like this:
The entry was successfully copied to {ff-23-113-824e-5c5144ea}.
-
then type:
bcdedit /set {ff-23-113-824e-5c5144ea} hypervisorlaunchtype off
Enter
(ensuring you swap the GUID for the one your call to
copy
above gave you)- That’s it, you’re done. (As with
off
by default above, in order to switch between the two hold down the Shift key when you go for aRestart
and then selectOther Operating Systems
on the blue screen andHyper-V
on the subsequent screen and your OS will restart with Hyper-V enabled.)
-
This comment and this answer to the question you are currently reading lead me to the resolution in my case and I am adding this answer to outline simple steps to take before you spend a lot of time on any solution – that comment and answer do get you where this answer will take you, but I have laid it out step-by-step in the hope that you can save time.
Background:
This article by Scott Hanselman gave me the meat of what I have outlined, with this comment on that blog post by Jonathan Dickinson helping with my background understanding and preventing me disappearing down a rabbit hole, but this article by Derek Gusoff fine tuned the steps above.
Method 6
VMs used to work for me under Genymotion 2.0.0. with default RAM and CPU settings and VirtualBox 4.3.2 (on ubuntu 13.10). Upgrading to 2.0.1 made them stop working and give the error you mentioned.
I tried various fixes as I described here: https://stackoverflow.com/a/20018833/2527118, but in summary what fixed my problem was to delete VM and recreate it (same source and settings) in GenyMotion. You might want to try the other fixes (less destructive) before doing that.
Andrei
Method 7
In my case, I restart the computer and enable the virtualization technology in BIOS. Then start up computer, open VM Virtual Box
, choose a virtual device, go to Settings
–General
–Basic
–Version
, choose ubuntu(64 bit)
, save the settings then start virtual device from genymotion, everything is ok now.
Method 8
After trying all of these answers, to no avail, I managed to get it up by first running the device from Vbox, leaving it open, and then running the device from Genymotion… In my case this was the ONLY way after trying several different devices (Samsung S4/S6 etc), network/DHCP settings and modes and so on…
Method 9
In my case, Global Settings matters.
After I changed my global network setting with DHCP Servers on, I could start my genymotion virtual device.
- cmd+, or File > Settings
- Network
- Host only Network
- select vboxnet0, click driver icon
- Check DHCP on
I blogged it. http://okjsp.tistory.com/1165644212 (sorry for korean, but you can see it from images)
Method 10
I struggled quite a long time fixing this issue. In my case it was a combination of 2 answers that got it to work. Visual studio enabled my Hyper-V. I had to turn it off as suggested by LanderV. After this, I had to delete the Host-only network adapter in Virtualbox like Sammys said.
Method 11
For me it was related to the lack of virtual resources (Ram and CPU). Go to the virtual box, right click on device -> Setting and increase the value of each resource.
Method 12
Try downgrading to Virtual Box 4.2.18, if you are using 4.3.X.
I had a similar situation to yours.
I was using Genymotion 1.3.0 on Win7, with latest Virtual Box 4.3.2. Genymotion broke down after a computer shutdown, and never worked again.
I kinda stumbled onto this solution. After downgrading, Genymotion survived one shutdown now.
P.S. Changing network/resources settings in Virtual Box didn’t help me, so I’m putting this up and hope it helps.
Method 13
First of All, Make Sure to Enable Virtualization Technology under BIOS settings.
Method 14
Try this: Remove virtual device in Genymotion and Add again the same or other device.
(you will lose your settings and apps in that device)
Method 15
I had to change Adapter’s address to: 192.168.56.100.
Then it worked.
Method 16
(Windows 8) In my case i have changed default RAM from 1GB to 2GB on Genymotion and it gave this error. When i changed it back to 1GB it worked.
Method 17
In my case, i started device from genymotion and then started the device from Virtualbox as well. It helped me.
Method 18
try to clear the cache in genymotion Setting -> Misc -> Clear cache.
Check this image
maybe it will solve the problem.
Method 19
Here is a trick i use. Go to http://androvm.org/blog/download/ and download the latest AndroidVm.
Genymotion is the extention of AndroidVM.
Method 20
This problem keeps cropping up intermittently on my computer and usually, it happens when my computer is running low on system resources (mostly available RAM) and a sure-fire way to fix this (this at least has always worked for me) is to disable the VirtualBox Host-Only Network adapter and re-enable it.
If you have multiple virtual adapters, you’ll have to find out which of those is used by Genymotion’s virtual device and disable and re-enable it. You can find that out by starting VirtualBox and looking here:
You can read about enabling/disabling virtual adapters here
Method 21
I’m running OSX. The solutions suggested didn’t work for me. I’m using OSX Yosemite. I restarted my Mac then I uninstalled VirtualBox by launching the uninstall script (which is shown when you launch the dmg of VirtualBox) then reinstalled it. I also uninstalled and reinstalled Genymotion. Now everything is working smooth.
Method 22
I’ve had this issue and none of the suggestions I found anywhere helped, unfortunately.
The good news, however, is that the latest versions work without any hacks!
I’m referring to Windows 7 host here.
genymotion-2.5.4.exe
VirtualBox-5.0.5-102814-Win.exe (download from test builds)
Edit: This stopped working again after updates so I gave up on Genymotion. The new Android emulator in SDK performs just as well, has great functionaly, and works without hiccups.
Method 23
I’m using Windows 10 and had the same problem. I resolved it updating the VirtualBox to version 5.1.5. I hope it can help.
Method 24
Mine was working fine on Windows 10 (Creator update edition) but then suddenly stopped working after I had been messing with Homegroups and trying to share a file between our office network. Not really sure what caused it. Has taken me over a week of doing all of the various suggestions above with no luck. Finally, ran a few things that fixed it at last!
IMPORTANT: To be honest, of all the things I ran below, I don’t really know which one fixed it. I have a feeling that the IPv6 disabling tool would probably solve this straight away without the additional stuff. Maybe worth running that first to see what happens!
Here’s what fixed mine:-
- Removed virtual devices from Genymotion
- Went into VirtualBox (Files -> Virtual Host Manager) and removed the host only adapters.
- Opened command prompt as administrator. Type “cmd” into your search windows search bar, right-click on it and select “Run as Administrator”).
- Ran the following commands in order to put everything back to defaults and reset it all.
netsh winsock reset catalog
referencenetsh int ipv4 reset reset.log
same as aboveipconfig /release
-
ipconfig /renew
-
Disable IPV6 using Microsoft’s tool found here Disable IPv6 or its components (I downloaded and ran the one called Disabled IPv6 on all nontunnel interfaces)
-
Restarted computer
-
I was using Avast anti-virus. Uninstalled that too to completely remove that from the equation temporarily. I had already been disabling it temporarily whilst trying all the other solutions with no luck. Figured I’d uninstall it for certainty.
-
Installed Genymotion 2.12.0-vbox (with VirtualBox which should be 5.2.6)
-
After it installs, open up Oracle VM VirtualBox and go to File->Check for updates and you should be told there’s an update to 5.2.8 at the time of this post. Install that.
-
Now go to GenyMotion and add a new device. Should work! (I didn’t tweak anything in VirtualBox, didn’t change anything to anything else – it just worked as is for me).
Good luck!
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0