Windows Server 订阅是通过 Azure 在群集上获取无限虚拟化权利的一种方式。 启用 Azure 混合权益后,可以选择打开 Windows Server 订阅,这不会产生额外的成本。
若要启用 Windows Server 订阅且不产生额外的成本,请在同一“配置”窗格中的 Windows Server 订阅附加功能下,选择“激活权益”。
在右侧的“激活 Azure 混合权益”窗格中检查详细信息,然后选择“激活”以确认。 激活后,需要花费几分钟时间在群集上应用许可证并设置自动 VM 激活 (AVMA)。
设置订阅、资源组、群集名称的参数
$subscription = "00000000-0000-0000-0000-000000000000" # Replace with your subscription ID
$resourceGroup = "hcicluster-rg" # Replace with your resource group name
$clusterName = "HCICluster" # Replace with your cluster name
Set-AzContext -Subscription "${subscription}"
若要查看群集上的 Azure 混合权益状态,请运行以下命令:
Install-Module -Name Az.ResourceGraph
Search-AzGraph -Query "resources | where type == 'microsoft.azurestackhci/clusters'| where name == '${clusterName}' | project id, properties['softwareAssuranceProperties']['softwareAssuranceStatus']"
subscription="00000000-0000-0000-0000-000000000000" # Replace with your subscription ID
resourceGroup="hcicluster-rg" # Replace with your resource group name
clusterName="HCICluster" # Replace with your cluster name
az account set --subscription "${subscription}"
若要查看群集上的 Azure 混合权益状态,请运行以下命令:
az stack-hci cluster list \
--resource-group "${resourceGroup}" \
--query "[?name=='${clusterName}'].{Name:name, SoftwareAssurance:softwareAssuranceProperties.softwareAssuranceStatus}" \
-o table
Install-Module -Name Az.ResourceGraph
Search-AzGraph -Query "resources | where type == 'microsoft.azurestackhci/clusters'| where name == '${clusterName}' | project id, properties['softwareAssuranceProperties']['softwareAssuranceStatus']"
az extension add --name resource-graph
az graph query -q "resources | where type == 'microsoft.azurestackhci/clusters'| where name == '${clusterName}' | project id, properties['softwareAssuranceProperties']['softwareAssuranceStatus']"
Install-Module -Name Az.ResourceGraph
Connect-AzAccount -Environment $EnvironmentName -Subscription $subId
Search-AzGraph -Query "Resources | where type == 'microsoft.azurestackhci/clusters' | where properties['softwareAssuranceProperties']['softwareAssuranceStatus'] == 'Enabled' | project id, properties['softwareAssuranceProperties']['softwareAssuranceStatus']"
az extension add --name resource-graph
az graph query -q "Resources | where type == 'microsoft.azurestackhci/clusters' | where properties['softwareAssuranceProperties']['softwareAssuranceStatus'] == 'Enabled' | project id, properties['softwareAssuranceProperties']['softwareAssuranceStatus']"