0

Android emulators cannot connect to internet when using WiFi on host computer. The host is a Macbook pro and the development environment is Visual Studio 2015 running inside a Windows 10 VM using Parallels. When I connect an ethernet cable to the Macbook the Android emulator can connect to the internet and load websites, but when using WiFi on the host it cannot connect. Has anyone else had this issue?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
DotNetDev
  • 25
  • 7
  • Strictly speaking this isn't supported by the Visual Studio Android Emulator (https://msdn.microsoft.com/en-us/library/mt228280.aspx#BootableVHD). You could try running the Google AVD on the Mac and connect to that from the VM using this method: http://stackoverflow.com/a/1931633/4023569 – Alan Clark Nov 07 '16 at 18:19
  • Helpful, thank you. – DotNetDev Nov 14 '16 at 14:19

3 Answers3

0

Check network adapters in virtual machine. You probably have some from Oracle Virtual box or other

Yuri S
  • 5,355
  • 1
  • 15
  • 23
  • Already removed Oracle Virtual Box from the Windows 10 VM as well as deleted all network adapters and Virtual Switches. After doing this I re-created the emulators but still cannot connect to the internet from within the Android emulator while using WiFi on the Mac. – DotNetDev Nov 07 '16 at 22:31
  • when you remove them and run emulator they come back next time you start VM. I actually had to uninstall Oracle box. But may be Alan is right and it is not suppose to work – Yuri S Nov 08 '16 at 00:58
0

I put this to work in a nested virtualization environment, but my host is a Windows Server 2016 machine:

Physical machine (WinServer2016) -> VM (WinServer2016) -> VS Emulator for Android

I had to execute the following command in my host:

Set-VMNetworkAdapter -VMName $vmName -MacAddressSpoofing on

I think that if you enable MAC address spoofing on your Macbook pro this will work.

Rosberg Linhares
  • 3,537
  • 1
  • 32
  • 35
  • Thank you Rosberg....in fact my issue ended up being WIFI. The emulators won't connect to the internet if the host Macbook is using WIFI. When I connect via LAN adapter the emulators are able to access the web. – DotNetDev Apr 25 '17 at 20:35
0

The issue was with Wifi. If the Mac host was connected to the internet via Wifi then the emulators running inside of the Windows VM could not access the internet. Once I switched to LAN connection the emulators were able to connect to the web.

DotNetDev
  • 25
  • 7