Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Android Tools Getting Started with Genymotion Creating a Genymotion Emulator

"Virtual Device got no IP address" Genymotion

If I try to open the Genymotion Virtual Device, a message will pop up and say "Virtual Device got no IP address. The Virtualbox DHCP server has not assigned an ip address to the virtual device." What's wrong? I followed Ben's instructions!

Harry James
Harry James
14,780 Points

Hey Stephanie!

This usually means there's an issue with the Virtualbox Network.

Please can you press Start+R on your keyboard which will bring up the Run dialog and then type in cmd.exe to bring up Command Prompt.

In Command Prompt, type ipconfig which will bring up the status of all your Network Adapters. Here, find Ethernet adapter VirtualBox Host-Only Network and right-click on the Command Prompt. Then, press Mark. You'll now be able to highlight the text. Highlight all of the VirtualBox section and right-click again, the text will then be copied for you.

Please paste this text here and I'll see if anything looks wrong. If nothing does look wrong, we know it's something else causing the problem (Firewall is often another good thing to check - both Genymotion and VirtualBox need access to the network).


Speak to you soon :)

Hi, thanks so much for replying! I followed your instructions, and found the Network, but also found two more with the same name (with #2 and #3 after the name). Here is the info for all three:

Ethernet adapter VirtualBox Host-Only Network:

Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::65:4562:a031:8b8d%1 IPv4 Address. . . . . . . . . . . : 192.168.56.1 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . :

Ethernet adapter VirtualBox Host-Only Network #2:

Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::1df6:c06e:c489:3830%30 Autoconfiguration IPv4 Address. . : 169.254.56.48 Subnet Mask . . . . . . . . . . . : 255.255.0.0 Default Gateway . . . . . . . . . :

Ethernet adapter VirtualBox Host-Only Network #3:

Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::2869:1602:d417:b06d%34 IPv4 Address. . . . . . . . . . . : 192.168.141.1 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . :

Harry James
Harry James
14,780 Points

That's interesting - it looks like there's multiple instances of the adapter and this may be confusing Genymotion.

If you open Device Manager (Accessible from Control Panel) and look under Network Adapters, are all 3 of the adapters listed there?

Yes, all three of them are listed.

The Virtual Device is loading - it's taking a while, but it has gotten farther than it ever has! Thanks, and I will post a comment after it loads about whether it works or not.

3 Answers

Harry James
Harry James
14,780 Points

Hi Stephanie!

Sorry I wasn't able to solve your issue. Anyhow, using a mobile device will always be the fastest method and is what you'll find most major Android Developer's using - especially if you're running the app a lot of times and want to test it on a device with Play Services.

There are a few things left to try if you want to use them so I'll leave them here if you want to try your luck for one last time:

  • Try using a different emulator. I once had this issue and by downloading a different emulator on Genymotion it fixed it somehow (Maybe just coincidence though).
  • Try setting the Adapter/DHCP Server settings as above and also making sure there is only 1 adapter in Device Manager - disable all the others.
  • Completely uninstall VirtualBox by running the uninstallation file. Then, in Windows Explorer, type %userprofile% into the Address Bar and delete the .VirtualBox file. Then, completely install Genymotion by following the instructions here. After that, restart your computer before attempting to reinstall VirtualBox and Genymotion.

Best of luck and if there's anything else, give me a shout :)

Thank you for bearing with me, and I will try that!

Harry James
Harry James
14,780 Points

In that case, try disabling #2 and #3. To do this, right-click on the adapters and press Disable.

If you were to do something wrong (e.g: Disable the wrong adapter), you can enable them again from the same right-click menu.

Then, see if Genymotion starts up properly this time.

The Virtual Device loaded after a while, but was extremely laggy. Then, I closed it and tried to open it again, and the same error popped up.

I just checked the Network Adapters, and saw another one with the same name (#4) appear. It wasn't there before...

Harry James
Harry James
14,780 Points

Hmm. That's definitely where the problem lies then. It's getting quite late here where I am so I'll look into this and get back to you tomorrow :)

Ok, thank you so much!

Harry James
Harry James
14,780 Points

Hello again!

Could you please open up VirtualBox and select the emulator you are trying to open. Then, tell me what is under the Network heading on the right pane (A screengrab may be easier than typing it all out but either works).

Hello, Under the Network heading, this is what it says:

Adapter 1: Paravirtualized Network (Host-only Adapter, 'VirtualBox Host-Only Ethernet Adapter #2') Adapter 2: Paravirtualized Network (Bridged Adapter, Intel(R) Wireless-N 7260)

Harry James
Harry James
14,780 Points

Hey again Stephanie!

Could you please try changing Adapter 1 to VirtualBox Host-Only Ethernet Adapter without any #'s afterwards and give that a go.

If that doesn't work, make sure Adapter 1 is still set as above but then also update Adapter 2 so that it is attached to NAT

You can do this in VirtualBox by selecting the device, pressing Settings and going to the Network tab.

If this doesn't work, I've got one last thing to check which would be the general VirtualBox Network Preference (Accessible from File >> Preferences >> Network). It could be possible that there is an IP conflict here, causing the network adapter to not start correctly.


Let me know how it goes!

I still get the error after setting the Adapters to what you said. I was trying to work it out last night, and the Virtual Device actually loaded once or twice, but it crashed after it loaded.

Harry James
Harry James
14,780 Points

Ok. In that case, go to the VirtualBox Network Preference (Accessible from File >> Preferences >> Network) and select the Virtualbox Host-Only Ethernet Adapter (It should be the only option). Then, press Space.

Make sure the settings are as follows:

Adapter

  • IPv4 Address: 192.168.56.1
  • IPv4 Network Mask: 255.255.255.0

DHCP Server

  • Enable Server: Checked
  • Server Address: 192.168.56.100
  • Server Mask: 255.255.255.0
  • Lower Address Bound: 192.168.56.101
  • Upper Address Bound: 192.168.56.254

Let me know how this goes!

I typed those exact numbers in, and ran the Virtual Device again, and it was the same; sometimes, I would get the error, sometimes it would load only to crash seconds later. Since no methods seem to be working, I guess I just won't use an emulator; I figured out how to connect my phone to test apps today, and I can use that instead of an emulator.

Thank you for helping!