Create Custom Image in Azure

Create Custom Image in Azure

Create Custom Image in Azure

This article this show to create custom image with desired configuration and tool sets. Microsoft Azure allows to create Windows Server templates and if you desire you create multiple VMs with pre-installed roles or applications, then you could create a new VM, deploy the roles & later sysprep the Image to save as Disk for future Deployments.

To begin with, login to your Windows Azure Portal and create a new Windows Server VM. I have created Windows Server 2012 VM and have named it sarvesh-test

Azure-Sysprep-1

 

2. Login to VM, and deploy roles / applications that you want to go as standard on all machines for next deployments. For the purpose of this article, I will be installing Desktop Experience Windows feature on the Image.

Please note that there could be certain applications that do not support sysprep and they need to be deployed after the Image is built.

Azure-Sysprep-2

 

3. Once Windows roles and applications are deployed, you would need to run Sysprep  on the Image. Go your Windows Installation directory, open Sysprep folder, and launch syspep.exe. Select the options as shown below.

Azure-Sysprep-3

 

4, Once the sysprep is complete, and Virtual Machine is in shutdown state. Go to the VM in Microsoft Azure Portal and click on Capture button.

Provide the machine name here, and some description that best defines purpose of the Image.  Don’t forget to select I have run Sysprep on the virtual machine option, this tells Azure that VM is now ready for deployments.

Azure-Sysprep-4

 

5. Once the job completes, you would see the Master Image on the Azure, as shown below.

 

Azure-Sysprep-5

 

6. Now we are ready for deploying the Virtual Machines. Use the same process to create a Virtual Machine but now instead of selecting Microsoft Images, you now go to MY IMAGES section on the left hand side frame and select the Image that was just created to deploy.

Azure-Sysprep-6

 

7.  On moving further on the wizard, proceed with the desired / normal steps to create the VM, like provide its name, Cloud Service etc., as shown below

Azure-Sysprep-7

 

8. And cloud service, Network etc.

Azure-Sysprep-8

9. Finally, deploy the VM agent and select if you need any Configuration Extensions to deploy along with VM.

Azure-Sysprep-9

10. Once the VM is deployed, you will see the Windows feature Desktop Experience that we had previously is added to the VM.

Azure-Sysprep-10

This completes the  configuration. In the next part of this Article series, you would see most of these activities using PowerShell and how to create multiple VMs along with custom software deployments after the VM is created, with some cool Automation stuff.

 

About The Author

Related posts

Leave a Reply

Your email address will not be published. Required fields are marked *