適用於:Azure Local 2311.2 和更新版本
本文說明如何收集記錄,並針對 Azure Arc 所啟用的 Azure 本機虛擬機(VM)問題進行疑難解答。它也會列出 Azure 本機 VM 管理的目前限制和已知問題,以及建議的解決方案。
此操作不支援屬性
錯誤:
Property '<Property Name>' isn't supported for this operation on your Azure Local cluster version. Please update your cluster if you want to set this property for this operation. Please view aka.ms/hciproperties.
原因:
當您嘗試使用的功能不適用於在 Azure 本機實例上執行的軟體版本時,就會發生此錯誤。 如果您的叢集上的軟體版本已過期,或功能是在更新版本中引進,就可能發生此情況。
解析度:
若要解決此問題,請將您的 Azure 本機實例更新為最新版本。 如需詳細資訊,請參閱 透過PowerShell更新 或 透過 Azure 入口網站更新。
叢集延伸模組不支援資源類型
錯誤:
The cluster extension '<Cluster Extension Azure Resource Manager ID>' doesn't support resource type 'Microsoft.AzureStackHCI/<Resource Type>'. The currently enabled resource types are '<Supported Resource Type Names>'. Please ensure the 'Microsoft.AzureStackHCI' cluster extension version metadata file supports the resource type. [ClusterExtensionVersion='<Cluster Extension Version>'] [CorrelationId='<Correlation ID>'].
原因:
當您嘗試使用的功能不適用於在 Azure 本機實例上執行的軟體版本時,就會發生此錯誤。 如果您的叢集上的軟體版本已過期,或功能是在更新版本中引進,就可能發生此情況。
解析度:
若要解決此問題,請將您的 Azure 本機實例更新為最新版本。 如需詳細資訊,請參閱 透過PowerShell更新 或 透過 Azure 入口網站更新。
無法選擇映像以啟動受信任的 VM
Azure 本機 VM 的信任啟動目前僅支援一組選取的 Azure Marketplace 映射。 如需支援的映射清單,請參閱 客體作系統映像。 當您在 Azure 入口網站中建立受信任的啟動 VM 時,[映射] 下拉式清單只會顯示 [信任啟動] 支援的映像。 如果您選取不支援的映像,則 [影像] 下拉式清單會顯示空白,包括自定義映像。 如果受信任的啟動不支援 Azure 本機系統上可用的映像,清單也會顯示為空白。
嘗試啟用來賓管理時失敗
試著執行 命令以啟用來賓管理時,您會看到下列錯誤:
錯誤:Deployment failed. Correlation ID: aaaa0000-bb11-2222-33cc-444444dddddd. VM Spec validation failed for guest agent provisioning: Invalid managed identity. A system-assigned managed identity must be enabled in parent resource: Invalid Configuration
此失敗是因為未為此 VM 建立受控識別。 需要系統指派的管理識別才能啟用訪客管理。
解析度:
請遵循下列步驟來確認未為此 VM 建立受控識別,然後啟用系統指派的受控識別。
在 Azure 入口網站中,前往虛擬機器。 流覽至 [ 概觀 ] 頁面。 在 [ 屬性] 索引標籤的 [ 設定] 底下, [來賓管理 ] 應該會顯示為 [已停用]。 從右上角選取 [JSON 檢視 ]。
在
Identity
參數下,type
應該顯示為None
。若要建立受控識別,請透過遠端桌面通訊協定 (RDP) 連線到 Azure 本機電腦。 執行以下命令:
az extension add --name connectedmachine
確認系統上已安裝連接的機器 CLI 擴充功能。 以下是已成功安裝延伸模組的範例輸出。
connectedmachine
表示已安裝 0.7.0 版。[v-hostl]: PS C:\Clusterstorage\lnfrastructure_l\ArcHci> az version { "azure-cli": "2.53.0", "azure-cli-core": "2.53.0", "azure-cli-telemetry": "1.1.0", "extensions": { "akshybrid": "0.1.1", "arcappliance"^ "1.0.2", "connectedk8s": "1.5.4", "connectedmachine": "0.7.0", "customlocation": "0.1.3", "hybridaks": "0.2.4", "k8s-extension": "1.4.5", "stack-hci-vm": "0.1.8" } } [v-hostl]: PS C:\ClusterStorage\Infrastructure_l\ArcHci> ```
執行下列命令,將系統受控識別指派給 VM。
az connectedmachine update --ids "<Resource Manager ID for the VM>" --set identity.type="SystemAssigned"
移至 Azure 入口網站,並流覽至 [ 概觀 ] 頁面。 JSON 檢視應該指出系統受控識別現在已指派給 VM。
從記憶體帳戶部署 VM 映像失敗
當您嘗試從 Azure 本機上的記憶體帳戶部署 VM 映射時,您會看到下列錯誤:
錯誤:{"code":"moc-operator galleryimage serviceClient returned an error while reconciling: rpc error: code = Unknown desc = ===== RESPONSE ERROR (ErrorCode=AuthorizationPermissionMismatch) =====\nDescription=, Details: (none)\n","message":"moc-operator galleryimage serviceClient returned an error while reconciling: rpc error: code = Unknown desc = ===== RESPONSE ERROR (ErrorCode=AuthorizationPermissionMismatch) =====\nDescription=, Details: (none)\n"}
或者,您看到此錯誤:
錯誤:{"code":"moc-operator galleryimage serviceClient returned an error while reconciling: rpc error: code = Unknown desc = ===== RESPONSE ERROR (ErrorCode=NoAuthenticationInformation) =====\nDescription=, Details: (none)\n","message":"moc-operator galleryimage serviceClient returned an error while reconciling: rpc error: code = Unknown desc = ===== RESPONSE ERROR (ErrorCode=NoAuthenticationInformation) =====\nDescription=, Details: (none)\n"}
因為建立映像的用戶沒有從記憶體帳戶存取映像的正確許可權,因此會發生失敗。 用戶必須在您用於映像的儲存帳戶上具有 儲存體 Blob 資料貢獻者 角色。 如需詳細資訊,請參閱 指派 Azure 角色 以存取 Blob 數據。
解析度:
將 儲存體 Blob 數據貢獻者 角色新增至需要從此儲存帳戶建立映像的使用者。 新增角色之後,請重試部署影像。
嘗試從記憶體帳戶部署 VM 映射時,您可能也會看到下列錯誤:
錯誤:{"code":"moc-operator galleryimage serviceClient returned an error while reconciling: rpc error: code = Unknown desc = ===== RESPONSE ERROR (ErrorCode=InvalidBlobType) =====\nDescription=The blob type is invalid for this operation.\nRequestId:5e74055f-e01e-0033-66eb-ff9734000000\nTime:2024-09-05T23:32:56.3001852Z, Details: (none)\n","message":"moc-operator galleryimage serviceClient returned an error while reconciling: rpc error: code = Unknown desc = ===== RESPONSE ERROR (ErrorCode=InvalidBlobType) =====\nDescription=The blob type is invalid for this operation.\nRequestId:5e74055f-e01e-0033-66eb-ff9734000000\nTime:2024-09-05T23:32:56.3001852Z, Details: (none)\n","additionalInfo":[{"type":"ErrorInfo","info":{"category":"Uncategorized","recommendedAction":"","troubleshootingURL":""}}]}
此失敗是因為 Blob 類型在記憶體帳戶內不正確。 映射的類型必須為 page blob
。
解析度:
在page blob format
將映像上傳至您的儲存帳戶,然後重試部署該映像。
請確定使用者具有正確的許可權,且 Blob 的格式正確。 如需詳細資訊,請參閱 從 Azure 記憶體帳戶新增 VM 映射。
無法部署 Azure 本機 VM
嘗試部署 Azure 本機 VM 時,您會看到下列錯誤:
錯誤:{"code":"ConflictingOperation","message":"Unable to process request 'Microsoft.AzureStackHCI/virtualMachineInstances'. There is already a previous running operation for resource '/subscriptions/<subscription ID>/resourceGroups/<Resource group name>/providers/Microsoft.HybridCompute/machines/<VM name>/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default'. Please wait for the previous operation to complete."}
此失敗是因為 SystemAssigned
受控識別物件不在資源類型下 Microsoft.HybridCompute/machines
。
解析度:
在部署範本中確認:
受控的SystemAssigned
識別對象是位於Microsoft.HybridCompute/machines
資源類型下,而不是在Microsoft.AzureStackHCI/VirtualMachineInstances
資源類型下。
部署範本應該符合提供的範例範本。 如需詳細資訊,請參閱 建立 Azure Arc 所啟用的 Azure 本機虛擬機中的範例範本。
無法偵測到 Azure CLI 的安裝
如果您的環境在安裝后無法辨識 Azure CLI,請執行下列程式代碼區塊,將 Azure CLI 安裝路徑新增至環境路徑。
if ( -not( $env:PATH -like '*C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin*') ) {
$env:PATH += "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;"
Write-Host "Updated path $env:PATH"
}
「Windows 已建立暫存分頁檔案」訊息會出現在啟動時
錯誤:
當您使用 Windows Server 2022 SQL Server 2022 的 Azure Marketplace 映像檔部署 Azure 本地虛擬機器(Standard 或 Enterprise)時,您可能會在啟動時看到下列警告:
Windows 已建立暫存分頁檔案...
解析度:
要解決這個問題,請按照以下步驟進行:
在警告快顯上選取 [確定 ]。 或者,移至 [系統屬性>進階>效能設定] 以開啟 [效能>選項] 視窗。
在 [效能選項] 視窗中,選取 [虛擬記憶體] 區段底下的 [變更]。
在 [ 虛擬記憶體] 視窗中,選取 [系統管理的大小]。 也請確定已清除 [自動管理所有磁碟驅動器的分頁檔案大小 ] 複選框。
選取 [設定],然後選取 [ 確定 ] 以套用變更。
重新啟動 VM。 重新啟動之後,警告訊息應該不會再出現。