High-level steps to automate custom image using image builder

Varma 1,495 Reputation points
2024-02-01T16:02:47.55+00:00

I have images you can see below in the build gallery, We frequently create a VM from existing image and then install software's and we prepare new custom image and it goes on. I would like to use Azure Image builder for automating this process. I am really not sure where to start, could you please provide high-level detailed steps to achieve that. User's image

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. v-vvellanki-MSFT 4,920 Reputation points Microsoft External Staff
    2024-02-05T05:20:50.76+00:00

    Hi @Varma , Thanks for contacting Microsoft Q&A platform.
    Using Azure Image Builder to automate the process of creating custom VM images can greatly streamline your workflow. Below are high-level steps to get you started: 1. Prepare Your VM Configuration:
    ·  Make sure your VM configuration is ready with the necessary software and configurations.
    ·  Ensure that the VM is generalized using Sysprep or a similar tool to remove unique information.
    2. Create a Shared Image Gallery (Optional):
    ·  If you haven't already, create a Shared Image Gallery in Azure, which is a repository for storing and managing VM images.
    3. Set up Azure Image Builder Service:
    ·  Navigate to the Azure portal.
    ·  In the left sidebar, go to "Create a resource" and search for "Image Builder Template".
    ·  Create a new Image Builder Template resource.
    4. Configure the Image Builder Template:
    ·  Define the source image: Specify the image reference, either from the Shared Image Gallery or a managed image.
    ·  Define customization: Add customizations using an image template. ·  You can use Custom Script Extension or other built-in customizers.
    ·  Specify the scripts or configurations to be applied during image creation. 5. Define Image Template:
    ·  Create an Azure Image Template that defines the customization steps. ·  Specify the source image and add customizations, such as installing software, configuring settings, etc.
    6. Configure Image Build: ·  In the Image Builder Template, configure the image build settings. ·   Specify the output destination, which could be a Shared Image Gallery or a managed image.
    7. Run Image Build:
    ·  Trigger the image build process either through the Azure portal, Azure CLI, or Azure PowerShell. ·  Monitor the build process in the Azure portal or using Azure Monitor. 8. Review and Deploy the Custom Image: ·  Once the image build is complete, review the image in the specified destination.
    ·  Deploy VMs using the custom image to validate its correctness.

    Hope this helps you.

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.