Visual Studio 2013 Gallery image for MSDN subscribers

Contents


Introduction
Provisioning a developer desktop from Microsoft Azure Portal
Provisioning a Visual Studio 2013 image from PowerShell
Get the scripts
Set up the Azure PowerShell environment.
Web and SQL
SharePoint Stand Alone (No Active Directory)
SharePoint and Active Directory
Provision a virtual machine with Active Directory
Connecting Visual Studio to an on premise TFS server

Introduction

The Visual Studio 2013 image is an exclusive offer for MSDN subscribers and provides the capability to quickly provision a development environment for Web/SQL development and for SharePoint 2013 development on an Azure Virtual machine. The image is available for MSDN Professional, Premium and Ultimate subscribers. You need to choose an image that corresponds to your subscription level. Visual Studio will check your subscription level during sign in and will only allow you to proceed if your subscription level matches the VS SKU on the image.

The scripts on the image allow you to configure the virtual machine for either SQL, Web development or for SharePoint development. The virtual machine can be provisioned through the portal or through PowerShell and PowerShell Remoting. This tutorial will guide you through both options. Note that while SQL Server and Sharepoint are already installed on the image, you must run the scripts to configure them before use.

Provisioning a developer desktop from Microsoft Azure Portal

  1. Sign in to the Microsoft Azure Portal
  2. Click in the + sign at the bottom of the Portal page
  3. Select Compute->Virtual Machine->From Gallery
  4. Check the MSDN filtering checkbox. This will filter the list to only show the vailable MSDN images.
  5. Select the image that matches your MSDN subscription level. For example if you have an MSDN Professional subscription select the Visual Studio Professional 2013 image
  6. Click on the arrow on the lower right corner
    Select Virtual Machine
  7. In the Virtual machine configuration page enter the information required and click next
    Select Virtual Machine
    Note: We recommend that you use a Large VM size for Web/SQL development and an Extra Large for SharePoint development.
  8. In the Virtual machine mode page enter the information needed and click next
    Note: If you want to connect Visual Studio to an on premise TFS server you need to provision the virtual machine into a virtual network as shown in the screenshot. For more information see Connecting Visual Studio to an on premise TFS server later in this article.
    Select Virtual Machine
  9. In the virtual machine options page make sure that the endpoints for Windows PowerShell Remoting and RDP are enabled.
    Select Virtual Machine
  10. Click the finish icon to start the provisioning process.
  11. Once the image is provisioned you can use remote desktop to connect to it. In the Portal Virtual machine page click on the newly created image and choose connect
    Select Virtual Machine
  12. Once connected click on the “Configure Developer Desktop” shortcut icon on your desktop.
    Select Virtual Machine
    The folder contains three subfolders. The table below describes the subfolder and their contents
    Folder Name Content
    Scripts Scripts to configure different environments. The content of this folder is described in Table 2
    Software The folder contains SQL 2012 Developer bits and WorkflowManager bits. If you target SharePoint workflow development you need to install and configure Workflow Manager after you have provisioned SharePoint. For more information on how to configure workflow see http://technet.microsoft.com/en-us/library/jj658588.asp
    Tools The folder contains PsExec a helper utility needed to provision SQL Server 2012 Developer remotely.

    As mentioned at the beginning of this article you can use scripts that come with the image to configure your target environment. The table below describes the scripts their purpose and parameters:
    Script Name Result Parameter
    ConfigureSharePointFarm.ps1 NOTE: This configuration of SharePoint is only supported for development purposes. The script will produce the following SharePoint environment.
    • Provisioned SQL Server with an instance called MSSQLSERVER
    • SharePoint configuration database: “SP2013_Configuration”
    • SharePoint Central Administration content database: “SP2013_Content_CentralAdministration” Central Administration Port: 11111 Central Administration Authentication: NTLM
    • Web Application “Developer Test Site” on port 80 with default authentication provider. Using default app pool running under –localSPFarmAccountName identity
    • Root site collection “Developer Test Site Collection” Based on team site template. Primary site collection owner is the logged on user
    -localSPFarmAccountName: SharePoint farm account that will be used by SharePoint to connect to the configuration database and also serves as identity for the application pools -localSPFarmAccountPassword:SharePoint farm account password
    ConfigureSharePointFarmInDomain.ps1 In addition to the functionality mentioned above this script assumes that you have a virtual machine serving as a domain controller in the same virtual network as the Visual Studio 2013 virtual machine has been provisioned into. This configuration will open up all SharePoint development scenarios including using user profiles. -domainName: Domain name -domainSPFarmAccountName:SharePoint farm account that will be used by SharePoint to connect to the configuration database. It should be a domain user account created in advance. -domainSPFarmAccountPasswordSharePoint farm account password
    ConfigureSQLServer.ps1 Script to configure SQL Server Developer Edition. A default instance called MSSQLSERVER will be created. The built-In administrators will be added to the database sysadmin. - - None
  13. Run the script of your choice. You can also skip running either of those scripts. In that case Visual Studio will use SQL Server 2012 Express LocalDB. The sample below shows the configured SharePoint environment of the ConfigureSharePointFarm.ps1 script
    Select Virtual Machine
  14. Launch Visual Studio 2013 by double clicking in the Visual Studio icon on the desktop or from the taskbar. Visual Studio 2013 will require you to sign with a valid Microsoft account.
    Select Virtual Machine
  15. Enter your Microsoft account which is associated with your MSDN subscription.
    Select Virtual Machine
  16. After the Microsoft account has been validated you will be asked to enter your full name. Note: If you already have a Visual Studio profile it will load your settings and launch Visual Studio 2013 as shown below.
    Select Virtual Machine
  17. Start developing
    Select Virtual Machine

Provisioning a Visual Studio 2013 image from PowerShell

The Visual Studio 2013 image can be provisioned entirely by using PowerShell and PowerShell Remoting. This option gives you the most flexibility with regards to automating the provisioning of the developer desktop. In addition the scripts will also automate the SQL and SharePoint provisioning so that you have the development environment fully configured and ready to go.

Get the scripts

As a first step you need to download the scripts from the script center onto your machine. Keep in mind to always launch PowerShell or PowerShell_ISE in elevated mode for executing the scripts.

Set up the Azure PowerShell environment

Note: Most of the scripts require the image name of the Visual Studio MSDN images. The image name is not the one you see in the portal in fact it is the full name returned by PowerShell Get-AzureVMImage commandlet.
As the VS MSDN images are updated frequently we encourage you to run the command Get-AzureVMImage | ? { $_.Category -eq "Microsoft Visual Studio Group" } | Format-List ImageName to obtain the correct image name first.

Web and SQL

If you want to provision a virtual machine for Web and SQL development you need to run the following script: CreateWebSQLDeveloperMachine.ps1 The table below describes the parameters for this script.

Parameter Name Description
imageName This is the name of the developer desktop image: 03f55de797f546a1b29d1b8d66be687a__Visual-Studio-2013-<Ultimate|Premium|Professional>-Update4-AzureSDK-2.5-WS2012
azurePublishSettingsFile Path to your Azure Publish settings file
subscriptionName Your subscription name
storageAccountName Storage account which will be used to store the Virtual Machine. Note: The script will not create a storage account for you.
vmName The name of the virtual machine. The name will also be used as the Cloud Service name that will be created. If the name is taken the script will automatically clean up the existing deployments or virtual machines in the service.
vmSize The size of the virtual machine. For Web and SQL development we recommend Large VMs. More information on VM sizes can be found here
adminUserName The user name that you will use to connect to the machine. The user will be added to the Administrators group of the virtual machine
adminUserPassword The password for the account
vnetName (optional) The name of the virtual network the virtual machine should be provisioned into. The virtual network needs to be in the same location as the storage account. Please note that this will not create a virtual network. See for more information on creating a virtual network
subnetNames (optional) The name of subnet. If you don’t specify subnet name it will simply assign a range

Sample

.\CreateWebSQLDeveloperMachine.ps1 -imageName "03f55de797f546a1b29d1b8d66be687a__Visual-Studio-2013-<Ultimate|Premium|Professional>-Update4-AzureSDK-2.5-WS2012" -azurePublishSettingsFile "C:\Sample\Sample.publishsettings" -subscriptionName "SampleSub" -storageAccountName "samplestorage" -vmName “samplewebdev" -vmSize "Large" -adminUserName "SampleUser1" -adminUserPassword "Pass@word1"

SharePoint Stand Alone (No Active Directory)

If you want to provision a virtual machine for SharePoint development you need to run the following script: CreateSharePointDeveloperMachine.ps1.The table below describes the parameters for this script.

Parameter Name Description
imageName This is the name of the developer desktop image: 03f55de797f546a1b29d1b8d66be687a__Visual-Studio-2013-<Ultimate|Premium|Professional>-Update4-AzureSDK-2.5-WS2012
azurePublishSettingsFile Path to your Azure Publish settings file
subscriptionName Your subscription name
storageAccountName Storage account which will be used to store the Virtual Machine. Note: The script will not create a storage account for you.
vmName The name of the virtual machine. The name will also be used as the Cloud Service name that will be created. If the name is taken the script will automatically clean up the existing deployments or virtual machines in the service.
vmSize The size of the virtual machine. For SharePoint development we recommend Extra Large VMs. More information on VM sizes can be found here
adminUserName The user name that you will use to connect to the machine. The user will be added to the Administrators group of the virtual machine
adminUserPassword The password for the account
localSPFarmAccountName The SharePoint farm account. The account will also be used as the account for the application pool for the web application that hosts the demo site collection
localSPFarmAccountPassword The SharePoint farm account password
vnetName (optional) The name of the virtual network the virtual machine should be provisioned into. The virtual network needs to be in the same location as the storage account. Please note that this will not create a virtual network. See for more information on creating a virtual network
subnetNames (optional) The name of subnet. If you don’t specify subnet name it will simply assign a range

Sample

.\CreateSharePointDeveloperMachine.ps1 -imageName "03f55de797f546a1b29d1b8d66be687a__Visual-Studio-2013-<Ultimate|Premium|Professional>-Update4-AzureSDK-2.5-WS2012" -azurePublishSettingsFile "C:\Sample\Sample.publishsettings" -subscriptionName "SampleSub" -storageAccountName "samplestorage" -vmName “samplespdev" -vmSize "ExtraLarge" -adminUserName "SampleUser1" -adminUserPassword "Pass@word1" -localSPFarmAccountName "sp_farm" -localSPFarmAccountPassword "Pass@word1"

SharePoint and Active Directory

Configuring SharePoint with an Active directory requires the following steps:
  1. Create a Virtual Network
  2. Provision a virtual machine with Active Directory
  3. Provision the developer desktop virtual machine. Before you can execute the script you need to enable CredSSP on the client machine for delegation before executing.

Create a virtual network

To create a VNET you need to provide a configuration file. The configuration file follows the schema definition which can be found
here

Create a VNET: Execute CreateVNET.ps1. The table below describes the parameters for this script

Parameter Name Description
azurePublishSettingsFile Path to your Azure Publish settings file
subscriptionName Your subscription name
vnetConfigurationPath Path to the VNET configuration file
affinityGroupName Name of the Affinity Group
affinityGroupLocation Location of the Affinity Group

VNET configuration sample

<?xml version="1.0" encoding="utf-8"?> <NetworkConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/ServiceHosting/2011/07/NetworkConfiguration"> <VirtualNetworkConfiguration> <VirtualNetworkSites> <VirtualNetworkSite name="VNet1" AffinityGroup="AffinityGroup1"> <AddressSpace> <AddressPrefix>10.0.0.0/20</AddressPrefix> </AddressSpace> <Subnets> <Subnet name="Subnet1"> <AddressPrefix>10.0.0.0/28</AddressPrefix> </Subnet> </Subnets> </VirtualNetworkSite> </VirtualNetworkSites> </VirtualNetworkConfiguration> </NetworkConfiguration>

Sample

.\CreateVNet.ps1 -azurePublishSettingsFile "C:\Sample\Sample.publishsettings" -subscriptionName "SampleSub" -vnetConfigurationPath "C:\Sample\vnet.xml" -affinityGroupName "AffinityGroup1" -affinityGroupLocation "West US"

Provision a virtual machine with Active Directory

Run CreateNewADDSForest.ps1.The script will provision a virtual machine based on the Windows Server 2012 Datacenter image. The table below describes the parameters for this script

Parameter Name Description
ws2012ImageName The image must be Windows Server 2012 Datacenter based.
azurePublishSettingsFile Path to your Azure Publish settings file
subscriptionName Your subscription name
storageAccountName Storage account which will be used to store the Virtual Machine. Note: The script will not create a storage account for you.
vmName The name of the virtual machine. The name will also be used as the Cloud Service name that will be created. If the name is taken the script will automatically clean up the existing deployments or virtual machines in the service.
vmSize The size of the virtual machine. For SharePoint development we recommend Extra Large VMs. More information on VM sizes can be found here
adminUserName The user name that you will use to connect to the machine. The user will be added to the Administrators group of the virtual machine
adminUserPassword The password for the account
localSPFarmAccountName The SharePoint farm account. The account will also be used as the account for the application pool for the web application that hosts the demo site collection
localSPFarmAccountPassword The SharePoint farm account password
vnetName (optional) The name of the virtual network the virtual machine should be provisioned into. The virtual network needs to be in the same location as the storage account. Please note that this will not create a virtual network. See for more information on creating a virtual network
subnetNames (optional) The name of subnet. If you don’t specify subnet name it will simply assign a range

Sample

.\CreateNewADDSForest.ps1 -ws2012iImageName "a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201309.01-en.us-127GB.vhd" -azurePublishSettingsFile "C:\Sample\Sample.publishsettings" -subscriptionName "SampleSub" -storageAccountName "samplestorage" -vmName "sampleadds" -vmSize "Medium" -adminUserName "SampleUser1" -adminUserPassword "Pass@word1" -domainName "sample.contoso.com" -safeModeAdminPassword "Pass@word1" -domainSPFarmAccountName "sp_farm" -domainSPFarmAccountPassword "Pass@word1" -vnetName "VNet1" -subnetNames "Subnet1"

Provision the developer image and domain join it

Run CreateSharePointDeveloperMachineInDomain.ps1. The table below describes the parameters for this script:

Parameter Name Description
imageName This is the name of the developer desktop image: 03f55de797f546a1b29d1b8d66be687a__Visual-Studio-2013-<Ultimate|Premium|Professional>-Update4-AzureSDK-2.5-WS2012
azurePublishSettingsFile Path to your Azure Publish settings file
subscriptionName Your subscription name
storageAccountName Storage account which will be used to store the Virtual Machine. Note: The script will not create a storage account for you.
vmName The name of the virtual machine. The name will also be used as the Cloud Service name that will be created. If the name is taken the script will automatically clean up the existing deployments or virtual machines in the service.
vmSize The size of the virtual machine. For SharePoint development we recommend Extra Large VMs. More information on VM sizes can be found here
adminUserName The user name that you will use to connect to the machine. The user will be added to the Administrators group of the virtual machine
adminUserPassword The password for the account
domainDnsName Specifies the fully qualified domain name (FQDN) of the Windows domain to join.
domainName Specifies the domain of the domain user account that has permission to add the computer to a domain.
domainUserName Specifies the name of the domain user account that has permission to add the computer to a domain. The user will be added to the administrator group of the virtual machine. The user will also be added as the primary site collection owner for the demo site collection. After the setup, you will use this account to connect to the machine.
domainUserPassword Specifies the password of the domain user account that has permission to add the computer to a domain.
domainSPFarmAccountName SharePoint farm domain account
domainSPFarmAccountPassword SharePoint farm domain password
vnetName The name of the virtual network the virtual machine should be provisioned into. The virtual network needs to be in the same location as the storage account. Please note that this will not create a virtual network
subnetNames (optional) The subnet name.

Sample

.\CreateSharePointDeveloperMachineInDomain.ps1 -imageName "03f55de797f546a1b29d1b8d66be687a__Visual-Studio-2013-<Ultimate|Premium|Professional>-Update4-AzureSDK-2.5-WS2012" -azurePublishSettingsFile "C:\Sample\Sample.publishsettings" -subscriptionName " SampleSub" -storageAccountName "samplestorage" -vmName "samplespdev" -vmSize "ExtraLarge" -adminUserName "SampleUser2" -adminUserPassword "Pass@word1" -domainDnsName "sample.contoso.com" -domainName "sample" -domainUserName "SampleUser1" -domainUserPassword "Pass@word1" -domainSPFarmAccountName "sp_farm" -domainSPFarmAccountPassword "Pass@word1" -vnetName "VNet1" -subnetNames "Subnet1"

Connecting Visual Studio to an on premise TFS server

This section describes how to use a Point to Site connection to connect the Visual Studio instance on the developer desktop to an on premise Team Foundation Server. As a first step you need to set up a Virtual Network and a Point to Site connection. You can follow the steps described here. The image below shows the Microsoft Azure Portal with a Virtual Network called developervnet and a configured point to site connection with one client already connected.
Select Virtual Machine
From the client you can use the VPN client provided by the Client VPN package to connect back to your virtual network. The image below shows a client connecting back to the virtual network using the VPN tunnel
Select Virtual Machine
As a next step you need to provision a virtual machine from the Visual Studio Ultimate 2013 image into the virtual network (in this example developervnet).Once the virtual machine has been provisioned you can connect to the Team Foundation Server from Visual Studio as shown in the image below:
Select Virtual Machine
Select Virtual Machine
Note: In your environment you may need to add firewall rules to allow the communication.