Saturday 1 September 2018


What is the best way to create a reusable Azure Virtual Machine Image?

https://serverfault.com/questions/726921/what-is-the-best-way-to-create-a-reusable-azure-virtual-machine-image


The best way to create an image is to use Powershell, the command is easy and straight forward:
Save-AzureVMImage -ServiceName "service-name" -Name "VM-name" -ImageName "image-name" -Osstate "Generalized/Specialized" -Verbose
Be careful about the Osstate option, if you want to create a template, you can choose Generalized, it will delete the existing vm and create a template image. If you want to create a snapshot image, you can choose Specialized, it will keep the existing vm and create an image -- it's just like the checkpoint in Hyper-V.

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