Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to create the virtual machine

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?

like image 437
Martin Macak Avatar asked Oct 30 '12 22:10

Martin Macak


People also ask

Why virtual machine is not working?

One of the most common causes for a virtual machine to become unresponsive is that the hard drive has run out of space. Without sufficient space for logging and IO, the virtual machine may be unable to continue to function. For more information, see Investigating operating system disk space (1004007).

Why is Java Virtual Machine not working?

The Java Virtual Machine error often arises when Java needs a larger global maximum heap memory size. Users have fixed the issue by expanding the maximum RAM allocated to Java. Users can do that by establishing a new Java System Variable as described above.


2 Answers

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.

like image 52
Earlz Avatar answered Oct 11 '22 09:10

Earlz


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.

like image 31
Nick Cipollina Avatar answered Oct 11 '22 08:10

Nick Cipollina