@@ -156,19 +156,17 @@ $galleryImageVersionName = "1.0.0"
156
156
$location = "eastus"
157
157
158
158
$sourceImageId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myVMRG/providers/Microsoft.Compute/virtualMachines/myVM"
159
- $diskEncryptionSetId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myVMRG/providers/Microsoft.Compute/diskEncryptionSets/cvmDiskEncryptionSet"
160
-
161
- $cvmOsDiskEncryption = @{CVMEncryptionType=EncryptedWithCmk; CVMDiskEncryptionSetID=$diskEncryptionSetId}
162
-
163
- $cvmDataDiskEncryption_lun0 = @{DiskEncryptionSetId = $diskEncryptionSetId ; Lun = 0}
164
- $cvmDataDiskEncryption = @($cvmDataDiskEncryption_lun0)
159
+ $replicaCount = 1
160
+ $storageAccountType = "Standard_ZRS"
165
161
166
- $cvmEncryption = @{OSDiskImage = $cvmOsDiskEncryption; DataDiskImages = $cvmDataDiskEncryption }
167
- $region_eastus = @{Name = 'East US';ReplicaCount = 3;StorageAccountType = 'Standard_LRS'; Encryption = $cvmEncryption }
162
+ $region_eastus = @{Name = 'East US';ReplicaCount = 3;StorageAccountType = 'Standard_LRS' }
163
+ $region_westus = @{Name = 'West US'}
168
164
$region_ukwest = @{Name = 'UK West';ReplicaCount = 2}
169
- $targetRegions = @($region_eastus, $region_ukwest)
165
+ $region_southcentralus = @{Name = 'South Central US';StorageAccountType = 'Standard_LRS'}
170
166
171
- New-AzGalleryImageVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryImageDefinitionName $galleryImageDefinitionName -Name $galleryImageVersionName -Location $location -SourceImageId $sourceImageId -ReplicaCount 1 -StorageAccountType "Standard_ZRS" -TargetRegion $targetRegions
167
+ $targetRegions = @($region_eastus, $region_westus, $region_ukwest, $region_southcentralus)
168
+
169
+ New-AzGalleryImageVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryImageDefinitionName $galleryImageDefinitionName -Name $galleryImageVersionName -Location $location -SourceImageId $sourceImageId -ReplicaCount 1 -StorageAccountType $storageAccountType -TargetRegion $targetRegions
172
170
```
173
171
174
172
Create an image version in four regions. In this example, the global replica count is 1 and the global storage account type is Standard_ZRS. East US will have 3 replicas, each stored on Standard_LRS account storage. West US will inherit from global settings and have 1 replica stored on Standard_ZRS. UK West will have a replica count of 2 stored on Standard_ZRS. South Central US will have one replica stored on Standard_LRS.
@@ -235,6 +233,33 @@ New-AzGalleryImageVersion -ResourceGroupName $rgName -GalleryName $galleryName -
235
233
236
234
This example has the end-of-life date for image version set to August 2, 2024 at mignight UTC. End-of-life dates can be specified for both the image definitions and image versions. Image versions can still be used after the end-of-life dates.
237
235
236
+ ### Example 13: Create an image version for Confidential VM
237
+
238
+ ``` powershell
239
+ $rgName = "myResourceGroup"
240
+ $galleryName = "myGallery"
241
+ $galleryImageDefinitionName = "cvmImage"
242
+ $galleryImageVersionName = "1.0.0"
243
+ $location = "North Europe"
244
+
245
+ $sourceImageId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myVMRG/providers/Microsoft.Compute/virtualMachines/myVM"
246
+ $cvmDiskEncryptionSetId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myVMRG/providers/Microsoft.Compute/diskEncryptionSets/cvmDiskEncryptionSet"
247
+ $dataDiskEncryptionSetId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myVMRG/providers/Microsoft.Compute/diskEncryptionSets/dataDiskEncryptionSet"
248
+
249
+ $cvmOsDiskEncryption = @{CVMEncryptionType=EncryptedWithCmk; CVMDiskEncryptionSetID=$cvmDiskEncryptionSetId}
250
+
251
+ $cvmDataDiskEncryption_lun0 = @{DiskEncryptionSetId = $dataDiskEncryptionSetId ; Lun = 0}
252
+ $cvmDataDiskEncryption = @($cvmDataDiskEncryption_lun0)
253
+
254
+ $cvmEncryption = @{OSDiskImage = $cvmOsDiskEncryption; DataDiskImages = $cvmDataDiskEncryption}
255
+ $region_northEurope = @{Name = 'NorthEuropeS';ReplicaCount = 3;StorageAccountType = 'Standard_LRS'; Encryption = $cvmEncryption}
256
+ $targetRegions = @($region_northEurope)
257
+
258
+ New-AzGalleryImageVersion -ResourceGroupName $rgName -GalleryName $galleryName -GalleryImageDefinitionName $galleryImageDefinitionName -Name $galleryImageVersionName -Location $location -SourceImageId $sourceImageId -ReplicaCount 1 -StorageAccountType "Standard_LRS" -TargetRegion $targetRegions
259
+ ```
260
+
261
+ In this example, Confidential VM (CVM) Image with Customer Managed Key (CMK) is created under Image definition which supports ConfidentialVM security type.
262
+
238
263
## PARAMETERS
239
264
240
265
### -AsJob
0 commit comments