简体   繁体   English

无法启动Windows Phone模拟器

[英]Unable to Launch Windows Phone Emulator

I am trying to run unit tests on our CI server. 我正在尝试在CI服务器上运行单元测试。 When i run the following command it tries to launch emulator but fails with the following message 当我运行以下命令时,它尝试启动模拟器,但失败并显示以下消息

vstest.console.exe myxapfile.xap

Error Message 错误信息

The Windows Phone Emulator wasn't able to ensure the virtual machine was running:

Something happened while starting a virtual machine: 'Emulator WVGA 512MB.ttmaltiparmak' failed to start. (Virtual machine ID 1350ADCE-CC35-4615-BFD5-250179F789EE)

The Virtual Machine Management Service failed to start the virtual machine 'Emulator WVGA
512MB.ttmaltiparmak' because one of the Hyper-V components is not running (Virtual machine ID
1350ADCE-CC35-4615-BFD5-250179F789EE).

My system seems to support following requirements (But it is a virtual machine is it a problem?) 我的系统似乎支持以下要求(但它是一个虚拟机是一个问题?)

  • 64 bit windows 8 64位窗口8
  • SLAT Support SLAT支持
  • 4 GB ram 4 GB内存
  • Hyper-V is on Hyper-V已开启

Further trials and results: 进一步的试验和结果:

I tried removing and re-adding hyper-v through add-remove programs and now Hyper-V Platform option is disabled and i can not activate it :S Gilson Banin says that hyper-v installation is not possible on virtual machines, as i mentioned before our server is a virtual machine is it right that i cant use hyper-v on a virtual machine? 我尝试通过添加删除程序删除并重新添加hyper-v,现在Hyper-V平台选项被禁用,我无法激活它:S Gilson Banin说虚拟机上不能进行hyper-v安装,正如我所提到的在我们的服务器是虚拟机之前,我不能在虚拟机上使用hyper-v吗?

http://blogs.technet.com/b/gbanin/archive/2013/06/26/how-to-install-hyper-v-on-a-virtual-machine-in-hyper-v.aspx http://blogs.technet.com/b/gbanin/archive/2013/06/26/how-to-install-hyper-v-on-a-virtual-machine-in-hyper-v.aspx

在此输入图像描述

The answer given on MSDN : http://social.msdn.microsoft.com/Forums/wpapps/en-US/083c8964-071f-469a-8740-2412a69092fc/unable-to-launch-windows-phone-emulator?forum=wptools 在MSDN上给出的答案http//social.msdn.microsoft.com/Forums/wpapps/en-US/083c8964-071f-469a-8740-2412a69092fc/unable-to-launch-windows-phone-emulator? forum = wptools

I had the same problem. 我有同样的问题。 This fixed it. 这解决了它。

Shut down the VM, select option “Virtualize Intel VT-x/EPT or ARM-V/RVI” in the vm processor settings. 关闭VM,在vm处理器设置中选择“Virtualize Intel VT-x / EPT或ARM-V / RVI”选项。

Then add these two lines to the end of the vmx-file: 然后将这两行添加到vmx文件的末尾:

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

Start the VM, add the Hyper-V components and restart the vm. 启动VM,添加Hyper-V组件并重新启动虚拟机。 Next time you start the emulator, Visual Studio will configure Hyper-V and run the emulator 下次启动模拟器时,Visual Studio将配置Hyper-V并运行模拟器

Ok, I've successfully fixed this issue. 好的,我已经成功解决了这个问题。 But I've my particular scenario, so I don't know if it can solve for you too. 但我有我的特殊情况,所以我不知道它是否也可以为你解决。 My scenario is as follow: 我的方案如下:

  1. I'm developing for Windows Phone 8, using a iMac 10.9.1 OSX; 我正在使用iMac 10.9.1 OSX为Windows Phone 8开发;
  2. I'm using the VMWare Fusion 6, with Windows 8.1 imported through bootcamp; 我正在使用VMWare Fusion 6,通过bootcamp导入Windows 8.1;
  3. I'm using Visual Studio 2013 Ultimate, running the emulator from it; 我正在使用Visual Studio 2013 Ultimate,从中运行模拟器;
  4. I was receiving that error in every manner that I used to launch the Windows Phone Emulator. 我用以启动Windows Phone模拟器的各种方式收到了该错误。

To fix the issue: 要解决此问题:

  1. You must use Hyper-V (VM Settings -> Processors & Memory -> Advanced options -> [Enable hypervisor applications in this virtual machine] must be checked), only changeable with VMWare turned off; 您必须使用Hyper-V(VM设置 - >处理器和内存 - >高级选项 - > [在此虚拟机中启用虚拟机监控程序应用程序]必须选中),仅在VMWare关闭时才能更改;
  2. To use Hyper-V, your VMWare must have at least 2 processors. 要使用Hyper-V,VMWare必须至少具有2个处理器。 It can be set with VMWare turned off in the same window of item 1; 可以在项目1的同一窗口中关闭VMWare进行设置;
  3. In VM Settings -> Advanced -> Preferred virtualization engine, select Intel VT-x with EPT; 在VM Settings - > Advanced - > Preferred virtualization engine中,选择带有EPT的Intel VT-x;
  4. Open the directory where you VMWare image is located, and open it with [option] button holded. 打开VMWare映像所在的目录,然后使用[option]按钮打开它。 Click in [Show Package Contents] and locate the .vmx file. 单击[显示包内容]并找到.vmx文件。 Open this file with a text editor and put/modify these lines: 使用文本编辑器打开此文件并放置/修改这些行:
    • hypervisor.cpuid.v0 = "FALSE"
    • mce.enable = "TRUE"
    • vhv.enable = "TRUE"
  5. I've followed these references: 我遵循了这些参考:

I hope that it helps you too! 我希望它也能帮到你!

After enabling support for VTx in your BIOS, you might want to check your system by running the Codeinfo tool. 在BIOS中启用对VTx的支持后,您可能希望通过运行Codeinfo工具来检查系统。

Also, don't forget to enable "Hyper-V Management Tools" and "Hyper-V Platform" on "Control Panel->Programs and Features->Turn Windows Features on of off->Hyper-V": 另外,不要忘记在“控制面板 - >程序和功能 - >打开关闭 - > Hyper-V的Windows功能”上启用“Hyper-V管理工具”和“Hyper-V平台”:

I am running Windows 8 64 bit inside VMware player on top of a windows 7 machine. 我在Windows 7机器顶部的VMware播放器中运行Windows 8 64位。 Also had problems running the emulator from windows phone 8, and solved them by following this guide: http://developer.nokia.com/Community/Wiki/Windows_Phone_8_SDK_on_a_Virtual_Machine_with_Working_Emulator 从Windows Phone 8运行模拟器也遇到问题,并按照本指南解决了这些问题: http//developer.nokia.com/Community/Wiki/Windows_Phone_8_SDK_on_a_Virtual_Machine_with_Working_Emulator

Hope it helps... 希望能帮助到你...

You have not installed Hyper-V properly. 您尚未正确安装Hyper-V。 "Hyper-V platform" should be installed for the service to run. 应安装“Hyper-V平台”以使服务运行。 Normally VM's have a " hypervisor " running by default and Hyper-V requires this hypervisor to run itself. 通常情况下,VM默认运行“ hypervisor ”,Hyper-V要求此虚拟机管理程序自行运行。

So first disable the hypervisor of the VM by altering the "vmx"(in case its vmware) file of your virtual machine(BACK UP THE FILE BEFORE MAKING CHANGES!) 因此,首先通过更改虚拟机的“vmx”(如果是vmware)文件来禁用 VM 的虚拟机管理程序 (在更改之前备份文件!)

off your VM 关闭你的VM

locate the .vmx file 找到.vmx文件

If you cant fiond the vmx file read this article - http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003880 如果您不知道vmx文件,请阅读本文 - http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003880

open it with notepad and add this line at the end(or anywhere actually) 用记事本打开它并在最后(或实际上任何地方)添加此行

hypervisor.cpuid.v0 = "FALSE" hypervisor.cpuid.v0 =“FALSE”

If you cant find the vmx file read this article http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003880 如果您无法找到vmx文件,请阅读本文http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003880

Now you will be able to install the "Hyper-V platform" in windows "turn windows features on or off", do that. 现在,您将能够在Windows中“打开或关闭Windows功能”安装“Hyper-V平台”,这样做。

restart 重新开始

Try deploying to WP Now! 尝试部署到WP Now! If it is still not working please comment the error you get! 如果它仍然无法正常工作,请评论您得到的错误!

Select the Emulator VM you are going to use in Windows 8 Phone development (default one is “Emulator WVGA 512MB”). 选择要在Windows 8 Phone开发中使用的仿真器VM(默认为“Emulator WVGA 512MB”)。 Go to the Hyper-V VM settings and change the number of processors from 2 to 1 . 转到Hyper-V VM设置并将处理器数量2更改为1 Press Apply and than OK in order to apply new settings. 按应用而不是确定以应用新设置。

If on a Mac or virtual machine .. 如果在Mac或虚拟机上..

Or try to see the other solutions in this link: 或者尝试在此链接中查看其他解决方案:

Running Windows 8 Phone emulator in the Windows 8 virtual machine Problem 在Windows 8虚拟机中运行Windows 8 Phone模拟器问题

I really hope this link link can help you a less ;-) 我真的希望这个链接可以帮助你少一点;-)

Just copy your vhd and other files from the vhd location to another folder. 只需将您的vhd和其他文件从vhd位置复制到另一个文件夹即可。 Just create another a new VM with the VHD which you just copied. 只需使用您刚刚复制的VHD创建另一个新VM。 Now it will start. 现在它将开始。

I had a situation where I had installed an azure component which preceded the current Visual Studio quarterly update and caused the emulator to die. 我有一种情况,我在当前的Visual Studio季度更新之前安装了一个azure组件,导致模拟器死亡。

I recommend that you re-install/fix the current Visual Studio Update. 我建议您重新安装/修复当前的Visual Studio更新。 Reboot and try again. 重新启动并重试。

Make sure you select the option “Virtualize Intel VT-x/EPT or ARM-V/RVI”. 确保选择“Virtualize Intel VT-x / EPT或ARM-V / RVI”选项。 This is required to be able to run HYPER-V on your virtual machine. 这需要能够在您的虚拟机上运行HYPER-V。

Just open Hyper-V manager and delete all connections. 只需打开Hyper-V管理器并删除所有连接。 Then try again. 然后再试一次。 This solution worked on my PC. 这个解决方案适用于我的电脑。

Add these two lines to the end of the vmx-file: 将这两行添加到vmx文件的末尾:

hypervisor.cpuid.v0 = "FALSE" mce.enable = "TRUE" hypervisor.cpuid.v0 =“FALSE”mce.enable =“TRUE”

右键单击计算机 - >单击属性 - >左侧查找“ 高级系统属性 ”并单击它单击“ 高级 ”选项卡 - >单击“ 性能设置 ”按钮 - >单击“ 高级 ”选项卡 - >在“ 虚拟内存 ”部分中单击“ 更改.. ” - >“ 未选中”自动管理所有驱动器的页面文件大小 - >单击“单选单自定义大小” - >“手动设置值” - 最小[4096],最大值[8192]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM