From 46a4835d869bddaa95192b900ad829b4ae617cb4 Mon Sep 17 00:00:00 2001 From: Shawn Meyer Date: Thu, 9 Feb 2023 08:51:55 -0500 Subject: [PATCH 1/4] updated to include new features --- .../galleries/images/deploy.bicep | 33 ++++++++++++++++++- .../galleries/images/readme.md | 2 ++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/modules/Microsoft.Compute/galleries/images/deploy.bicep b/modules/Microsoft.Compute/galleries/images/deploy.bicep index 481938a446..1b458a2c1e 100644 --- a/modules/Microsoft.Compute/galleries/images/deploy.bicep +++ b/modules/Microsoft.Compute/galleries/images/deploy.bicep @@ -74,6 +74,20 @@ param hyperVGeneration string = '' ]) param securityType string = 'Standard' +@description('Optional. The image will support hybernation.') +@allowed([ + 'true' + 'false' +]) +param isHibernateSupported string = 'false' + +@description('Optional. The image supports accelerated Networking.') +@allowed([ + 'true' + 'false' +]) +param isAcceleratedNetworkSupported string = 'false' + @description('Optional. The description of this gallery Image Definition resource. This property is updatable.') param imageDefinitionDescription string = '' @@ -152,7 +166,24 @@ resource image 'Microsoft.Compute/galleries/images@2022-03-03' = { name: 'SecurityType' value: securityType } - ] : null + { + name: 'IsAcceleratedNetworkingSupported' + value: isAcceleratedNetworkSupported + } + { + name: 'IsHibernateSupported' + value: isHibernateSupported + } + ] : [ + { + name: 'IsAcceleratedNetworkingSupported' + value: isAcceleratedNetworkSupported + } + { + name: 'IsHibernateSupported' + value: isHibernateSupported + } + ] description: imageDefinitionDescription eula: eula privacyStatementUri: privacyStatementUri diff --git a/modules/Microsoft.Compute/galleries/images/readme.md b/modules/Microsoft.Compute/galleries/images/readme.md index 71507eab18..0b4a36ff35 100644 --- a/modules/Microsoft.Compute/galleries/images/readme.md +++ b/modules/Microsoft.Compute/galleries/images/readme.md @@ -40,6 +40,8 @@ This module deploys an Image Definition in a Shared Image Gallery. | `excludedDiskTypes` | array | `[]` | | List of the excluded disk types. E.g. Standard_LRS. | | `hyperVGeneration` | string | `''` | `['', V1, V2]` | The hypervisor generation of the Virtual Machine.

* If this value is not specified, then it is determined by the securityType parameter.

* If the securityType parameter is specified, then the value of hyperVGeneration will be V2, else V1.

| | `imageDefinitionDescription` | string | `''` | | The description of this gallery Image Definition resource. This property is updatable. | +| `isAcceleratedNetworkSupported` | string | `'false'` | `[false, true]` | The image supports accelerated Networking. | +| `isHibernateSupported` | string | `'false'` | `[false, true]` | The image will support hybernation. | | `location` | string | `[resourceGroup().location]` | | Location for all resources. | | `maxRecommendedMemory` | int | `16` | | The maximum amount of RAM in GB recommended for this image. | | `maxRecommendedvCPUs` | int | `4` | | The maximum number of the CPU cores recommended for this image. | From 77bca13bad31290a915874dfe065285e982fb91c Mon Sep 17 00:00:00 2001 From: Shawn Meyer Date: Thu, 9 Feb 2023 09:24:47 -0500 Subject: [PATCH 2/4] added tests --- .../galleries/.test/common/deploy.test.bicep | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/modules/Microsoft.Compute/galleries/.test/common/deploy.test.bicep b/modules/Microsoft.Compute/galleries/.test/common/deploy.test.bicep index 56e6527ecf..42e37a08e5 100644 --- a/modules/Microsoft.Compute/galleries/.test/common/deploy.test.bicep +++ b/modules/Microsoft.Compute/galleries/.test/common/deploy.test.bicep @@ -91,6 +91,52 @@ module testDeployment '../../deploy.bicep' = { ] sku: '2022-datacenter-azure-edition' } + { + hyperVGeneration: 'V2' + isHibernateSupported: 'true' + maxRecommendedMemory: 16 + maxRecommendedvCPUs: 8 + minRecommendedMemory: 4 + minRecommendedvCPUs: 2 + name: '<>-az-imgd-ws-003' + offer: 'WindowsServer' + osState: 'Generalized' + osType: 'Windows' + publisher: 'MicrosoftWindowsServer' + roleAssignments: [ + { + roleDefinitionIdOrName: 'Reader' + principalIds: [ + nestedDependencies.outputs.managedIdentityPrincipalId + ] + principalType: 'ServicePrincipal' + } + ] + sku: '2022-datacenter-azure-edition-hibernate' + } + { + hyperVGeneration: 'V2' + isAcceleratedNetworkSupported: 'true' + maxRecommendedMemory: 16 + maxRecommendedvCPUs: 8 + minRecommendedMemory: 4 + minRecommendedvCPUs: 2 + name: '<>-az-imgd-ws-004' + offer: 'WindowsServer' + osState: 'Generalized' + osType: 'Windows' + publisher: 'MicrosoftWindowsServer' + roleAssignments: [ + { + roleDefinitionIdOrName: 'Reader' + principalIds: [ + nestedDependencies.outputs.managedIdentityPrincipalId + ] + principalType: 'ServicePrincipal' + } + ] + sku: '2022-datacenter-azure-edition-accnet' + } { hyperVGeneration: 'V2' securityType: 'TrustedLaunch' From dcf44eab0bea949fd5b447bcc5ea0e725f6bf572 Mon Sep 17 00:00:00 2001 From: Shawn Meyer Date: Thu, 9 Feb 2023 10:12:33 -0500 Subject: [PATCH 3/4] fixed parameter name --- .../galleries/images/deploy.bicep | 4 +- modules/Microsoft.Compute/galleries/readme.md | 92 +++++++++++++++++++ 2 files changed, 94 insertions(+), 2 deletions(-) diff --git a/modules/Microsoft.Compute/galleries/images/deploy.bicep b/modules/Microsoft.Compute/galleries/images/deploy.bicep index 1b458a2c1e..93341fddea 100644 --- a/modules/Microsoft.Compute/galleries/images/deploy.bicep +++ b/modules/Microsoft.Compute/galleries/images/deploy.bicep @@ -167,7 +167,7 @@ resource image 'Microsoft.Compute/galleries/images@2022-03-03' = { value: securityType } { - name: 'IsAcceleratedNetworkingSupported' + name: 'IsAcceleratedNetworkSupported' value: isAcceleratedNetworkSupported } { @@ -176,7 +176,7 @@ resource image 'Microsoft.Compute/galleries/images@2022-03-03' = { } ] : [ { - name: 'IsAcceleratedNetworkingSupported' + name: 'IsAcceleratedNetworkSupported' value: isAcceleratedNetworkSupported } { diff --git a/modules/Microsoft.Compute/galleries/readme.md b/modules/Microsoft.Compute/galleries/readme.md index edc139095f..3e2105c116 100644 --- a/modules/Microsoft.Compute/galleries/readme.md +++ b/modules/Microsoft.Compute/galleries/readme.md @@ -220,6 +220,52 @@ module galleries './Microsoft.Compute/galleries/deploy.bicep' = { ] sku: '2022-datacenter-azure-edition' } + { + hyperVGeneration: 'V2' + isHibernateSupported: 'true' + maxRecommendedMemory: 16 + maxRecommendedvCPUs: 8 + minRecommendedMemory: 4 + minRecommendedvCPUs: 2 + name: '<>-az-imgd-ws-003' + offer: 'WindowsServer' + osState: 'Generalized' + osType: 'Windows' + publisher: 'MicrosoftWindowsServer' + roleAssignments: [ + { + principalIds: [ + '' + ] + principalType: 'ServicePrincipal' + roleDefinitionIdOrName: 'Reader' + } + ] + sku: '2022-datacenter-azure-edition-hibernate' + } + { + hyperVGeneration: 'V2' + isAcceleratedNetworkSupported: 'true' + maxRecommendedMemory: 16 + maxRecommendedvCPUs: 8 + minRecommendedMemory: 4 + minRecommendedvCPUs: 2 + name: '<>-az-imgd-ws-004' + offer: 'WindowsServer' + osState: 'Generalized' + osType: 'Windows' + publisher: 'MicrosoftWindowsServer' + roleAssignments: [ + { + principalIds: [ + '' + ] + principalType: 'ServicePrincipal' + roleDefinitionIdOrName: 'Reader' + } + ] + sku: '2022-datacenter-azure-edition-accnet' + } { hyperVGeneration: 'V2' maxRecommendedMemory: 16 @@ -338,6 +384,52 @@ module galleries './Microsoft.Compute/galleries/deploy.bicep' = { ], "sku": "2022-datacenter-azure-edition" }, + { + "hyperVGeneration": "V2", + "isHibernateSupported": "true", + "maxRecommendedMemory": 16, + "maxRecommendedvCPUs": 8, + "minRecommendedMemory": 4, + "minRecommendedvCPUs": 2, + "name": "<>-az-imgd-ws-003", + "offer": "WindowsServer", + "osState": "Generalized", + "osType": "Windows", + "publisher": "MicrosoftWindowsServer", + "roleAssignments": [ + { + "principalIds": [ + "" + ], + "principalType": "ServicePrincipal", + "roleDefinitionIdOrName": "Reader" + } + ], + "sku": "2022-datacenter-azure-edition-hibernate" + }, + { + "hyperVGeneration": "V2", + "isAcceleratedNetworkSupported": "true", + "maxRecommendedMemory": 16, + "maxRecommendedvCPUs": 8, + "minRecommendedMemory": 4, + "minRecommendedvCPUs": 2, + "name": "<>-az-imgd-ws-004", + "offer": "WindowsServer", + "osState": "Generalized", + "osType": "Windows", + "publisher": "MicrosoftWindowsServer", + "roleAssignments": [ + { + "principalIds": [ + "" + ], + "principalType": "ServicePrincipal", + "roleDefinitionIdOrName": "Reader" + } + ], + "sku": "2022-datacenter-azure-edition-accnet" + }, { "hyperVGeneration": "V2", "maxRecommendedMemory": 16, From 635979aa577e1f6ac93ce0619d0e90c04b225718 Mon Sep 17 00:00:00 2001 From: Shawn Meyer Date: Thu, 9 Feb 2023 10:22:34 -0500 Subject: [PATCH 4/4] updated description on accelerated networking --- modules/Microsoft.Compute/galleries/images/deploy.bicep | 8 ++++++-- modules/Microsoft.Compute/galleries/images/readme.md | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/Microsoft.Compute/galleries/images/deploy.bicep b/modules/Microsoft.Compute/galleries/images/deploy.bicep index 93341fddea..c8f86ba523 100644 --- a/modules/Microsoft.Compute/galleries/images/deploy.bicep +++ b/modules/Microsoft.Compute/galleries/images/deploy.bicep @@ -74,14 +74,18 @@ param hyperVGeneration string = '' ]) param securityType string = 'Standard' -@description('Optional. The image will support hybernation.') +@description('Optional. The image will support hibernation.') @allowed([ 'true' 'false' ]) param isHibernateSupported string = 'false' -@description('Optional. The image supports accelerated Networking.') +@description('''Optional. The image supports accelerated networking. +Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, greatly improving its networking performance. +This high-performance path bypasses the host from the data path, which reduces latency, jitter, and CPU utilization for the +most demanding network workloads on supported VM types. +''') @allowed([ 'true' 'false' diff --git a/modules/Microsoft.Compute/galleries/images/readme.md b/modules/Microsoft.Compute/galleries/images/readme.md index 0b4a36ff35..914b3fe7c1 100644 --- a/modules/Microsoft.Compute/galleries/images/readme.md +++ b/modules/Microsoft.Compute/galleries/images/readme.md @@ -40,8 +40,8 @@ This module deploys an Image Definition in a Shared Image Gallery. | `excludedDiskTypes` | array | `[]` | | List of the excluded disk types. E.g. Standard_LRS. | | `hyperVGeneration` | string | `''` | `['', V1, V2]` | The hypervisor generation of the Virtual Machine.

* If this value is not specified, then it is determined by the securityType parameter.

* If the securityType parameter is specified, then the value of hyperVGeneration will be V2, else V1.

| | `imageDefinitionDescription` | string | `''` | | The description of this gallery Image Definition resource. This property is updatable. | -| `isAcceleratedNetworkSupported` | string | `'false'` | `[false, true]` | The image supports accelerated Networking. | -| `isHibernateSupported` | string | `'false'` | `[false, true]` | The image will support hybernation. | +| `isAcceleratedNetworkSupported` | string | `'false'` | `[false, true]` | The image supports accelerated networking.

Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, greatly improving its networking performance.

This high-performance path bypasses the host from the data path, which reduces latency, jitter, and CPU utilization for the

most demanding network workloads on supported VM types.

| +| `isHibernateSupported` | string | `'false'` | `[false, true]` | The image will support hibernation. | | `location` | string | `[resourceGroup().location]` | | Location for all resources. | | `maxRecommendedMemory` | int | `16` | | The maximum amount of RAM in GB recommended for this image. | | `maxRecommendedvCPUs` | int | `4` | | The maximum number of the CPU cores recommended for this image. |