×
Namespaces

Variants
Actions
(Difference between revisions)

Windows Phone 8 SDK on a Virtual Machine with Working Emulator

From Nokia Developer Wiki
Jump to: navigation, search
joaocardoso (Talk | contribs)
(Joaocardoso - - What will you need)
hamishwillee (Talk | contribs)
m (Hamishwillee - Tidy english)
 
(47 intermediate revisions by 9 users not shown)
Line 1: Line 1:
[[Category:Draft]]
+
[[Category:Tools for Windows Phone‎]][[Category:Emulator for Windows Phone‎]][[Category:SDK]][[Category:Windows Phone 8]][[Category:Tutorial]]
{{Abstract|This article explains how to create a Windows 8 Virtual Machine and Install Windows Phone 8 SDK, and enable HYPER-V and the Windows Phone 8 emulator }}
+
{{FeaturedArticle|timestamp=20130106}}
 
+
{{Abstract|This article explains how to create a Windows 8 Virtual Machine using VMWare software and install the Windows Phone 8 SDK on Windows 8 running on Virtual Machine. It also explains how to enable [http://en.wikipedia.org/wiki/Hyper-V Hyper-V] and Windows Phone 8 emulator. }}
{{Note|This is a community entry in the [[Windows Phone 8 Wiki Competition 2012Q4]]}}.
+
{{Note|This article was a winner in the [[Windows Phone 8 Wiki Competition 2012Q4]].}}
 
{{ArticleMetaData <!-- v1.2 -->
 
{{ArticleMetaData <!-- v1.2 -->
 
|sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] -->
 
|sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] -->
Line 8: Line 8:
 
|devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') -->
 
|devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') -->
 
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Qt SDK 1.1.4]) -->
 
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Qt SDK 1.1.4]) -->
|platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later -->
+
|platform= Windows Phone 8 and later
 
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) -->
 
|devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) -->
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->  
+
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
|signing=<!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
+
|signing= <!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer -->
 
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
 
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
 
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 
|translated-by= <!-- [[User:XXXX]] -->
 
|translated-by= <!-- [[User:XXXX]] -->
|translated-from-title= <!-- Title only -->  
+
|translated-from-title= <!-- Title only -->
 
|translated-from-id= <!-- Id of translated revision -->
 
|translated-from-id= <!-- Id of translated revision -->
|review-by=<!-- After re-review: [[User:username]] -->
+
|review-by= <!-- After re-review: [[User:username]] -->
 
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 
|update-by= <!-- After significant update: [[User:username]]-->
 
|update-by= <!-- After significant update: [[User:username]]-->
 
|update-timestamp= <!-- After significant update: YYYYMMDD -->
 
|update-timestamp= <!-- After significant update: YYYYMMDD -->
|creationdate= <!-- Format YYYYMMDD -->
+
|creationdate= 20121003 <!-- Format YYYYMMDD -->
 
|author= [[User:joaocardoso]]
 
|author= [[User:joaocardoso]]
 
}}
 
}}
  
 
== Introduction ==
 
== Introduction ==
When Microsoft released Windows Phone 8 SDK it caught some people by surprise, including me, by requiring Windows 8 Pro and Hyper-V capable machine. If you as I can’t upgrade just yet your Windows 7 or earlier to a Windows 8 Pro edition, but you do have the necessary Hardware, then this guide will show you how to do just that, using VMWare Workstation Trial and Windows 8 Enterprise Developer Evaluation. This of course also works if you have VMWare Workstation licensed and Windows 8 Pro or Enterprise license.
 
<br />
 
== What will you need ==
 
* 64 bits host operation system (This article was done with a Windows 7 64 bits)
 
* Strongly recommend at least 8GB of RAM for the host machine so you can assign 4GB to the Virtual Machine
 
* 30-40gb of free space. At the end of this Article you will have a Virtual Machine that will have about 15GB in size. Reserve at least some space for it to grow. <br/> <br/>
 
You will also need this software:
 
  
* Download Coreinfo from: http://technet.microsoft.com/en-us/s...rnals/cc835722 - This tool is necessary to check of your computer is capable of running Windows 8 with Hyper-V. Run the steps described below on “First Check” before downloading the remaining software so you don’t lose time if your computer is not supported.
+
One of the prerequisites for using Windows Phone 8 SDK is a machine with [http://en.wikipedia.org/wiki/Hyper-V Hyper-V] capability running (at least) Windows 8 Pro 64 bit edition. Provided your computer has the necessary hardware, it is possible to install the SDK in a virtual environment running Windows 8 and still use the Emulator. This guide demonstrates how to do just that, using VMWare Workstation Trial and Windows 8 Enterprise Developer Evaluation.  
  
* Download Windows 8 Developer Evaluation here: http://msdn.microsoft.com/en-us/evalcenter/jj554510.aspx . You will need to register with your live ID so you can also get a Key for the evaluation. It will grant you 90 days of evaluation.  
+
If you have a developer unlocked device you won't need the Emulator, but can instead install the SDK and then use the device for testing. In this case you can use Windows 8 basic edition (instead of pro/enterprise) and you can skip the instructions on editing manually the .VMX file and the HYPER-V setup.
  
* Go to www.vmware.com and register at their website. After registering, download a Trial of VMWare Workstation 9 or higher. This will grant you a 30 days license.  
+
The guide uses evaluation versions of VMWare Workstation and Windows 8 Enterprise. You can of course use 64 bit licensed versions of VMWare Workstation and Windows 8 Pro (or Windows 8 Enterprise) instead. If you don't need the Emulator you can use Windows 8 Base edition.
  
* Download Windows Phone 8 SDK here: http://dev.windowsphone.com/en-us/downloadsdk You can do this after installing the VM so you can download the tool from within it.
+
 
<br />
+
== What will you need ==
 +
* 64bit host operating system (This article was done with a Windows 7 64bit)
 +
* At least 8GB of RAM for the host machine so that you can assign 4GB to the Virtual Machine
 +
* 30-40GB of free space. At the end of this article, you will have a Virtual Machine that will have about 15GB in size. Reserve at least some space for it to grow.
 +
 
 +
 
 +
You will also need the following software:
 +
* Download [http://technet.microsoft.com/en-us/sysinternals/cc835722 Coreinfo] tool. This is used to check if your computer is capable of running Windows 8 with  [http://en.wikipedia.org/wiki/Hyper-V Hyper-V]. Run the steps described below in [[Windows Phone 8 SDK on a Virtual Machine with Working Emulator#First Check .E2.80.93 Does my computer support Windows 8 and Hyper-V.3F|First Check – Does my computer support Windows 8 and Hyper-V?]] section before downloading the remaining softwares so that you don't lose time if your computer is not supported.
 +
* Download [http://msdn.microsoft.com/en-us/evalcenter/jj554510.aspx Windows 8 Developer Evaluation] (be sure to download the 64bit version). You will need to register with your Windows Live ID so that you can also get a key for the evaluation. It will grant you 90 days of evaluation.
 +
* Register on [http://www.vmware.com/ vmware.com]. After registering, download a trial of VMWare Workstation 9 or higher. This will grant you a 30 days license.
 +
** The [https://my.vmware.com/cn/web/vmware/free#desktop_end_user_computing/vmware_player/5_0|PLAYER-503|product_downloads  VMware Player] (free) can also run virtual machines.
 +
* Download the [http://dev.windowsphone.com/en-us/downloadsdk Windows Phone 8 SDK]. You can do this after installing the VM so that you can download the tool from within it.
  
 
== First Check – Does my computer support Windows 8 and Hyper-V? ==
 
== First Check – Does my computer support Windows 8 and Hyper-V? ==
  
The first you will have to do is to check if your computer supports Windows 8 Hyper-V. If it does support you will be able to Install VMWare Workstation and enable it on the VM.  
+
The first step is to check if your computer supports Windows 8 [http://en.wikipedia.org/wiki/Hyper-V Hyper-V] or not. If it does then you will be able to Install VMWare Workstation and enable it on the VM.  
I’m assuming you already downloaded the Coreinfo tool. O the next steps are:
+
  
 +
Assuming that you have already downloaded the Coreinfo tool, the next steps are:
 
* Open the command prompt by clicking on start -> type CMD, then right-click "Command Prompt" and Run as administrator
 
* Open the command prompt by clicking on start -> type CMD, then right-click "Command Prompt" and Run as administrator
* Go to the folder where you downloaded the tool to and type "coreinfo.exe –v"
+
* Go to the folder where you downloaded the tool to and type: {{Icode|coreinfo.exe –v}}
  
 
Example:
 
Example:
 
+
<code text>
 
C:\Tools>Coreinfo.exe -v
 
C:\Tools>Coreinfo.exe -v
  
Coreinfo v3.1 - Dump information on system CPU and memory topology<br />
+
Coreinfo v3.1 - Dump information on system CPU and memory topology
Copyright (C) 2008-2012 Mark Russinovich<br />
+
Copyright (C) 2008-2012 Mark Russinovich
Sysinternals - www.sysinternals.com<br />
+
Sysinternals - www.sysinternals.com
  
Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz<br />
+
Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz
Intel64 Family 6 Model 42 Stepping 7, GenuineIntel<br />
+
Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
HYPERVISOR - Hypervisor is present<br />
+
HYPERVISOR - Hypervisor is present
VMX * Supports Intel hardware-assisted virtualization<br />
+
VMX * Supports Intel hardware-assisted virtualization
'''EPT * Supports Intel extended page tables (SLAT)'''<br />
+
EPT * Supports Intel extended page tables (SLAT)
 
+
</code>
If you have a SLAT enabled CPU, you can proceed with this guide. If not, it’s time for you to consider an upgrade of your hardware.
+
If you have a [http://en.wikipedia.org/wiki/Second_Level_Address_Translation SLAT] enabled CPU (marked by an asterisk), you can proceed with this guide. If not, you may consider upgrading your hardware.
  
 
== Install VMWare Workstation 9 ==
 
== Install VMWare Workstation 9 ==
  
After downloading VMWare Workstaion 9 install it on your machine. It’s a simple procedure and you only have to follow the wizard.
+
After downloading VMWare Workstaion 9, install it on your machine. It is a simple wizard-directed procedure.
  
[[File:Picture1.jpg]]
+
[[File:Picture1.jpg|none]]
  
One of the steps of the install is to add the KEY that you got for your trial. So be sure to have that in hand:
+
One of the steps in the installation is to add the key which you got from your trial. Please make sure to have it with you before proceeding further:
  
[[File:Picture2.jpg]]
+
[[File:Picture2.jpg|none]]
  
 
Finally you are ready to create your first Virtual Machine.
 
Finally you are ready to create your first Virtual Machine.
Line 82: Line 86:
 
== Create the Virtual Machine ==
 
== Create the Virtual Machine ==
  
Your first step is to select the option to create a new Virtual Machine on this screen
+
The first step is to select the option to create a new Virtual Machine on this screen
  
[[File:Picture3.jpg]]
+
[[File:Picture3.jpg|none]]
  
On the next screen make sure you select the Custom (Advanced) option. This is the best way to create your VM because it will give you full control over the settings:
+
On the next screen make sure you select the Custom (Advanced) option. This is the best way to create your VM so that you will have full control over the settings:
  
[[File:Picture4.jpg]]
+
[[File:Picture4.jpg|none]]
  
And when it comes to Hardware compatibility select the highest option:
+
And when it comes to hardware compatibility, select the highest option:
  
[[File:Picture5.jpg]]
+
[[File:Picture5.jpg|none]]
  
Now, a very important step. Select the option that you will install the OS later. Do not try to install Windows 8 now because the setup will fail. The reason it’s because for the Evaluation edition you don’t have a KEY and for some reason VMWare tries to create an automated setup file that Windows 8 setup then fails to recognize.
+
The next step is very important where you need to select the option that you will install the OS later. Do not try to install Windows 8 now otherwise the setup will fail. This is because with the Evaluation edition you don't have a KEY and for some reason VMWare tries to create an automated setup file which, later on, Windows 8 setup will fail to recognize.
  
[[File:Picture6.jpg]]
+
[[File:Picture6.jpg|none]]
  
 
Give a name to your VM:
 
Give a name to your VM:
  
[[File:Picture7.jpg]]
+
[[File:Picture7.jpg|none]]
  
 
Configure the CPU:
 
Configure the CPU:
  
[[File:Picture8.jpg]]
+
[[File:Picture8.jpg|none]]
  
And configure memory. I would recommend at least 4GB. My machine has 8GB. If you can’t use 4GB use as much as you can.
+
And configure memory. I would recommend at least 4GB. My machine has 8GB. If you can’t use 4GB, use as much as you can.
  
[[File:Picture9.jpg]]
+
[[File:Picture9.jpg|none]]
  
For network use NAT so your VM will share your network connection, and this means to share also the Internet connection. It’s crucial that your VM has access to the Internet or you won’t be able to install the SDK:
+
For "Network Type", use NAT, so that your VM will share your network/Internet connection. It is crucial that your VM has access to the Internet otherwise you won't be able to install the SDK:
  
[[File:Picture10.jpg]]
+
[[File:Picture10.jpg|none]]
  
 
I left the default I/O controller selected:
 
I left the default I/O controller selected:
  
[[File:Picture11.jpg]]
+
[[File:Picture11.jpg|none]]
  
And now it’s time to create a new Virtual HD:
+
And now it is time to create a new Virtual HD:
  
[[File:Picture12.jpg]]
+
[[File:Picture12.jpg|none]]
  
 
Again I left the default type selected:
 
Again I left the default type selected:
  
[[File:Picture13.jpg]]
+
[[File:Picture13.jpg|none]]
  
And I recommend at least 60GB. If you can reserve more, better. Also I prefer to keep my VM on a single file:
+
And I recommend at least 60GB. It is better to reserve more if you can. Also I prefer to keep my VM on a single file:
  
[[File:Picture14.jpg]]
+
[[File:Picture14.jpg|none]]
  
I store my Virtual HD’s on a external USB 2.0 or 3.0 hard drive. I found that having the Virtual HD on a separate disk would increase a lot the performance:
+
I store my Virtual HD on a external USB 2.0 or 3.0 hard drive. I found that having the Virtual HD on a separate disk significantly increases performance:
  
[[File:Picture15.jpg]]
+
[[File:Picture15.jpg|none]]
  
The next step is to Customize the hardware. This is very important because we will need to tweak some of the default values:
+
The next step is to customize the hardware. This is very important because we will need to tweak some of the default values:
  
[[File:Picture16.jpg]]
+
[[File:Picture16.jpg|none]]
  
 
Make sure you select the option “Virtualize Intel VT-x/EPT or ARM-V/RVI”. This is required to be able to run HYPER-V on your virtual machine.
 
Make sure you select the option “Virtualize Intel VT-x/EPT or ARM-V/RVI”. This is required to be able to run HYPER-V on your virtual machine.
  
[[File:Picture17.jpg]]
+
[[File:Picture17.jpg|none]]
  
It’s now time to make some changes to the Virtual Machine configuration file before proceeding. Exit VMWare before making this change.
+
It is now time to make some changes to the Virtual Machine configuration file before proceeding. Exit VMWare before making this change.
If you try to Install HYPER-V before doing this step, chances are that you will have problems running it. So to ensure all goes smoothly, go to the folder where you created your Virtual Machine and find the file with extension .VMX. In my case it was “Windows 8 x64.vmx”.  
+
If you try to install HYPER-V before doing this step, chances are that you will have problems running it. So to ensure that everything goes smoothly, go to the folder where you created your Virtual Machine and find the file with extension .VMX. In my case it was “Windows 8 x64.vmx”.  
 
Edit the file and add the text marked in red (hypervisor.cpuid.v0 = ”FALSE”):
 
Edit the file and add the text marked in red (hypervisor.cpuid.v0 = ”FALSE”):
  
[[File:Picture18.jpg]]
+
[[File:Picture18.jpg|none]]
  
Save the file.<br/>
+
Save the file.
That’s it. You are ready for the next and final steps. For that you need to start VMWare Workstation again.
+
 
 +
That is it. You are ready for the next and final step. For that you need to start VMWare Workstation again.
  
 
== Install Windows 8 Virtual Machine ==
 
== Install Windows 8 Virtual Machine ==
Line 155: Line 160:
 
On the CD/DVD select the Windows 8 Enterprise Developer Evaluation ISO you downloaded earlier (or that you will download now):
 
On the CD/DVD select the Windows 8 Enterprise Developer Evaluation ISO you downloaded earlier (or that you will download now):
  
[[File:Picture19.jpg]]
+
[[File:Picture19.jpg|none]]
  
 
Run your VM and follow the setup instructions for Windows 8.
 
Run your VM and follow the setup instructions for Windows 8.
After your run Windows 8 for the first time, you will be asked to customize it. Follow the wizard to the end and when you have finally access to your Windows 8 installation, open the desktop and select the “Install Tools” option for VMWare:
 
  
[[File:Picture20.jpg]]
+
Once you run the Windows 8 for the first time, you will be asked to customize it. Follow the wizard to the end and when you have finally access to your Windows 8 installation, open the desktop and select the "Install Tools" option for VMWare:
  
A Virtual DVD drive will be mounted and Windows 8 may show you a message on the upper right corner with a message. Select that message or open Explorer with the Windows Key + E and find the DVD drive. Run the VMWare setup:
+
[[File:Picture20.jpg|none]]
  
[[File:Picture21.jpg]]
+
A Virtual DVD drive will be mounted and Windows 8 may show you a message on the upper right corner with a message. Select that message or open Explorer with the '''Windows Key + E''' and find the DVD drive. Run the VMWare setup:
  
After all this is done, restart the Virtual Machine.  
+
[[File:Picture21.jpg|none]]
  
When you get Windows 8 VM up and running again, Open Control Panel and select the option “Turn Windows features on or off”:
+
After performing the above steps, restart the Virtual Machine.
  
[[File:Picture22.jpg]]
+
When you get Windows 8 VM up and running again, open Control Panel and select the option '''Turn Windows features on or off''':
 +
 
 +
[[File:Picture22.jpg|none]]
  
 
Then select the HYPER-V options:
 
Then select the HYPER-V options:
  
[[File:Picture23.jpg]]
+
[[File:Picture23.jpg|none]]
  
 
Your are all set. Next step is to install the SDK. Go to the download page mentioned at the beginning of this page and run it:
 
Your are all set. Next step is to install the SDK. Go to the download page mentioned at the beginning of this page and run it:
  
[[File:Picture24.jpg]]
+
[[File:Picture24.jpg|none]]
  
 
The setup will start. Follow the wizard:
 
The setup will start. Follow the wizard:
  
[[File:Picture25.jpg]]
+
[[File:Picture25.jpg|none]]
  
After the installation is complete you will need to register yout copy of the SDK. Just follow the link “Register online” and follow the necessary steps.  
+
After the installation is complete you will need to register your copy of the SDK. Just follow the link "Register online" and follow the necessary steps.  
  
[[File:Picture26.jpg]]
+
[[File:Picture26.jpg|none]]
  
At the end of the registration you will be provided with a Key. Copy that key, save it for future reference and future installations and use it on the Product Key box:
+
At the end of the registration, you will be provided with a Key. Copy that key, save it for future reference and future installations and use it on the Product Key box:
  
[[File:Picture27.jpg]]
+
[[File:Picture27.jpg|none]]
  
All done.  
+
All done.
  
 
== Now to create your first Windows Phone 8 Project ==
 
== Now to create your first Windows Phone 8 Project ==
Line 198: Line 204:
 
Now to test if everything is working properly, open Visual Studio 2012 express and create a new Windows Phone Project:
 
Now to test if everything is working properly, open Visual Studio 2012 express and create a new Windows Phone Project:
  
[[File:Picture28.jpg]]
+
[[File:Picture28.jpg|none]]
  
 
Select the Windows Phone 8 as a target:
 
Select the Windows Phone 8 as a target:
  
[[File:Picture29.jpg]]
+
[[File:Picture29.jpg|none]]
  
 
And you will get a new project similar to this:
 
And you will get a new project similar to this:
  
[[File:Picture30.jpg]]
+
[[File:Picture30.jpg|none]]
  
 
Press F5 or the Green arrow to run the project. The emulator will start to load. Be patient because the first time can take a few long seconds:
 
Press F5 or the Green arrow to run the project. The emulator will start to load. Be patient because the first time can take a few long seconds:
  
[[File:Picture31.jpg]]
+
[[File:Picture31.jpg|none]]
  
If your app take a bit to load, don’t worry. Its normal. Just give it a few more seconds and it will come up:
+
If your app takes a bit to load, don’t worry. It is normal. Just give it a few more seconds and it will come up:
  
[[File:Picture32.jpg]]
+
[[File:Picture32.jpg|none]]
  
 
Congratulations. You now have a fully working Windows 8 with Windows Phone 8 SDK and Windows Phone 8 emulator up and running.
 
Congratulations. You now have a fully working Windows 8 with Windows Phone 8 SDK and Windows Phone 8 emulator up and running.
 +
 +
== What about connecting my device to the virtual machine? ==
 +
 +
This should be trivial indeed, most (all?) virtual machines allow forwarding of the USB port from the host OS to the guest one, by simply clicking on the USB status indicator icon. Once you redirect the USB port to the guest OS, Windows 8 will see it and start installing the required drivers, after which the device is available to the IDE.
 +
 +
Under the tips and tricks section of this topic:
 +
* if you are using Oracle VirtualBox make sure to enable USB 2.0 in VM's settings. This will require you to also install the corresponding [https://www.virtualbox.org/wiki/Downloads Oracle VM VirtualBox Extension Pack].
 +
  
  
 
== Final Words ==
 
== Final Words ==
  
So, I hope you liked this guide. I tried to be as simple as possible, and to include as many screenshot as I could, because a picture does worth a thousand words. Feedback and comments are very welcome.
+
So, I hope you liked this guide. I tried to be as simple as possible, and to include as many screenshots as I could, because a picture does worth a thousand words. Feedback and comments are very welcome.

Latest revision as of 04:26, 20 November 2013

Featured Article
06 Jan
2013

This article explains how to create a Windows 8 Virtual Machine using VMWare software and install the Windows Phone 8 SDK on Windows 8 running on Virtual Machine. It also explains how to enable Hyper-V and Windows Phone 8 emulator.

Note.pngNote: This article was a winner in the Windows Phone 8 Wiki Competition 2012Q4.

WP Metro Icon Tools.png
WP Metro Icon WP8.png
Article Metadata
Compatibility
Platform(s): Windows Phone 8 and later
Windows Phone 8
Article
Created: joaocardoso (03 Oct 2012)
Last edited: hamishwillee (20 Nov 2013)

Contents

[edit] Introduction

One of the prerequisites for using Windows Phone 8 SDK is a machine with Hyper-V capability running (at least) Windows 8 Pro 64 bit edition. Provided your computer has the necessary hardware, it is possible to install the SDK in a virtual environment running Windows 8 and still use the Emulator. This guide demonstrates how to do just that, using VMWare Workstation Trial and Windows 8 Enterprise Developer Evaluation.

If you have a developer unlocked device you won't need the Emulator, but can instead install the SDK and then use the device for testing. In this case you can use Windows 8 basic edition (instead of pro/enterprise) and you can skip the instructions on editing manually the .VMX file and the HYPER-V setup.

The guide uses evaluation versions of VMWare Workstation and Windows 8 Enterprise. You can of course use 64 bit licensed versions of VMWare Workstation and Windows 8 Pro (or Windows 8 Enterprise) instead. If you don't need the Emulator you can use Windows 8 Base edition.


[edit] What will you need

  • 64bit host operating system (This article was done with a Windows 7 64bit)
  • At least 8GB of RAM for the host machine so that you can assign 4GB to the Virtual Machine
  • 30-40GB of free space. At the end of this article, you will have a Virtual Machine that will have about 15GB in size. Reserve at least some space for it to grow.


You will also need the following software:

  • Download Coreinfo tool. This is used to check if your computer is capable of running Windows 8 with Hyper-V. Run the steps described below in First Check – Does my computer support Windows 8 and Hyper-V? section before downloading the remaining softwares so that you don't lose time if your computer is not supported.
  • Download Windows 8 Developer Evaluation (be sure to download the 64bit version). You will need to register with your Windows Live ID so that you can also get a key for the evaluation. It will grant you 90 days of evaluation.
  • Register on vmware.com. After registering, download a trial of VMWare Workstation 9 or higher. This will grant you a 30 days license.
  • Download the Windows Phone 8 SDK. You can do this after installing the VM so that you can download the tool from within it.

[edit] First Check – Does my computer support Windows 8 and Hyper-V?

The first step is to check if your computer supports Windows 8 Hyper-V or not. If it does then you will be able to Install VMWare Workstation and enable it on the VM.

Assuming that you have already downloaded the Coreinfo tool, the next steps are:

  • Open the command prompt by clicking on start -> type CMD, then right-click "Command Prompt" and Run as administrator
  • Go to the folder where you downloaded the tool to and type: coreinfo.exe –v

Example:

C:\Tools>Coreinfo.exe -v
 
Coreinfo v3.1 - Dump information on system CPU and memory topology
Copyright (C) 2008-2012 Mark Russinovich
Sysinternals - www.sysinternals.com
 
Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz
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)

If you have a SLAT enabled CPU (marked by an asterisk), you can proceed with this guide. If not, you may consider upgrading your hardware.

[edit] Install VMWare Workstation 9

After downloading VMWare Workstaion 9, install it on your machine. It is a simple wizard-directed procedure.

Picture1.jpg

One of the steps in the installation is to add the key which you got from your trial. Please make sure to have it with you before proceeding further:

Picture2.jpg

Finally you are ready to create your first Virtual Machine.

[edit] Create the Virtual Machine

The first step is to select the option to create a new Virtual Machine on this screen

Picture3.jpg

On the next screen make sure you select the Custom (Advanced) option. This is the best way to create your VM so that you will have full control over the settings:

Picture4.jpg

And when it comes to hardware compatibility, select the highest option:

Picture5.jpg

The next step is very important where you need to select the option that you will install the OS later. Do not try to install Windows 8 now otherwise the setup will fail. This is because with the Evaluation edition you don't have a KEY and for some reason VMWare tries to create an automated setup file which, later on, Windows 8 setup will fail to recognize.

Picture6.jpg

Give a name to your VM:

Picture7.jpg

Configure the CPU:

Picture8.jpg

And configure memory. I would recommend at least 4GB. My machine has 8GB. If you can’t use 4GB, use as much as you can.

Picture9.jpg

For "Network Type", use NAT, so that your VM will share your network/Internet connection. It is crucial that your VM has access to the Internet otherwise you won't be able to install the SDK:

Picture10.jpg

I left the default I/O controller selected:

Picture11.jpg

And now it is time to create a new Virtual HD:

Picture12.jpg

Again I left the default type selected:

Picture13.jpg

And I recommend at least 60GB. It is better to reserve more if you can. Also I prefer to keep my VM on a single file:

Picture14.jpg

I store my Virtual HD on a external USB 2.0 or 3.0 hard drive. I found that having the Virtual HD on a separate disk significantly increases performance:

Picture15.jpg

The next step is to customize the hardware. This is very important because we will need to tweak some of the default values:

Picture16.jpg

Make sure you select the option “Virtualize Intel VT-x/EPT or ARM-V/RVI”. This is required to be able to run HYPER-V on your virtual machine.

Picture17.jpg

It is now time to make some changes to the Virtual Machine configuration file before proceeding. Exit VMWare before making this change. If you try to install HYPER-V before doing this step, chances are that you will have problems running it. So to ensure that everything goes smoothly, go to the folder where you created your Virtual Machine and find the file with extension .VMX. In my case it was “Windows 8 x64.vmx”. Edit the file and add the text marked in red (hypervisor.cpuid.v0 = ”FALSE”):

Picture18.jpg

Save the file.

That is it. You are ready for the next and final step. For that you need to start VMWare Workstation again.

[edit] Install Windows 8 Virtual Machine

On the CD/DVD select the Windows 8 Enterprise Developer Evaluation ISO you downloaded earlier (or that you will download now):

Picture19.jpg

Run your VM and follow the setup instructions for Windows 8.

Once you run the Windows 8 for the first time, you will be asked to customize it. Follow the wizard to the end and when you have finally access to your Windows 8 installation, open the desktop and select the "Install Tools" option for VMWare:

Picture20.jpg

A Virtual DVD drive will be mounted and Windows 8 may show you a message on the upper right corner with a message. Select that message or open Explorer with the Windows Key + E and find the DVD drive. Run the VMWare setup:

Picture21.jpg

After performing the above steps, restart the Virtual Machine.

When you get Windows 8 VM up and running again, open Control Panel and select the option Turn Windows features on or off:

Picture22.jpg

Then select the HYPER-V options:

Picture23.jpg

Your are all set. Next step is to install the SDK. Go to the download page mentioned at the beginning of this page and run it:

Picture24.jpg

The setup will start. Follow the wizard:

Picture25.jpg

After the installation is complete you will need to register your copy of the SDK. Just follow the link "Register online" and follow the necessary steps.

Picture26.jpg

At the end of the registration, you will be provided with a Key. Copy that key, save it for future reference and future installations and use it on the Product Key box:

Picture27.jpg

All done.

[edit] Now to create your first Windows Phone 8 Project

Now to test if everything is working properly, open Visual Studio 2012 express and create a new Windows Phone Project:

Picture28.jpg

Select the Windows Phone 8 as a target:

Picture29.jpg

And you will get a new project similar to this:

Picture30.jpg

Press F5 or the Green arrow to run the project. The emulator will start to load. Be patient because the first time can take a few long seconds:

Picture31.jpg

If your app takes a bit to load, don’t worry. It is normal. Just give it a few more seconds and it will come up:

Picture32.jpg

Congratulations. You now have a fully working Windows 8 with Windows Phone 8 SDK and Windows Phone 8 emulator up and running.

[edit] What about connecting my device to the virtual machine?

This should be trivial indeed, most (all?) virtual machines allow forwarding of the USB port from the host OS to the guest one, by simply clicking on the USB status indicator icon. Once you redirect the USB port to the guest OS, Windows 8 will see it and start installing the required drivers, after which the device is available to the IDE.

Under the tips and tricks section of this topic:

  • if you are using Oracle VirtualBox make sure to enable USB 2.0 in VM's settings. This will require you to also install the corresponding Oracle VM VirtualBox Extension Pack.


[edit] Final Words

So, I hope you liked this guide. I tried to be as simple as possible, and to include as many screenshots as I could, because a picture does worth a thousand words. Feedback and comments are very welcome.

This page was last modified on 20 November 2013, at 04:26.
7654 page views in the last 30 days.
×