Creating Virtual Machine Image -Azure

This article cover creating an Azure virtual machine image from an existing Azure v2 virtual machine (VM) using PowerShell.  As of time of this article, imaging in the resource model can only be done using PowerShell. Video and script used in video below.

dv1-series-azure-02-create-and-deploy-from-image

Video:

 

Steps in the above video covers;

  • Sysprep Operating System
  • Generalize Virtual Machine
    • Put the virtual machine in a generalize state that will allowing virtual machine detail to be copied into a JSON template that can be used to deploy an identical replica of the virtual machine. Once virtual machine it generalized it cannot be used it will need to be deleted.
  • Save as Azure image
    • This creates an image of the virtual machine in the same storage account as the original virtual machine. Image includes OSdisk, Datadisk and JSON template of the virtual machine configuration for redeployment.

Script can be found on GitHub, link below;

Azure-V2-Powershell-Scripts/Create-V2VMImage.ps1

Microsoft Azure article covering some of the steps in video

https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-capture-image/

DV2 Series

http://hazelnest.com/blog/blog/tag/dv2-series/