Step-By-Step: Creating A Windows Development Environment in Hyper-V

Last week was a busy one for the CANITPRO.NET team as we ventured to Seattle to learn about the new upcoming advancements Microsoft has to offer. What is great about the event is the ability to collaborate with other countries as well as other expertise to create new ideas amidst all the new content being delivered. One idea which struck a cord with the CANITPRO.NET team was the developer requirements for lab computers to create software to be utilized by both enterprise and consumers alike. One of the challenges they face is while developers do sometimes do have a Windows enabled PC to utilize, other times developers use a Mac OS laptop or other OS offerings which may pose a challenge. One said work around to this would be to utilize a Windows To Go Workspace which can be enabled via the Step-By-Step provided on a previous post. Should an approved USB key not be available, enabling a Hyper-V session on a Windows 8.1 machine could be a quick and easy fix to enable a developer to build which ever windows based solution is required. Even a lab enabled with Windows Server 2012 R2 could be created via this method to appease developer demands. Once the solution is completed, the VM could be backed up for future development, transferred to another machine or discarded if no longer needed. Steps to enable this type of functionality are as follows:

Step 1: Prerequisites

The following prerequisites are required to successfully run Client Hyper-V on Windows 8.1 machine:

Step 2: Setting Up Hyper-V

  1. Ensure that hardware virtualization support is turned on in the BIOS settings.


  2. Save the BIO settings and boot up the machine normally,

  3. At the Start Screen, swipe the right hand side of the screen and select the Search Charm.

  4. Type turn windows features on or off and select that item

  5. Select and enable Hyper-V


  6. If Hyper-V was not previously enabled, reboot the machine to apply the change.

    NOTE: As a best practice, it’s a good idea to configure networking for the Hyper-V environment to support external network connections. Ensure that a virtual switch has been created and is functional.

  7. Open the Virtual Switch Manager, found on the Actions panel in the Hyper-V Manager, by typing Hyper-V at the Start Screen.


  8. Select “Virtual Switch Manager” in the Actions pane.

  9. Ensure that “External” is highlighted, and then click on the “Create Virtual Switch” button.


  10. If more than one NIC in is present, ensure that the proper NIC is selected for use on the VM external network connections.


Step 3: Initial VM setup

Now this is the part where the collaboration established last week comes into play. Microsoft colleague, Volker Will, provided CANITPRO.NET further insight as to creating the perfect environment for developers.

  1. In Hyper-V Manager create a new VHD file via New…/Hard Disk. Make sure to create a Generation 1 VHD file. The size should be set to 80GB, dynamically expanding

  2. Create a new virtual machine using Windows 8.1 Enterprise 64-bit Evaluation software

    1. In Hyper-V manager create a new virtual machine and attach the VHD file created in step 1

    2. Install Windows 8.1 Enterprise, however do NOT connect to the network

    3. During installation you will create a local user account (CANITPRO [no password])

    4. Do NOT connect to the network while creating the virtual machine (allows you to setup a local user account)

    5. Make sure to turn off Windows Update (via Control Panel/Turn Automatic Updating On or Off)

    6. In Hyper-V Manager, Connect the VM to the network but DO NOT APPLY ANY UPDATES via Windows Update yet

Once competed, you should now have a running version of Windows 8.1. Next we will load all the necessary tools developers would require to develop for developing a Windows Phone, Windows Azure, or Windows.

Step 4: Setup of Development Software

  1. Load an elevated command prompt

  2. Install Chocolately by running the following from the elevated command promp:

    @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString(''))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

  3. Run the following commands in that order from the same elevated command prompt

    cinst VisualStudio2012Ultimate
    cinst dogtail.vs2012.3

  4. Once finished, continue and run the following command to install the .Net Framework 3.x

    DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:d:\ sources\sxs                     

    (Where d:\ should be replaced with the drive containing your Windows installation source)

  5. Reboot

  6. Install Visual Studio 2013 Ultimate (select all options)

  7. Reboot, log on as CANITPRO, and wait for the installation of Visual Studio to finish. Do NOT launch Visual Studio

  8. From an elevated command prompt, run the following commands in the order presented

    cinst nodejs

    cinst fiddler4

    cinst 7zip

    cinst githubforwindows

    cinst webpicommandline

    choco webpi WPDTV3_RTM

    cinst NugetPackageManager

    cinst git

  9. Exit the command prompt and start a new elevated command prompt

  10. Run the following command

    cinst poshgit

  11. Reboot and log on as CANITPRO

  12. Create a directory c:\temp

    md c:\temp

  13. Run the following command from an elevated prompt

    webpicmd /install /products:"ARR,ARRv2_5_KB2589179,ARRv3_0,ASPDOTNETandWebTools2012 _2,BasicAuthentication,ClientCertificateMappingAuthentication,DACFX,DefaultDocument,DigestAuthentication,DirectoryBrowse,ECacheUpdate,ExternalCache,HTTPErrors,HTTPLogging,HTTPRedirection,IISClientCertificateMappingAuthentication,IISExpress,IISExpress_7_5,IISExpress_ByPlatform,IISManagementConsole,MVC3,MVC3Loc,MVC4Vs2010_Loc,MySQLConnector,NETFramework35,NETFramework4Update402,NetFx3,NetFx4,NetFx4Extended-ASPNET45,PowerShell,RequestFiltering,ServerSideIncludes,SMO,SMO_11_0,SQLCE,SQLCE_4_0,SQLCEforWM,SQLCETools,SQLCETools_4_0,SQLCLRTypes,SQLDOM,SQLLocalDB,SSDTVS2012,StaticContent,StaticContentCompression,UrlRewrite2,VWDOrVs11AzurePack,VWDOrVs11AzurePack.2.1,VWDOrVs2013AzurePack,VWDOrVs2013AzurePack.2.1,WASConfigurationAPI,WASProcessModel,WebMatrixWeb,WIF,WindowsAuthentication,WindowsAzureLibrariesNET_2_0,WindowsAzureLibrariesNET_2_1,WindowsAzurePowershell,WindowsAzureSDK_2_0,WindowsAzureSDK_2_1, WindowsAzureSDK_2_2,WindowsAzureXPlatCLI,WindowsInstaller31,WindowsInstaller45,WorkflowClient,WorkflowManagerTools" /accepteula /log:c:\temp\webpi-log.txt

    NOTE: If asked for the SQL server password, enter CANITPRO or a password of your choosing that you would be able to recall later. The installation will ask you to reboot to continue installing all components still missing from the initial run.
    Allow the reboot and log back on as hal9000. The installation will continue to finish the application of products

  14. Install Git Tools for Visual Studio

  15. Reboot and log on as CANITPRO

  16. At this point, feel free to install any other tools and applications

    Useful stuff might be:

    cinst sublimetext2


    cinst adobereader

    cinst flashplayerplugin

    cinst skydrive

    cinst truecrypt

    cinst synergy

    cinst steam

    cinst javaruntime

    cinst notepadplusplus

  17. Manually install all updates to the OS and installed application via Windows Update (Choose updates for Operating System and installed Microsoft products)

  18. You may want to delete existing Restore Points from earlier installations to free up some disk space by running "Disk Cleanup" from Control Panel/Administrative Tools

  19. The virtual machine is now ready and can be prepared for redistribution. At an elevated command prompt run the following commands:

    cd sysprep

    sysprep /generalize /oobe /shutdown


To learn about further functionality around Windows 8.1 for Enterprise, please visit Microsoft Virtual Academy and partake in the free Windows 8 for IT Pros Jump Start.