Compute Gallery


The presented resiliency recommendations in this guidance include Compute Gallery and dependent resources and settings.

Summary of Recommendations

Recommendations Details

CG-1 - 運用イメージ・バージョン用に少なくとも3つのレプリカを保持する必要があります

Category: Availability

Impact: Medium

Guidance

運用イメージ用に少なくとも 3 つのレプリカを保持します。 複数 VM デプロイのシナリオでは、VM デプロイを異なるレプリカに分散できるため、1 つのレプリカの過負荷によってインスタンス作成処理が調整される可能性が低くなります。同時に作成する 20 台の VM ごとに、1 つのレプリカを保持することをお勧めします。たとえば、1,000 個の VM を同時に作成する場合は、50 個のレプリカを保持する必要があります (リージョンごとに最大 50 個のレプリカを持つことができます)。レプリカ数を更新するには、ギャラリー -> イメージ定義 -> イメージ バージョン -> レプリケーションの更新 に移動してください。

Resources

Resource Graph Query

// Azure Resource Graph Query
// Query to list all image versions,its associated image name and version replica configurations per region in a compute gallery whose version replicas is less than 3
resources
| where type =~ "microsoft.compute/galleries/images/versions"
| extend GalleryName = tostring(split(tostring(id), "/")[8]), ImageName = tostring(split(tostring(id), "/")[10])
| mv-expand VersionReplicas = properties.publishingProfile.targetRegions
| project RecommendationId="cg-1",name,id,tags,param1=strcat("GalleryName: ",GalleryName),param2=strcat("ImageName: ",ImageName),param3=strcat("VersionReplicaRegionName: ",VersionReplicas.name),param4=strcat("VersionReplicationCount: ",VersionReplicas.regionalReplicaCount),rc=toint(VersionReplicas.regionalReplicaCount)
| where rc < 3
| project-away rc



CG-2 - イメージ バージョンにゾーン冗長ストレージを使用する必要があります

Category: Availability

Impact: Medium

Guidance

高可用性のために、使用可能な場合は常に ZRS を使用します。ZRS は、イメージまたは VM アプリケーションのバージョンを作成するときに、 レプリケーション タブで構成できます。Azure Zone 冗長ストレージ (ZRS) は、リージョン内の可用性ゾーンの障害に対する回復性を提供します。Azure Compute Gallery の一般提供開始に伴い、Availability Zones のあるリージョン の ZRS アカウントにイメージを格納することを選択できます。 また、対象地域ごとにアカウントの種類を選択することもできます。既定のストレージ アカウントの種類は Standard_LRS ですが、Availability Zones があるリージョンでは Standard_ZRS を選択することをお勧めします。

Resources

Resource Graph Query

// Azure Resource Graph Query
// Query to list all image versions and its associated image and gallery name whose Storage account type is not using ZRS
resources
| where type =~ "microsoft.compute/galleries/images/versions"
| extend GalleryName = tostring(split(tostring(id), "/")[8]), ImageName = tostring(split(tostring(id), "/")[10])
| extend StorageAccountType = tostring(properties.publishingProfile.storageAccountType)
| where StorageAccountType !has "ZRS"
| project RecommendationId="cg-2",name,id,tags,param1=strcat("GalleryName: ",GalleryName),param2=strcat("ImageName: ",ImageName),param3=strcat("StorageAccountType: ",StorageAccountType)



CG-3 - 可能な場合は、TrustedLaunchSupported イメージの作成を検討してください

Category: Access & Security

Impact: Low

Guidance

セキュア ブート、vTPM、トラステッド起動 VM、大容量ブート ボリュームなどの機能を利用するために、トラステッド起動でサポートされているイメージを作成することをお勧めします。トラステッド起動でサポートされるイメージは、デフォルトで Gen 2 イメージです。仮想マシンの作成後に仮想マシンの世代を変更することはできません。したがって、最初に考慮事項を確認することをお勧めします。

Resources

Resource Graph Query

// Azure Resource Graph Query
// Query to list all images whose Hyper-V generation is not V2
resources
| where type =~ "microsoft.compute/galleries/images"
| extend VMGeneration = properties.hyperVGeneration
| where VMGeneration <> 'V2'
| project RecommendationId="cg-3",name,id,tags,param1=strcat("VMGeneration: ",VMGeneration)