Share via


針對已啟用 Arc 的 VMware vSphere 執行持續管理

在本文中,您會了解如何執行與已啟用 Azure Arc 的 VMware vSphere 相關的各種管理作業:

  • 升級 Azure Arc 資源橋接器
  • 更新認證
  • 從 Arc 資源橋接器收集記錄

這些作業都需要資源橋接器 VM 的 SSH 金鑰,或提供資源橋接器 VM 上 Kubernetes 叢集存取權的 kubeconfig。

手動升級 Arc 資源橋接器

已啟用 Azure Arc 的 VMware vSphere 需要 Arc 資源橋接器,才能將您的 VMware 環境與 Azure 連線。 Arc 資源橋接器的新映像會定期發行,以納入安全性和功能更新。 Arc 資源橋接器可以從 vCenter 伺服器手動升級。 您必須先符合所有升級必要條件,才能嘗試升級。 vCenter 伺服器必須具備儲存在本機的 kubeconfig 和設備設定檔。 如果在起始部署資源橋接器後變更 vSphere 帳戶認證,請在嘗試手動升級之前先更新新的帳戶認證

手動升級通常需要 30-90 分鐘的時間,視網路速度而定。 升級命令會將 Arc 資源橋接器升級為下一個版本,但可能不是最新的可用版本。 若要連線支援的版本,可能需要多個升級。 檢查 Arc 資源橋接器的 Azure 資源,即可檢查資源橋接器版本。

若要手動升級 Arc 資源橋接器,請確定您已從 vCenter 伺服器執行延伸模組升級命令來安裝最新的 az arcappliance CLI 延伸模組:

az extension add --upgrade --name arcappliance 

若要手動升級資源橋接器,請使用下列命令:

az arcappliance upgrade vmware --config-file <file path to ARBname-appliance.yaml> 

更新 vSphere 帳戶認證 (上線後使用新密碼或新的 vSphere 帳戶)

已啟用 Azure Arc 的 VMware vSphere 會使用您在上線期間提供的 vSphere 帳號憑證,與您的 vCenter Server 伺服器通訊。 這些認證只會保存在 Arc 資源橋接器 VM 本機上。

在安全性做法中,您可能需要輪替 vCenter Server 帳戶的認證。 隨著認證輪替,您也必須更新提供給 Azure Arc 的認證,以確保已啟用 Azure Arc 的 VMware 服務正常運作。 如果您在上線後需要使用不同的 vSphere 帳戶,也可以使用相同的步驟。 您必須確定新帳戶也具有所有必要的 vSphere 權限

在 Arc 資源橋接器上儲存有兩組不同的認證。 這兩者可以使用相同帳戶的認證。

  • 適用於 Arc 資源橋接器的帳戶。 此帳戶用於部署 Arc 資源橋接器 VM,並會用於升級。
  • VMware 叢集延伸模組的帳戶。 此帳戶可用來透過已啟用 Azure Arc 的 VMware vSphere 來探索詳細目錄並執行所有 VM 作業

若要更新 Arc 資源橋接器帳戶的認證,請執行下列 Azure CLI 命令。 從可在本機存取 Arc 資源橋接器叢集設定 IP 位址的工作站上執行命令:

az account set -s <subscription id>
az arcappliance get-credentials -n <name of the appliance> -g <resource group name> 
az arcappliance update-infracredentials vmware --kubeconfig kubeconfig

如需命令的詳細資訊,請參閱 az arcappliance get-credentialsaz arcappliance update-infracredentials vmware

若要更新資源橋接器上 VMware 叢集延伸模組所使用的認證。 此命令可在安裝 connectedvmware CLI 延伸模組的任何位置中執行。

az connectedvmware vcenter connect --custom-location <name of the custom location> --location <Azure region>  --name <name of the vCenter resource in Azure>       --resource-group <resource group for the vCenter resource>  --username   <username for the vSphere account>  --password  <password to the vSphere account>

從 Arc 資源橋接器收集記錄

如果 Azure Arc 資源橋接器遇到任何問題,您可以收集記錄以供進行進一步調查。 若要收集記錄,請使用 Azure CLI Az arcappliance log 命令。

若要將記錄儲存至目的地資料夾,請執行下列命令。 這些命令需要連線到叢集設定 IP 位址。

az account set -s <subscription id>
az arcappliance get-credentials -n <name of the appliance> -g <resource group name> 
az arcappliance logs vmware --kubeconfig kubeconfig --out-dir <path to specified output directory>

如果資源橋接器上的 Kubernetes 叢集未處於運作狀態,您可以使用下列命令。 這些命令需要透過 SSH 連線到 Azure Arc 資源橋接器 VM 的 IP 位址

az account set -s <subscription id>
az arcappliance get-credentials -n <name of the appliance> -g <resource group name> 
az arcappliance logs vmware --out-dir <path to specified output directory> --ip XXX.XXX.XXX.XXX

下一步