How to Create a managed image of a generalized VM in Azure
To create a managed image of a generalized VM in Azure.
Introduction:
A generalization is a process of creating custom images for a virtual machine. To create an image, all the software configurations of a virtual machine would be included in the image. By using the base image, we can create new Virtual Machines, which would have the default software configuration specified in the image.
Step 1: Log in to Azure Portal as shown in the below image
Step 2: Select your VM as shown in the below image
Step 3: Start the Virtual machine as shown in the below image
Step4: Click connect, select RDP and Download the RDP file as shown in the below image
Step 5: Open the RDP file and Enter the Username and password as shown in the below image
Step 6: Through RDP we can use windows virtual machine
Step 7: Next, now I am going to create and install some software and directory as shown in the below image.
Step 8: After Install the software’s go to run as shown in the below image. (C:\Windows\System32\Sysprep\sysprep.exe). Make sure to select Generalize and to set the Shutdown Option to Shutdown
Step 9: After the Virtual Machine has been turned off. De-allocated the Virtual Machine (select it in the Azure Portal and click Stop). After the Virtual Machine has the de-allocated status, go the Overview blade, and click Capture as shown in the below image
Step 10: Give this Capture / Image a name and select the replica details as shown in the below image.
Step 11: Select and fill the tag details and finally review and create the image as shown in the below image.
Step 12: Next go to the azure compute gallery can see your machine image as shown in the below image.
Step 13: Click the Create VM as shown in the below image.
Step 14: Enter and check the Project details Instance Details and Administration account details as shown in the below image
Step 15: Enter the Disk Details and click next as shown in the below image
Step 16: check the Networking Interface Details as shown in the below image
Step 17: Set to Default configuration in management, advanced and tags tab as shown in the below image
Step 18: Review and Click Create to create the virtual machine as shown in the below image
Step 19: The Deployment is successful
Step 20: Click connect, select RDP and Download the RDP file as shown in the below image
Step 21: Open the RDP file and Enter the Username and password as shown in the below image
Step 22: Through RDP we can use windows virtual machine
Step 23: All tests are successful now you can delete the old Virtual machines.
Step 24: Go to azure portal stop your virtual machine as shown in the below image.
Conclusion:
We have reached the end of this article. In this guide, we have walked you through the steps required to create a managed image of a generalized VM in Azure. Your feedback is much welcome.