本文說明如何在布建新的虛擬機 (VM) 或虛擬機擴展集時啟用元數據安全性通訊協定 (MSP) 功能。
先決條件
使用 MSP 部署 VM
使用 ARM 範本
若要透過 Azure Resource Manager 範本部署具有 MSP 的 VM(ARM 樣本),請更新 proxyAgentSettings
並確定最低 API 版本為 2024-03-01
。 請參閱 ARM範例。
使用 REST API
若要使用 REST API,請如往常一樣部署 VM,但也會套用 MSP 設定。 以下是參考連結 進階配置的範例:
https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{virtualMachine-Name}?api-version=2024-03-01
{
"name": "GPAWinVM",
"location": "centraluseuap",
"properties": {
...
...
"securityProfile": {
"proxyAgentSettings": {
"enabled": true,
"keyIncarnationId": 0,
"wireServer": {
"inVMAccessControlProfileReferenceId": "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{wireServerProfileName}/versions/{version}"
},
"imds": {
"inVMAccessControlProfileReferenceId": "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{imdsProfileName}/versions/{version}"
}
}
},
}
}
驗證連結的規則
部署 VM 之後,請驗證已將連結的規則套用至您的 VM。 新布建 VM 中此驗證的步驟與 現有 VM 的步驟相同。
使用 MSP 部署虛擬機規模設定組
針對虛擬機擴展集使用相同的步驟,會將 MSP 套用至該擴展集內的每個 VM。