Creating virtual machines using virtual machine image
Creating virtual machines using virtual machine image requires you to specify either an existing operating system disk, or a virtual machine image. Virtual machine images have different provisioning settings depending on whether the source image is Windows or Linux-based. That being said, a signiicant portion of the coniguration options will be the same regardless of the operating system type. Within the management portal, you select the image name from the Gallery view, as Figure 1 shows.
Using the Azure PowerShell cmdlets you can enumerate the available images using the Get-AzureVMImage cmdlet. This cmdlet will return all of the image information that is available (including some images that do not appear in the management portal). It can be quite overwhelming without applying some basic filters.
To only return images available for the Windows Server 2012 R2 Datacenter family, you can filter on the $_.ImageFamily property, as shown in the following example and Figure 2.
$imageFamily = “Windows Server 2012 R2 Datacenter”
Get-AzureVMImage | where { $_.ImageFamily -eq $imageFamily }
The Azure PowerShell cmdlets use the ImageName property to specify the image to use during creation. You can take the previous example one step further by sorting the PublishedDate in descending order, and then select the ImageName to only return the latest ImageName for the requested image family as shown in the following example and Figure 3.
$imageFamily = “Windows Server 2012 R2 Datacenter”
$imageName = Get-AzureVMImage |
where { $_.ImageFamily -eq $imageFamily } |
sort PublishedDate -Descending |
select -ExpandProperty ImageName -First 1
When the image name has been determined, it is passed to the New-AzureQuickVM, or the New-AzureVMConig cmdlet with the ImageName parameter
This article is a part of 70-533 Implementing Microsoft Azure Infrastructure Solutions Prep course.
More Articles included in this course are

Creating an Azure website
Read More

Deployment slots in Azure website
Read More

Publishing an Azure website
Read More

WebJobs in Azure website
Read More

Azure website settings
Read More
Practice Tests in this course are

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 1
Read More

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 2
Read More

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 3
Read More

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 4
Read More

70-533 Implementing Microsoft Azure Infrastructure Solutions Practice Test 5
Read More
You must log in to post a comment.