Windows Azure VMImages & Updates to CloneVM PowerShell script


The following blog introduces Windows Azure VMImages introduced recently @build 2014 and updates made to the CloneVM blog.

Build 2014 has been a real exciting event for Azure users and developers with lots of exciting updates and new features. Here I’m going to publish few details about new extension\switch to Save-AzureVMImage Azure PowerShell script.

Azure VM Images.

Remember Azure Images? An Azure Image is a SysPrep’ed OS image which can be used to deploy identical VMs for scaling up/down your deployment environment. Similarly we also have Windows Azure Disks, but unlike images disks are ready to deploy entities, a disk can be used to deploy a copy (or a snapshot) of existing Virtual Machines. Hmmm….now the real big question is, what about data disks attached to each VM?

Azure VM Images answers this question with a new switch to Save-AzureVMImage, the switch is called OSState. There are two options for this switch Generalized & Specialized.

A Generalized AzureVMImage is an image capture (or sysprep’ed for windows) of a running VM along with all the data disks attached to the VM. Generalized VMImages are similar to Azure Images feature we have today with an addition of capturing data disks as well, using generalized VMImage we can deploy N Identical Virtual Machines. It’s kind of template\model which can be re-used for scaling out your Front-End or Back-End Web Servers.

A Specialized AzureVMImage is a capture of VM which is already running along with the data disks. It is similar to the Azure-Disk feature we have today. Specialized VMImage can be used to take a snapshot of the existing VM which can be restored later. We can provision a new VM using specialized VMImage only once.

The below pictures presents the new features available with Save-AzureVMImage.

clip_image002

Here is how a Generalized/Specialized VMImage can be captured using Azure PowerShell.

clip_image003

Once the image is created the procedure to create a VM (quickVM or using AzureConfig) using powershell is still the same as shown in the below picture.

clip_image004

Updates to CloneVM PowerShell script.

Thanks to the developers for coming up with such a beautiful update, now my CloneVM scripts looks more compact and simple.

Unfortunately VMImages do not capture the Endpoints from the source VM, my script still needs to collect the endpoints information from the source VM and recreate them on the new cloned VM.

Here is the updated CloneVM, marked as CloneVM_V1.1.

Happy Coding !!