Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Latest commit

 

History

History

BringImageToSharedImageGallery

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Introduction

This script is used to bring a custom image from an Azure virtual machine (VM) to an Azure Compute Gallery (formerly Shared Image Gallery).

Prerequisites

Directions

  1. Open a PowerShell window.

  2. Run BringImageToSharedImageGallery.ps1. You can either pass all the required parameters when you run the script. Or, you can run the script without the parameters so that you are prompted as shown in the next bullet.

  3. When prompted, enter information about where the source VM resides and the shared image gallery where the custom image will be created. Here are some helpful tips:

    • After you provide your subscription, you will be prompted with the following question: Is this a DTL VM?. Assuming that you used an Azure VM to set up your image, you should answer No for this question.

    • The script will ask you to choose the Image Definition in Shared Image Gallery that will be used to create the custom image. You can either choose an existing image definition or you can choose to create a new one. To create a new image definition, you should choose the option Create a new resource....

    • When you create a new image definition, you will be prompted for the following information:

      The script will automatically create an an image version of 1.0.0.

    • If you select an existing image definition, the script will automatically create an image version that has the PatchVersion incremented. For example, if the previous image version is 1.0.0, the new version is 1.0.1.

For related information, refer to the following articles: