create an image based on the VM and image needs to be stored in the azured shared image gallery

Vedanth Pulipati 241 Reputation points
2022-01-13T07:11:40.907+00:00

i am trying to create an image based on the vm and to store the image in the shared compute gallery. from the docs i got the azure cli command to create an image but it's storing in the azure gallery.is there any cli command to store the image into the shared image gallery

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,305 questions
0 comments No comments
{count} votes

Accepted answer
  1. KarishmaTiwari-MSFT 18,642 Reputation points Microsoft Employee
    2022-01-13T08:40:43.897+00:00

    There are 3 scenarios based on the types of images you may have.

    Scenario 1: If you have a managed image, then you can create an image definition and image version from it. For more information, see Create and image definition and an image version.

    Scenario 2: If you have an unmanaged image, you can create a managed image from it, and then create an image definition and image version from it.

    Scenario 3: If you have a VHD in your local file system, then you need to upload the VHD to a managed image, then you can create an image definition and image version from it.

    If the VHD is of a Windows VM, see Upload a VHD.
    If the VHD is for a Linux VM, see Upload a VHD

    -You can also create an image of a VM via Azure portal and then store it in Shared image gallery by following the steps provided in this documentation:
    https://learn.microsoft.com/en-us/azure/virtual-machines/capture-image-portal

    Let me know if you have further questions. Thanks.

    164619-image.png

    0 comments No comments

0 additional answers

Sort by: Most helpful