azure-docs icon indicating copy to clipboard operation
azure-docs copied to clipboard

Copy from one shared image gallery to another shared image gallery in another subscription

Open DeepMalh44 opened this issue 3 years ago • 3 comments

Reviewing this thread again (55247 which was closed) ... anyone know if this feature is still available? if you see at the bottom of this documentation link for powershell and CLI but those links are still broken and dont show the command to copy from one SIG to another:

https://azure.microsoft.com/en-au/updates/shared-image-gallery-nov2020-features/

Copy image versions across shared image galleries

Move Shared Image Gallery image versions from one gallery by selecting an image version in another shared image gallery as the source.

Get started—Documentation, CLI, PowerShell, Portal, API, ARM template, and download the SDK.

DeepMalh44 avatar Aug 16 '22 14:08 DeepMalh44

Hello @DeepMalh44 : Can you please share the link of the actual document which you are refering ?

himanshusinha-msft avatar Aug 16 '22 18:08 himanshusinha-msft

hello @himanshusinha-msft following are the 2 links which ideally should be the links for copying of the images from one SIG to another SIG but if you see they are pointing to something else:

image

https://docs.microsoft.com/en-us/azure/virtual-machines/image-version-another-gallery-powershell

https://docs.microsoft.com/en-us/azure/virtual-machines/image-version-another-gallery-powershell

https://docs.microsoft.com/en-us/azure/virtual-machines/image-version-another-gallery-cli

DeepMalh44 avatar Aug 16 '22 18:08 DeepMalh44

@himanshusinha-msft here is the same issue from 2020: https://github.com/MicrosoftDocs/azure-docs/issues/55247

DeepMalh44 avatar Aug 16 '22 18:08 DeepMalh44

@cynthn Is this something you will be able to help with? Looks like there was a document on Copy image versions across shared image galleries as mentioned here : https://azure.microsoft.com/en-au/updates/shared-image-gallery-nov2020-features/

But the document url now point to Create an image definition and an image version

Karishma-Tiwari-MSFT avatar Aug 24 '22 01:08 Karishma-Tiwari-MSFT

I can't update the blog post to change the links, but I might be able to make the redirects go to the correct language tab instead of dumping you into portal.

The long version is that we used to have separate articles for each image "source", but it made it diluted search results and made it hard to understand exactly how to use the CLI\PowerShell syntax (it made it look super complicated). So I moved it all to a single article, and tried to show exactly how to change the source for the image in a table. All of the options for creating an image version are in the same article now.

cynthn avatar Aug 24 '22 17:08 cynthn

The articles pointed to do not answer the question about "copying an image from one shared image gallery to another". The article discusses how to copy them from one tenant's shared gallery to another tenant's shared gallery. A single subscription may have multiple galleries, say one for "dev" images and which can be published to a "prod" gallery after testing. That duplication process, or transfer if necessary, is not documented.

nkadel avatar Jul 13 '23 12:07 nkadel

It's the same process as creating any image from another image, you are just doing it between galleries. The image version ID has the full path to the resource, so you just need to specify that:

az sig image-version create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--gallery-image-version 1.0.0 \
--image-version /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/galleries/MyGallery/images/MyImageDefinition/versions/1.0.0

From: https://learn.microsoft.com/en-us/cli/azure/sig/image-version?view=azure-cli-latest#az-sig-image-version-create-examples

It's not really a "move", you would still need to delete the image from the source gallery if you didn't want it there anymore.

cynthn avatar Jul 13 '23 16:07 cynthn