39

I was so happy today that I have been finally able to install Windows Phone 8 SDK and try it a bit. I installed fresh new installation of Windows 8 Pro into my virtual machine (I am running if from Parallels) and then installed Windows Phone 8 SDK.

Everything went smooth, Visual Studio Express is installed and running, but when I created new project and tried to deploy it, VS fails with really weird message.

First of all, message box informing that "The Windows Phone Emulator wasn't able to create the virtual machine: Generic failure" appears. Really informing, really professional - generic error, that's really good. Then the information that deployment failed appears (thanks a lot for keeping me informed about that, I didn't noticed that it crashed completely). And then in the Error List, there is an information about "Invalid pointer" - even better. No clue at all about what failed or what's wrong.

Can anybody help me with that? There is nothing on the internet about this topic so far and I don't know where the problem is. I scanned the Windows events and logs, but there is nothing (probably I haven't been searching properly, so please guide me through that if you can).

Anybody can help?

10
  • 5
    I'm seeing the same thing running it inside of VMWare.
    – jarjar
    Commented Oct 30, 2012 at 23:15
  • 2
    The Windows Phone 8 Emulator is a Hyper-V instance on it's own, so running it inside another virtual machine is bound to result in problems. Commented Oct 30, 2012 at 23:25
  • Anyone tried running via Bootcamp? Commented Oct 30, 2012 at 23:47
  • In VMWare Fusion I tried "Enable hypervisor applications in the virtual machine" and that didn't work either Commented Oct 30, 2012 at 23:57
  • 1
    I first switched to VMWare but finally develop Windows8 and WP8 on Parallels and use real device (Lumia 920) during phone development. From time to time I use the emulator on VMWare ... just wanted to add info that there are no issues with real devices for WP8 on Parallels. Commented Nov 15, 2012 at 7:50

13 Answers 13

26

The Windows Phone 8 emulator requires hardware Hyper-V support. In particular, it requires second-level address translation, hardware assisted virtualization, and hardware DEP support enabled and to not be ran in a hypervisor(no nesting). If you bought your machine within the past 4 years you should have no problem with these requirements. You can check out this article to see more information about that and how to find if your PC supports it.

Because of these hardware requirements, this means you can't run the phone emulator inside of most virtualization technologies... With one exception: I've been using VMWare 9 which appears to include an "unsupported" feature to allow Hyper-V to work though.. So your only choice for running the phone emulator is to either buy VMWare 9 (or 8 with more configuration) or upgrade a physical machine to Windows 8

The unsupported way VMWare allows you to run Hyper-V inside of a VM is that there is a manual option (hypervisor.cpuid.v0 = “FALSE”) which basically tells VMWare not to report to the virtual machine that it's running in a VM. Hyper-V checks if it's running in a VM and won't work if it is, so this gets Hyper-V to work past that check. I personally have tested this whole nested-VM thing with the Phone emulator(including before public release), and other than being quite slow, it does work pretty well with no immediate crashes or anything.

There is a workaround for VMWare Workstation 8 as well in an answer below. However, 9 is much easier to configure, so if you have it use this method.

6
  • I tried everything but without success. I installed VMWare Fusion, enabled VT-x/EPT in the CPU settings, I even modified the vmx file adding the hypervisor.cpuid.v0 = “FALSE” directive but epic fail again, same problem occured. CoreInfo tells me that I have everything I need, Hyper-V is installed and management console is accessible and does not complain at all. Still nothing works. Anybody has it working with pure vanilla (non-release-candidate) Windows 8 and released WP8 SDK? Commented Oct 31, 2012 at 20:56
  • 2
    I must apologise. I terminated the VmWare Fusion and added the directive in the vmx file (it's been overwritten since the VM was running). After restart, WP8 emulator is running. So it's possible using this solution on Mac OS under newest VMWare Fusion (version 5). Thanks a lot. Commented Oct 31, 2012 at 21:04
  • I needed to add vhv.enable = "true" too. After this I was able to enable Hyper-V and the emulator is started...and broke :/
    – boj
    Commented Nov 1, 2012 at 0:19
  • @boj I didn't have to do vhc.enable. although, I'm only working with VMWare Workstation, not VMWare Fusion. Not sure if there is a difference
    – Earlz
    Commented Nov 1, 2012 at 1:52
  • 1
    @Earlz so does this mean it's completely impossible to debug apps on my macbook pro running visual studio on parallels?
    – GR7
    Commented Feb 20, 2013 at 5:11
7

I ran into the same issue and I fixed it by enabling Hypervisor applications in this virtual machine and adding the following line to the .vmx file:

hypervisor.cpuid.v0 = "FALSE"

This got the emulator working just fine. I found this answer here.

Hope this helps.

5
  • Oh!, I am getting this error now shareourideas.com/wp-content/uploads/2012/10/… Commented Oct 31, 2012 at 17:49
  • Don't suppose this setting works in VMWare Fusion 5? communities.vmware.com/message/2094037?tstart=0
    – Shazron
    Commented Oct 31, 2012 at 18:29
  • @NagaHarishMovva I ran into that exact issue. I can't remember how I fixed this though. Try going into the Hyper-V manager and poking around
    – Earlz
    Commented Oct 31, 2012 at 19:20
  • I talked with one of my coworkers and this answer(well, the linked article at least) should work with VMWare Workstation 8. It's much more of a pain to do than with 9 though
    – Earlz
    Commented Nov 1, 2012 at 1:54
  • Further to my comment - I added the line to my .vmx in VMWare Fusion 5, and in my vm's settings, set it to 2 cores (and 2048 MB RAM), in "Processors and Memory" -> Advanced Options, I checked the "Enable hypervisor applications in this virtual machine". It ran the Windows Phone 8 Emulator fine, and is pretty speedy. My system is OS X 10.8.2 on a 15" Retina MacBook Pro. Note that amount of RAM is only for the 512MB WVGA emulator -- if you want to run the others, you need to bump up the RAM to probably 4 gigs.
    – Shazron
    Commented Nov 1, 2012 at 20:46
5

Actually, it works quite nicely with VMware Fusion 5.0.1

All I had to do is to add to the .vmx file of the virtual machine the following lines:

hypervisor.cpuid.v0 = “FALSE” vhv.enable = "true"

Save and restart VMWARE (obviously the VM must be stopped before the changes are made)

I'm right now debugging a test app from VS2012 using the emaulator inside a VM in my Macbook

I'm a happy camper

:-)

1
  • Thanks for you help ! It just works ! Just note you need to have more than only one processor for your VM. In my case with 2 processors for the VM it perfectly works :-)
    – Arkan
    Commented Nov 1, 2012 at 15:30
2

I posted the same question on Parallels forum.

Reply:

The emulator is actually a virtual machine, so we are talking about a vm inside a vm, this requires support for nested Hyper-V, which afaik is planned but not implemented yet, also VMWare Fusion already supports this, if you are so desperate.

————-

See Parallels forum post: http://forum.parallels.com/showthread.php?p=646448#post646448

0
2

This works for me

Set RAM to 4g Set at least 2 cores

add to vmx file.

vhv.enable = "TRUE"

hypervisor.cpuid.v0="FALSE"

Goot article http://social.msdn.microsoft.com/Forums/en-US/wptools/thread/ed72010c-321c-4667-97b2-3ff1540e7f87/

1

You need SLAT compatible hardware to run Hyper-V, which is a requirement for using the emulator.

Can you clarify what kind of hardware you're attempting to run this on, and if you have enabled Virtualization in your BIOS settings?

The "Invalid pointer" error just means it cannot connect to the emulator (and/or device).

5
  • 1
    I have SLAT compatible hardware and the virtualization is enabled in BIOS. Still the same error.
    – Igor Ralic
    Commented Oct 30, 2012 at 23:38
  • same here. no chance to install it. Commented Oct 31, 2012 at 1:37
  • I have SLAT compatible hardware. This is the result from core info Coreinfo v3.1 - Dump information on system CPU and memory topology Copyright (C) 2008-2012 Mark Russinovich Sysinternals - www.sysinternals.com Note: Coreinfo must be executed on a system without a hypervisor running for accurate results. Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz Intel64 Family 6 Model 42 Stepping 7, GenuineIntel HYPERVISOR * Hypervisor is present VMX - Supports Intel hardware-assisted virtualization EPT - Supports Intel extended page tables (SLAT) Commented Oct 31, 2012 at 7:28
  • Oh, I see now that I don't. I misinterpreted the output thinking that when the information is present, i automatically have that support. Thanks. Commented Oct 31, 2012 at 8:34
  • @MartinMacak you may want to look at my answer. VMWare 9 has an option to "hide" that the VM is within a hypervisor
    – Earlz
    Commented Oct 31, 2012 at 17:47
1

Just as an addition to https://stackoverflow.com/a/13163762/1964969 (top answer at the moment): manually appending "hypervisor.cpuid.v0" key works for VmWare Player 5 as well (the main reason - this software is free for non-commercial use so it's perfect product if you test the waters, just download from VmWare website and install, it's fully-functional).

Slightly unexpected, any of the following amends solve the problem with WP8 emulator:

hypervisor.cpuid.v0="FALSE"
hypervisor.cpuid.v0="TRUE"
hypervisor.cpuid.v0=""

Yeah, you can apply empty value for that key - but why? Have no idea but it works. I did some notes in my blog as well: http://windowsasusual.blogspot.ru/2013/01/how-to-launch-windows-phone-8-emulator.html

1
  • Your answer the best! Found everything to make it work in provided link Commented Apr 10, 2013 at 11:28
1

Under Parallels Desktop 8 follow this guide: http://kb.parallels.com/en/115211

0

Edit: Oh, I didn't noticed that you are trying to run emulator on VM. My answer is for non-VM environment.


First of all, you need to check hardware requirement at here

Be careful, successful installation of SDK does not guarantee "your hardware is compatible" If your hardware is compatible and Hyper-V is running(described in the link above), please check your BIOS and be sure to enable hardware virtualization in CPU Configuration

(for me, I could find it at Booting > BIOS > Advanced > Advanced > CPU Configuration)

Brief summary:

  • 64bit CPU and OS
  • 4GB RAM
  • Hardware-assisted virtualization supported CPU
  • Second Level Address Translation (SLAT) supported hardware
  • Hardware-based Data Execution Prevention (DEP) supported hardware
  • Proper BIOS settings
0

For me the solution adding line:

hypervisor.cpuid.v0 = "FALSE"

I use VMware Player and added the line (hypervisor.cpuid.v0 = "FALSE")in the .vmx file. My virtual machine with Windows 8 Pro runs the emulator for Windows Phone 8 perfectly.

0

Solved the problem by uninstalling an older VPN client from the machine. It turns out some VPN clients might have compatibility issues with Windows 8. After uninstalling VPN client I was able to run the emulator without issues (of course after making sure Hyper-V was installed and enabled on the machine)

0

Not enough rep. to comment on the accepted answer, but Microsoft provide instructions specifically for Fusion here. It worked for me, after a couple of reboots of both Mac and VM. I installed W8.1 without Hyper-V support initially and had to install it after the fact ("Turn Windows Features On or Off" in Control Panel), but apart from that no problems. Quite speedy on a 16Gb 2013 MBP.

0

I ran into the same issue and I fixed it by enabling Hypervisor applications in this virtual machine and adding the following line to the .vmx file:

hypervisor.cpuid.v0 = "FALSE"

This got the emulator working just fine. I found this answer here.

Hope this helps.

Not the answer you're looking for? Browse other questions tagged or ask your own question.