Azure Arc 拡張セキュリティ更新プログラムのライセンスをプログラムによってデプロイおよび管理する

この記事では、Azure Arc ESU ARM API を使用して、拡張セキュリティ更新プログラムのライフサイクル操作Windows Serverプログラムでプロビジョニングおよび管理する手順について説明します。 手順は、Windows Server 2012/2012 R2 と Windows Server 2016 に適用されます。 記事の上部にあるセレクターを使用して、ライセンスを取得しているオペレーティング システムのバージョンを選択します。

この記事で説明する各 API コマンドについて、特定のシナリオに応じて、場所、状態、エディション、型、プロセッサの正確なパラメーター情報を入力します。 target プロパティをライセンスを取得しているオペレーティング システムに設定します。

  • Windows Server 2012
  • Windows Server 2012 R2
  • Windows Server 2016

Azure API を使用して ESU を管理するには、サービス プリンシパルを作成する必要があります。 詳細については、「ハイブリッド マシンを大規模に Azure に接続する」と「Azure REST API リファレンス」を参照してください。

ライセンスをプロビジョニングする

ライセンスをプロビジョニングするには、次のコマンドを実行します。

PUT  
https://management.azure.com/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.HybridCompute/licenses/LICENSE_NAME?api-version=2023-06-20-preview 
{  
    "location": "ENTER-REGION",  
    "properties": {  
        "licenseDetails": {  
            "state": "Activated",  
            "target": "Windows Server 2012",  
            "Edition": "Datacenter",  
            "Type": "pCore",  
            "Processors": 12  
        }  
    }  
}
PUT  
https://management.azure.com/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.HybridCompute/licenses/LICENSE_NAME?api-version=2023-06-20-preview 
{  
    "location": "ENTER-REGION",  
    "properties": {  
        "licenseDetails": {  
            "state": "Activated",  
            "target": "Windows Server 2016",  
            "Edition": "Datacenter",  
            "Type": "pCore",  
            "Processors": 12  
        }  
    }  
}

プログラムによって、Azure CLI を使用して新しいライセンスを生成し、それぞれの請求書番号を入力して、Year 1 ボリューム ライセンス エンタイトルメントで Volume License Details パラメーターを指定できます。 Azure Arc のライセンス プロビジョニングで請求書 ID (番号) を明示的に指定する必要があります。

az connectedmachine license create --license-name
                                   --resource-group
                                   [--edition {Datacenter, Standard}]
                                   [--license-type {ESU}]
                                   [--location]
                                   [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                   [--processors]
                                   [--state {Activated, Deactivated}]
                                   [--tags]
                                   [--target {Windows Server 2012, Windows Server 2012 R2}]
                                   [--tenant-id]
                                   [--type {pCore, vCore}]
                                   [--volume-license-details]

ボリューム ライセンスからの移行

ボリューム ライセンスからの移行は、Azure Arc で有効になっている Windows Server 2016 ESU ではサポートされていません。

ライセンスをリンクするには、次のコマンドを実行します。

PUT  
https://management.azure.com/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.HybridCompute/machines/MACHINE_NAME/licenseProfiles/default?api-version=2023-06-20-preview 
{
   "location": "SAME_REGION_AS_MACHINE",
   "properties": {
      "esuProfile": {
         "assignedLicense": "RESOURCE_ID_OF_LICENSE"
      }
   }
}

ライセンスのリンクを解除するには、次のコマンドを実行します。

PUT 
https://management.azure.com/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.HybridCompute/machines/MACHINE_NAME/licenseProfiles/default?api-version=2023-06-20-preview
{
  "location": "SAME_REGION_AS_MACHINE",
  "properties": {
    "esuProfile": {
    }
  }
}

ライセンスを変更する

ライセンスを変更するには、次のコマンドを実行します。

PUT/PATCH 
https://management.azure.com/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.HybridCompute/licenses/LICENSE_NAME?api-version=2023-06-20-preview 
{  
    "location": "ENTER-REGION",  
    "properties": {  
        "licenseDetails": {  
            "state": "Activated",  
            "target": "Windows Server 2012",  
            "Edition": "Datacenter",  
            "Type": "pCore",  
            "Processors": 12  
        }  
    }  
}
PUT/PATCH 
https://management.azure.com/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.HybridCompute/licenses/LICENSE_NAME?api-version=2023-06-20-preview 
{  
    "location": "ENTER-REGION",  
    "properties": {  
        "licenseDetails": {  
            "state": "Activated",  
            "target": "Windows Server 2016",  
            "Edition": "Datacenter",  
            "Type": "pCore",  
            "Processors": 12  
        }  
    }  
}

ライセンスを削除するには、次のコマンドを実行します。

DELETE  
https://management.azure.com/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.HybridCompute/licenses/LICENSE_NAME?api-version=2023-06-20-preview