Windows Phone 8 emulator can't connect to the internet

CodingChick picture CodingChick · Oct 31, 2012 · Viewed 47.3k times · Source

I have Windows 8 installed inside of an emulator, and the new WP8 SDK installed on it. My problem is that the emulator can't connect to the internet. I don't have any proxy, and even disabled the firewall. It still doesn't seem to work though. When I look at the Network Connections sections I can see the new connections the hyper-v manager created for the emulator, and also the automatic bridge created, but even there the network status is "No Internet Connection".

Are there some properties I can manually change in Hyper-V or for the network to make everything work?

Update: I've done everything suggested including create my own switch and delete all others. It still doesn't work however. It doesn't work on cable and not on wifi. Maybe I'm missing something with how to set this up?

Also the WP emulator keeps offering me to connect to the internet every time. It always erases all of the definitions I've set up, replacing it with it's own definitions.

Answer

Earlz picture Earlz · Nov 1, 2012

I think I've finally found the answer, but you're probably not going to like it. It would appear that the phone emulator requires you to have a second network adapter to dedicate to this purpose. Personally, I run Windows 8 in VMWare, and so a second network adapter is free for me.

Anyway, after you get the second network adapter that you can dedicate for the phone emulator(must have internet)

  1. Start from scratch. Go to the Hyper-V manager and delete the emulator along with all of the virtual switches
  2. Start the emulator from Visual Studio; this will recreate it with all default settings(select yes you want to configure it to connect to the internet)
  3. Shut it down
  4. Now, go back to the Hyper-V manager
  5. Delete the snapshot that was just created for the emulator. This will prevent your changes from disappearing
  6. Find the virtual switch for your second network adapter in the Network Adapter settings(under control panel)
  7. Disable TCP/IPv4, 6 and all other services. This prevents your host machine from trying to use the connection. While you're there, get the MAC(Physical) address of this adapter
  8. Find the virtual-switch for your second network adapter under the Hyper-V settings for the emulator
  9. Change the MAC type to static and paste in the MAC address of the adapter
  10. Enable MAC spoofing (not sure if required, but just in case)
  11. Then, find your virtual switch under "Virtual Switch Manager".
  12. Ensure "Allow management operating system to share this network adapter" is unchecked and that all extensions are disabled
  13. Click OK and then start the emulator from Visual Studio!

Basically, it appears that for some odd reason it won't properly work unless the phone has the same MAC address as the network adapter. However, we can't just set it to use the same MAC address because address conflicts are very very bad. So, we need a second adapter that we can dedicate to the Phone emulator. The reason we disable TCP/IP on this adapter is so our host machine doesn't use it and cause these conflicts.

Other things to try:

The emulator keeps randomly breaking for me. I'll list a few other things I messed with this last time that got it to work(not sure if related, so only try these if the steps above aren't working

  • "Reordering" of network adapters for the emulator so that the external virtual switch is at the top (make sure to copy over the MAC address for the internal adapter)
  • Removing unrelated network adapters
  • Restarting your machine after recongiguring virtual switches
  • Praying to your local Microsoft evangilist

Seriously. Everytime I stop phone work for a while and come back, the emulator is always magically broken without me changing anything. No idea how to get it to work "permanently".