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:
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:
- Does your hardware support virtualization? Have you enabled it in BIOS?
- Does your hardware support SLAT (Second Level Address Translation)? You can check that one by following the tutorial here: http://www.petri.co.il/check-cpu-slat-support.htm
- 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: http://www.howtogeek.com/76532/how-to-install-or-enable-hyper-v-virtualization-in-windows-8/
- Are you running Windows 8 64-bit (x64) client version? Needs to be 64bit.
- Are you running Windows 8 Pro edition or greater?
- 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.
- 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)
- 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: http://www.veeam.com/blog/nesting-hyper-v-with-vmware-workstation-8-and-esxi-5.html
Number 6 worked for me. I got the nice emulator up and running. :)