There I am, all happy and excited about the latest Windows Phone 8 SDK released today. And so I downloaded it and installed it. I opened Visual Studio 2012, created a new template project, tried to run it in emulator and… error occurred. What? Windows Phone 8 emulator wasn’t able to create the virtual machine? Here are some of the steps that helped people online and myself to get it fixed.

So, the Windows Phone 8 emulator error looks like this:

Windows Phone 8 emulator wasn't able to create the virtual machine error

After you click OK, you get something called “Invalid pointer error” which is because the emulator didn’t open. My error said:

The Windows Phone Emulator wasn’t able to create the virtual machine: Something happened while creating a switch: Xde couldn’t find an IPv4 address for the host machine.

Some people get more generic error:

The Windows Phone Emulator wasn’t able to create the virtual machine: Generic failure

What to do when Windows Phone 8 emulator error occurs?

The steps you can take and things you can check are the following:

  1. Does your hardware support virtualization? Have you enabled it in BIOS?
  2. Does your hardware support SLAT (Second Level Address Translation)? You can check that one by following the tutorial here:
  3. Have you installed Hyper-V? (even if you haven’t, the Visual Studio 2012 will probably prompt you to do so) If not, here’s how:
  4. Are you running Windows 8 64-bit (x64) client version? Needs to be 64bit.
  5. Are you running Windows 8 Pro edition or greater?
  6. Do you have any kind of other networking/virtualization software installed (VirtualBox, VPN software)? If you do, you might have to remove it to get the emulator to work.
  7. Have you tried clearing the existing switches from Hyper-V manager and creating a new one? (XdeCleanup.exe is located in C:Program Files (x86)Microsoft XDE8.0)
  8. Have you virtualized your Windows 8 installation? Virtualizing emulator inside virtualized OS… Not sure how that one would look… EDIT: Seems like people have done it! Running the emulator in Windows 8 that’s virtualized in VMWare on Windows 7. See here for details:

Number 6 worked for me. I got the nice emulator up and running. :)