WP8 Emulator Possible Issues and Hyper-V
The Windows Phone 8 Emulator operates as a Hyper-V virtual machine on top of windows, and as a result requires Windows 8 Pro with at least 4 GB of RAM and a SLAT enabled CPU. If you have a machine which does not support SLAT, you can still use the SDK to develop Windows Phone 8 apps, but you’ll only be able to test them on an actual device.
Does My Machine Support SLAT?
Checking if your machine supports SLAT is pretty easy:
- Download and extract Sysinternals’ “Coreinfo” utility.
- Run command prompt as an administrator.
- Navigate to the path where you placed Coreinfo and execute the command “coreinfo –v”.
If you have an asterisk (“*”) next to EPT (Intel) or NPT (AMD) then you are good to go. If you don’t have it and you see the below, then you’re out of luck and can’t run WP8 emulator on this machine:
Note: CoreInfo can sometimes give wrong info. If you’ve already got Hyper-V running, it may erroneously return a “false negative” on the slat capabilities. Therefore, CoreInfo must be executed on a system without a hypervisor running for accurate results”. As for the SLATStatusCheck returns the correct results regardless of whether Hyper-V is running or not.
Enable Hyper-V on Windows
If Hyper-V is not enabled, the following dialog box appears.
Click Turn on Hyper-V to open the Windows Features dialog box in Control Panel.
- In Control Panel, click Programs, and then click Turn Windows features on or off.
- In the Windows Features dialog box, click Hyper-V. The list of options expands.
- In the expanded list of options, select at least the Hyper-V Platform check box, and then click OK.
Join Hyper-V Administration Group
When you run the emulator, if you are not already a member of the Hyper-V Administrators group, you are prompted to join the group and the below message appears. Joining the group requires administrator rights. After you join the group, you have to log off or reboot for the change to take effect.
If you are the local administrator on the computer when you install the SDK, the setup program for the SDK adds you to the Hyper-V Administrators group. Otherwise you may have to enable this requirement manually.
To add yourself to a group manually, open the file located at \programdata\Microsoft\Windows\Hyper-V\InitialStore.xml on the system partition. To edit this file you will need to:
- Open the Run dialog (launch it from the Start menu or press Windows Key + R).
- Start mmc.exe
- Open the File menu and select Add/Remove Snap-in...
- From the Available snap-ins list select Authorization Manager.
- Click Add > and then click OK.
- Click on the new Authorization Manager node in the left panel.
- Open the Action menu and select Open Authorization Store...
- Choose XML file for the Select the authorization store type: option and then use the Browse... to open \programdata\Microsoft\Windows\Hyper-V\InitialStore.xml on the system partition (programdata is a hidden directory so you will need to type it in first).
- Click OK.
- Expand InitialStore.xml then Microsoft Hyper-V services then Role Assignments and finally select Administrator.
- Open the Action menu and select Assign Users and Groups then From Windows and Active Directory...
- Enter the name of the user that you want to be able to control Hyper-V and click OK.
- Close the MMC window (you can save or discard your changes to Console 1 - this does not affect the authorization manager changes that you just made).
And now you are done. The user that you added will be able to completely control Hyper-V even if they are not an administrator on the physical computer.
Emulator Network Connection
Final Tip: if your emulator is failing to see the pc network connection, then first uncheck any proxy that you might be using and try again. If it works, then it is because of the proxy the emulator was not able to see the network connection. If not, then you will have to do the following:
- Start from scratch. Go to the Hyper-V manager and delete the emulator along with all of the virtual switches
- 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)
- Shut it down
- Now, go back to the Hyper-V manager
- Delete the snapshot that was just created for the emulator. This will prevent your changes from disappearing
- Find the virtual switch for your second network adapter in the Network Adapter settings(under control panel)
- Disable TCP/IPv4 and 6. This prevents your host machine from trying to use the connection. While you're there, get the MAC(Physical) address of this adapter
- Find the virtual-switch for your second network adapter under the Hyper-V settings for the emulator
- Change the MAC type to static and paste in the MAC address of the adapter
- Enable MAC spoofing (not sure if required, but just in case)
- Click OK and then start the emulator from Visual Studio!
Hopefully this gives you an idea of some of the system requirements and possible errors that you might be facing to get the WP8 SDK up and running. Can’t wait to see some of the great apps you folks are working on!
Comments
- Anonymous
February 25, 2013
I followed your steps and it is very nice. I like :) - Anonymous
February 25, 2013
Thxs Kimi appreciated, and glad it helps you out - Anonymous
February 25, 2013
May u post a blog for push notifications?