Skip to content

Commit 72f7595

Browse files
Merge pull request #269871 from sandeepraichura/patch-79
Update shared-image-galleries.md
2 parents 52e2bbe + dfe86de commit 72f7595

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed

articles/virtual-machines/shared-image-galleries.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,32 @@ There are three main ways to share images an Azure Compute Gallery, depending on
139139
| RBAC + [Direct shared gallery](./share-gallery-direct.md) | Yes | Yes | Yes | Yes | No |
140140
| RBAC + [Community gallery](./share-gallery-community.md) | Yes | Yes | Yes | No | Yes |
141141

142+
## What RBAC Permissions are required to create an ACG Image:
143+
ACG images can be created by users from various sources, including virtual machines, disks/snapshots, and VHDs. The section outlines the various user permissions necessary for creating an Azure Compute Gallery image. Identifies without the necessary permissions will not be able to create ACG images.
144+
145+
### [VM as source](#tab/vmsource)
146+
- Users will require write permission on the Virtual Machine to create an ACG Image version.
147+
- For Azure SDK, use the property [properties.storageProfile.source.virtualMachineId](/rest/api/compute/gallery-image-versions/create-or-update), This property requires API version 2023-07-03 or [Version 1.4.0](https://www.nuget.org/packages/Azure.ResourceManager.Compute) (or higher) of .NET SDK
148+
### [Disk/Snapshot as Source](#tab/disksnapsource)
149+
- Users will require write permission (contributor) on the source disk/snapshot to create an ACG Image version.
150+
### [VHD as Source](#tab/vhdsource)
151+
- Users will require Microsoft.Storage/storageAccounts/listKeys/action, Microsoft.Storage/storageAccounts/write permission (contributor role) on the storage account.
152+
- For SDK, use the property [properties.storageProfile.osDiskImage.source.storageAccountId](/rest/api/compute/gallery-image-versions/create-or-update), This property requires minimum api-version 2022-03-03.
153+
### [Managed Image and Gallery Image Version as Source](#tab/managedgallerysource)
154+
- Users will require read permission on the Managed Image/Gallery Image.
155+
156+
|Source type |Permissions Required |
157+
|---|---|
158+
| Virtual machine | Write |
159+
| Disk/snapshot | Write |
160+
| VHD | Write (listKeys) |
161+
| Managed Image | Read|
162+
| Gallery Image | Read|
163+
164+
Refer to our documentation for additional information regarding [Azure built-in roles](../role-based-access-control/built-in-roles.md), for [granting RBAC permissions](../role-based-access-control/quickstart-assign-role-user-portal.md)
165+
---
166+
167+
142168
## Shallow replication
143169

144170
When you create an image version, you can set the replication mode to shallow for development and test. Shallow replication skips copying the image, so the image version is ready faster. But, it also means you can't deploy a large number of VMs from that image version. This is similar to the way that the older managed images worked.
@@ -275,24 +301,22 @@ There are two ways you can specify the number of image version replicas to be cr
275301
1. The regional replica count which specifies the number of replicas you want to create per region.
276302
2. The common replica count which is the default per region count in case regional replica count isn't specified.
277303

278-
### [Azure CLI](#tab/azure-cli)
304+
### [Azure CLI]
279305

280306
To specify the regional replica count, pass the location along with the number of replicas you want to create in that region: "South Central US=2".
281307

282308
If regional replica count isn't specified with each location, then the default number of replicas will be the common replica count that you specified.
283309

284310
To specify the common replica count in Azure CLI, use the **--replica-count** argument in the `az sig image-version create` command.
285311

286-
### [Azure PowerShell](#tab/azure-powershell)
312+
### [Azure PowerShell]
287313

288314
To specify the regional replica count, pass the location along with the number of replicas you want to create in that region, `@{Name = 'South Central US';ReplicaCount = 2}`, to the **-TargetRegion** parameter in the `New-AzGalleryImageVersion` command.
289315

290316
If regional replica count isn't specified with each location, then the default number of replicas will be the common replica count that you specified.
291317

292318
To specify the common replica count in Azure PowerShell, use the **-ReplicaCount** parameter in the `New-AzGalleryImageVersion` command.
293319

294-
---
295-
296320
### Can I create the gallery in a different location than the one for the image definition and image version?
297321

298322
Yes, it's possible. But, as a best practice, we encourage you to keep the resource group, gallery, image definition, and image version in the same location.

0 commit comments

Comments
 (0)