设为首页 收藏本站
查看: 931|回复: 0

[经验分享] Windows phone 8 安装在 VMWare上错误的各种解决方案

[复制链接]

尚未签到

发表于 2015-4-5 17:26:19 | 显示全部楼层 |阅读模式
  http://windowsasusual.blogspot.jp/2013/01/how-to-launch-windows-phone-8-emulator.html
  Hardware requirements

First possible pitfall is... your CPU! In short, you passed this step ifyou have Intel i3/i5/i7 processor as they all do Second Level Address Translation (SLAT) capability. Otrherwise, you should check this brilliant wiki for extended description.
OK, let assume you have capable CPU. Let investigate in details what happens if you try to launch WP8 emulator then.
  Where is my virtualization, dude?

While you're trying to first-launch your WP8 hello-world project, the following popup appears:
Windows Phone Emulator
You don't have permission to modify internal Hyper-V network adapter settings required to run the emulator
Click "Retry" to run the emulator in elevated mode.
[Retry] [Close]
  
  Clicking on [Retry] button, emulator window appears saying it launching the OS... and after a couple of minutes, "Generic failure" popup terminates that pity show.
To resolve this, let take a look at VmWare virtualization settings. You can edit virtual machine settings and make sure that "Processor" device has "Virtualize Intel VT-x/EPT or AMD-V/RVI" flag as ticked on. Alternatively, you can manually edit VMX file of your virtual machine image and set this option as true:

vhv.enable = "TRUE"
  Both ways, you have to switch the virtual machine off before, make changes, then start the virtual machine again. Try again to launch your WP8 hello-world project. You see? Same failure, again.
  VmWare hidden treasure

Rumor has it. VmWare Workstation 9, the latest "mature" product of VmWare Inc will let WP8 emulator working as a charm if virtualization flag (see previous chapter) is on. In my case, I have only Player edition, but the same rumor (namely StackOverflow.com, see URL above) says you can manage non-official keys at VMX file, and following addendum will do the trick:
vhv.enable = "TRUE"
hypervisor.cpuid.v0 = "FALSE"
  See the last line? That's it, shaman said you have to set this to false. And it works! The only popup you can face now is
Windows Phone Emulator
Do you want to configure the emulator to connect to the Internet?
Your PC may lose its network connectivity while the changes are applied. This may affect any network operations in progress.
[Yes] [No]
  
  Clicking [Yes] you will see very short delay and then, ta-da, your emulator is fully operational! Shaman said, set this to false. Shaman doesn't explain. Follow the word of Shaman, do you?
  Disobey the word

Feeling some contradiction sense, I tried to flip the non-documented settings to true, expecting the punishment from Heavens. But nothing hasbeen changed! Finally I cropped the cpuid line to empty value:
vhv.enable = "TRUE"
hypervisor.cpuid.v0 = ""
  Again, emulator still working as a charm! Switching off the virtual machine, rebuilding the project - still operational. Just the cpuid key presence is a "key to success" for WP8 emulator. True, false, empty value - everything suits us. Hmmm, that's interesting!
  Failure ahead!

Thanks to the same contradiction sense, I did the following tweak at VMX file:
vhv.enable = "FALSE"
hypervisor.cpuid.v0 = ""
  Namely, I switched off the virtualization support but keep that non-documented cpuid setting active. Restarting the virtual machine, I was expecting the failure. But I was really surprised with new (and veryclear) popup:
Windows Phone Emulator
Can't start the Windows Phone Emulator
The Windows Phone Emulator requires Hyper-V. Your PC is missing the following pre-requisites required to run Hyper-V:  - Second Level Address Translation

  More information
[Close]
  You see? It complains about SLAT support feature, like we don't have capable CPU! But host CPU is Intel i7-930, with SLAT feature onboard. So, with virtualization off AND with cpuid on, guest OS will provide exact error message instead of abstract "lack of permission".
Note: Don't forget to re-enable virtualization support back to operational state!
  Other reasons to fail

To be fair, there are more ways to get WP8 emulator failed to run. Let me name two more (if you know another reason, just post a comment here, big thanks in advance):

  • Insufficient CPU cores
  • Not enough memory
  Reason 1: WP8 as a platform intends at least two CPU cores available.So if you allocate single core for your virtual machine, emulator will fail with following message:
Windows Phone Emulator
The Windows Phone Emulator wasn't able to ensure the virtual machine was running:  Something happened while starting a virtual machine: 'Emulator WVGA 512MB.user' could not initialize. (Virtual machine ID XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
  The processor topology specified for the virtual machine cannot be supported by this host. For instance, this can happen when the virtual processor or socket count for the virtual machine exceeds the logical processor or socket count for the host.
[Close]
  Reason 2 : memory, RAM size. In old good days it was a useful habit to allocate not more than 1 gig of RAM to any virtual machine, otherwiseyour host OS may nearly die. For WP8 development, it's not true anymore. With 1Gb RAM limit, WP8 emulator will unable to get 512Mb of free RAM. Popup message is clear:
Windows Phone Emulator
The Windows Phone Emulator wasn't able to ensure the virtual machine was running:  Something happened while starting a virtual machine: 'Emulator WVGA 512MB.user' could not initialize. (Virtual machine ID XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
  Not enough memory in the system to start the virtual machine Emulator WVGA 512MB.user with ram size 512 megabytes. (Virtual machine ID XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
[Close]
  So, it's nice to allocate at least 1.5Gb RAM for our virtual machine. And even that case, you can't launch WP8 emulators other than simplest 512Mb mode. Bye-bye, WVGA/WXGA/720p emulators, you're too memory-hungry!
  Update: one more issue with Windows Phone 8 emulator is adderssed here: http://www.timmykokke.com/2013/01/windows-phone-emulator-hyper-v-error
  Recap

Despite the two-level virtuality (WP8 emulator is a Hyper-V virtual machine which launched on Win8 guest OS under VmWare running on Win7 host), the toolchain is stable and performs with almost no delays. This contradicts with my previous experience of double-virtualization while launching Meego on Qemu running at Linux guest at Windows host (terribledelays up to 20-30 seconds on each mouse movement).
So, everything is fine. The only requirements are:


    • SLAT-capable CPU (any of Intel i-series, plus some others)
    • virtualization enabled at BIOS level
    • "non-documented" key hypervisor.cpuid.v0 = "" at VMX file
    • virtual machine with enabled virtualization as vhv.enable = "TRUE"
    • at least two CPU cores for the virtual machine
    • at least 1.5Gb RAM for the virtual machine, 4Gb recommended (if you plan to launch any WP8 emulator), which naturally leads to 64-bit host OS, with at least 8Gb RAM onboard


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-54093-1-1.html 上篇帖子: Vmware DiskMount 挂载vmdk文件 下篇帖子: vmware上安装Linux(Slackware10.2)详细步骤
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表