Passer au contenu principal

 Subscribe

Over last couple of months we have received a lot of feedback from customers to enable Windows Client images in Microsoft Azure. Some Customers have the requirement to develop and test their software on the operating system the software targets. Also a lot of customers wanted the ability to spin up a dev/test environment for their legacy apps running on client OSs quickly instead of maintaining on premise dev/test environments for those types of applications.

As a result of that feedback and as part of our ongoing effort to improve the dev/test experience for our valued MSDN subscribers we recently added Windows 7 Enterprise and Windows 8.1 Enterprise base images to our collection of Visual Studio developer images, BizTalk Developer image and Microsoft Dynamics GP image in Microsoft Azure.

In this blog post we’ll talk you through the different options to create a virtual machine from a Windows client image, discuss some of the limitations and touch on some of the licensing implications for MSDN subscribers.

There are actually three ways to create virtual machines, through the Microsoft Azure Management Portal, Visual Studio and PowerShell.

Let’s start with the Portal approach. You’ll see that the steps to provision a Windows client image do not differ from creating other virtual machines except that you need to be signed in with the Microsoft account that is associated with your active MSDN subscription and use the Azure subscription which you set up using your MSDN Azure benefits. Please find more instructions on how to enable your MSDN Azure benefits here.

Let’s look at how to create a virtual machine from the portal first. The first step is to make sure that you are using an Azure subscription that you set up using your MSDN Azure benefits. Once signed in you can create a new virtual machine by clicking New->Compute->Virtual Machine->From Gallery. This will take you to the Azure Virtual machine gallery. The easiest way to get a list of the MSDN images is to check the little MSDN filtering checkbox as shown below.

Windows Client images in Azure image gallery

Next you need to follow the Create Virtual machine wizard and enter additional information required such as Virtual Machine name, tier, size (we pre-select the recommended size), user name and password. Please note that the user entered here refers to the administrative account that will be used to manage the server including remote desktop connection to the machine. We’ll talk about how to add a Microsoft account to use for RDP later. The image below shows the first step of the Create Virtual machine wizard

Create Windows Client VM Step 1

The second step requires you to enter information about the Cloud Service DNS name, the subscription you want to use, the Region/Affinity Group or Virtual Network the virtual machine should be provisioned into as well as the storage account and whether you want to add the virtual machine to an availability set or not. Please note: If you want a virtual machine to use a virtual network, you must specify the virtual network when you create the virtual machine. For more information, see Azure Virtual Network Overview. In the next step you can add additional endpoints to your VM and specify the internal and external port numbers as shown below.

Create Windows Client VM Step 2

The final step allows you to enable extensions such as Puppet or Chef and anti-Malware on your VM.

Create Windows Client VM Step 3

When you hit ok the virtual machine gets provisioned.

Virtual machine provisioning status in the Portal

Once the machine has been provisioned you can simply connect to the VM using remote desktop. Keep in mind that the remote desktop account is the account that you entered at the very first page of the virtual machine creation wizard.

Ok before we get to the frequently asked questions about the Windows client images let’s also have a quick look at the other create options.

In Visual Studio you can create virtual machines based on the MSDN Windows client images directly from Server Explorer or in the File/New experience of a new Web application. Similar to the portal you need to make sure that you are using an Azure subscription set up using your MSDN Azure benefits. To sign in to Azure you can click on the Microsoft Azure Icon in Server Explorer as shown below.

Connect to Azure in Visual Studio Server Explorer

This brings up the sign in dialog where you can enter your credentials. Once signed in you can simply go to Server Explorer right click on the Virtual Machine node and select Create Virtual machine. This brings up the full Create Virtual Machine Experience in Visual Studio. You can choose the MSDN category as shown in the image below and select a Windows Client image.

Create Virtual Machine from Visual Studio Server Explorer

The remaining steps are pretty much identical to the portal experience.

Another way to create a virtual machine in Visual Studio is as part of the Create new Web Application experience. File->New->Project->Web->ASP.NET Application will bring up the new ASP.NET project dialog. With Visual Studio 2013 Update 2 we added the capability to create a web site or a virtual machine as your target environment in Azure. You can make that selection in the Windows Azure section of the dialog. If you have chosen Virtual Machine you’ll see the create virtual machine in Microsoft Azure dialog pop up as shown below.

Create Virtual Machine from New Web Application

This create option is slightly different from the one in Server Explorer. We consider it the Quick Create option. As the name suggests it is meant for developers to spin dev/test VMs in Azure quickly without too much user input or configurations. As a result we only require basic user inputs such as Subscription, DNS name for the cloud service, image, size, user name and password as well as the location. One thing to point out in the Quick Create is that it also includes the option to enable IIS and Web Deploy by default. This is based on an extension and is meant for web developers to quickly spin up web server environments without additional configuration needed.

Important note: The Web Deploy extension will not enable remote web publishing to a Windows Client VM out of the box. In order to enable remote web publishing, you have to install the “IIS Deployment handler” and “Remote Agent Service” features of Web Deploy. You can install them by opening the “Programs and Features” and selecting “Change” for Microsoft Web Deploy 3.5.

Once you have provisioned the virtual machine you can use the “Connect using remote desktop” functionality in the context menu of the virtual machine in Server Explorer to connect to the VM.

The last option of creating a Windows client virtual machine, just as with any other Azure virtual machine is using Windows PowerShell. The script below creates new virtual machine based on a Windows 8.1 Enterprise image:

# Sign in azure account
Add-AzureAccount

# Select MSDN subscription if the account has multiple subscriptions
$subscriptionName = "Windows Azure MSDN - Visual Studio Ultimate"
Select-AzureSubscription $subscriptionName

# Find the latest Windows 8 images
$imageFamlyName = "Windows 8.1 Enterprise (x64)"
$win8image = Get-AzureVMImage | ? {$_.ImageFamily -eq $imageFamlyName} | Sort PublishedDate -Descending | Select-Object -First 1

# Create a new storage account
$location = "West US"
$storageAccountName = "MyWindows8Svc"
New-AzureStorageAccount -StorageAccountName $storageAccountName -Location $location -Verbose
Set-AzureSubscription -SubscriptionName $subscriptionName -CurrentStorageAccountName $storageAccountName

# Create a new cloud service
$serviceName = "MyStorageAccount"
New-AzureService -ServiceName $serviceName -Location $location -Verbose

# Create a Windows 8 VM
$vmName = "MyWindows8VM"
$credential = Get-Credential -Message "Enter username and password for the virtual machine administrator"
$username = $credential.UserName
$password = $credential.GetNetworkCredential().Password
New-AzureQuickVM -Windows -ServiceName $serviceName -name $vmName -ImageName $win8image.ImageName -AdminUsername $username -Password $password -WaitForBoot -Verbose

Now that you have seen the different ways to create a Windows client image on Azure you may wonder what you can do with it both from a Windows development perspective as well as from a licensing perspective.

We’ve collected the most common questions about these images and hope the answers provided will help you with any open questions you may have

Can I use these VMs for Windows Store development?

Yes you can use the VM for Windows Store development, however you need to create a new local domain account that is part of the administrators group as the account used for provisioning is set up as built in administrator.

Can I use these VMs for Windows Phone development?

We don’t support Windows Phone development on these VMs at this time.

Can I use these VMs for Multi-Device Development (Cordova) as announced here at TechEd?

It is possible, although you should always adhere to the licensing terms for any 3rd party software you use.

How do I use a Microsoft account to remote desktop into the VMs?

1. Remote to the machine using the default build-in admin account. Change the remote desktop connection to allow all clients (Uncheck the highlight option)

Add Microsoft Account for Remote Desktop

2. Download the rdp file and edit it in notepad. Replace prompt for credentials:i:1 with enablecredsspsupport:i:0

 

What levels of MSDN can utilize this?

All active MSDN subscribers at the following levels can set up an MSDN Azure benefit subscription or an MSDN Dev and Test Pay-As-You-Go subscription and then run Windows client VMs for development and testing:

· Visual Studio Ultimate with MSDN

· Visual Studio Premium with MSDN

· MSDN Platforms

· Visual Studio Test Professional with MSDN

· Visual Studio Professional with MSDN

Can I use these VMs for production workloads?

No, those images, and all services offered under MSDN Azure subscriptions, are only for development and testing.

Can I use these VMs under an Azure subscription other than an MSDN Azure benefit subscription?

No, you cannot.

What can I install on the VM?

You can install any software that is included in your MSDN subscription. For example, a Visual Studio Premium with MSDN subscriber can install Visual Studio Premium and Office on their VM for development or testing.

  • Explore

     

    Let us know what you think of Azure and what you would like to see in the future.

     

    Provide feedback

  • Build your cloud computing and Azure skills with free courses by Microsoft Learn.

     

    Explore Azure learning


Join the conversation