Phone Emulator + Containers + VMs + Networking == Finally working!

I have had a problem for a little while now – the problem is that on my personal laptop I want to use:

  • Visual Studio with the Windows Phone Emulator
  • The Hololens emulator
  • Windows Containers
  • Linux Containers (through Docker for Windows)
  • My virtual machines

However, all of these solutions keep on tripping over each other.  Specifically, they keep on tripping over each other when it comes to networking configuration.  I have spent the last couple of months complaining to the various teams involved in this – and I finally have it all working!  Yay!

There were three key things that came together to make this all work:

  1. Improved guidance around Container and VM networking

    The networking team has been doing a great job of updating the NAT and Container networking documentation.  If you read these documents a couple of months ago – I would highly recommend you revisit them as there is a ton of new information in there.

  2. New installation experience for Windows Containers on Windows 10

    Another thing that has changed in the last couple months is the process for getting Windows Containers up and running on Windows 10.  Specifically – we now utilize Docker for Windows to get you up and running.  Not only does this make it much easier to get things setup – it means you get very clear error messages when things go wrong.  In my case – I received this handy error message:

    NAT Error

  3. Learning about XDECleanup

    It turns out that my problem was that I had a stale network configuration from the Windows Phone emulator.  Handily, the Windows Phone Emulator team ship a tool to help out here – XDECleanup.  If you open an administrative command prompt and run “C:\Program Files (x86)\Microsoft XDE\<version>\XdeCleanup.exe” – it will delete and recreate all networking associated with the Windows Phone Emulator.

For me – updating my container setup to use Docker for Windows combined with running XDECleanup finally got me to a world where all my virtualization based development tools happily work side by side.

Cheers,
Ben