My previous blogpost shows you how to create a Visual Studio Development Virtual Machine in Azure. When you don’t have a MSDN subscription it turns out you get an exception when you create the Virtual Machine, based on the image with Visual Studio 2015, Azure SDK 2.9 and Windows 10. The exception comes up both in the portal and with PowerShell.
In the Portal
It is possible to see all Virtual Machines with Visual Studio including the Virtual Machines with Windows 10. But if you try to select the image to create a Virtual Machine, you will get the message: Looks like you need an MSDN subscription.
Of course it’s not possible in PowerShell also to create a Virtual Machine based on image VS-2015-Ent-VSU2-AzureSDK-29-W10T-N-x64. When you run my PowerShell script on a non-MSDN subscription, you will get the following exception:
New-AzureRmResourceGroupDeployment : 04:42:37 - Resource Microsoft.Compute/virtualMachines 'azurebootcamp1' failed with message 'The platform image 'MicrosoftVisualStudio:VisualStudio: VS-2015-Ent-VSU2-AzureSDK-29-W10T-N-x64:latest' is not available. Verify that all fields in the storage profile are correct.' At Deploy-VMs.ps1:29 char:5 + New-AzureRmResourceGroupDeployment -Name ((Get-ChildItem $Templat ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception + FullyQualifiedErrorId : Microsoft.Azure.Commands.Resources.NewAzureResourceGroupDeploymentCommand
The new portal does show all images with Visual Studio, both Windows 10 and Windows 2012. So it shows also the images that can’t be used to create a Virtual Machine based on the subscription.
It turns out that the classic portal shows only images that actually can be used to create a Virtual Machine. The classic portal shows Visual Studio images with Windows 2012. Not the images with Windows 10 which can’t be used.
The next step was to select a Windows 2012 image with Visual Studio in the new portal instead of a Windows 10 image. And it turns out that this works!
Now it’s a little step to do it programmatically also. Just change the parameter for the image. My previous blogpost shows how to get a list of all SKU’s with Visual Studio. The correct image for a non-msdn subscription that works for us is: VS-2015-Ent-VSU2-AzureSDK-29-WS2012R2