針對 Azure Stack Hub 中的問題進行疑難排解Troubleshoot issues in Azure Stack Hub

此文件提供 Azure Stack Hub 整合式環境的疑難排解資訊。This document provides troubleshooting information for Azure Stack Hub integrated environments. 如需 Azure Stack 開發套件的協助,請參閱 ASDK 疑難排解或向 Azure Stack Hub MSDN 論壇上的專家取得協助。For help with the Azure Stack Development Kit, see ASDK Troubleshooting or get help from experts on the Azure Stack Hub MSDN Forum.

常見問題集Frequently asked questions

這些章節包含各文件的連結,這些文件會說明傳送至 Microsoft 支援服務的常見問題。These sections include links to docs that cover common questions sent to Microsoft Support.

購買考量Purchase considerations

更新和診斷Updates and diagnostics

來賓 VM 支援的作業系統和大小Supported operating systems and sizes for guest VMs

Azure MarketplaceAzure Marketplace

管理容量Manage capacity

記憶體Memory

若要提高 Azure Stack Hub 的總可用記憶體容量,您可以新增其他記憶體。To increase the total available memory capacity for Azure Stack Hub, you can add additional memory. 在 Azure Stack Hub 中,您的實體伺服器也稱為縮放單位節點。In Azure Stack Hub, your physical server is also referred to as a scale unit node. 所有屬於單一縮放單位成員的縮放單位節點都必須具有相同的記憶體數量All scale unit nodes that are members of a single scale unit must have the same amount of memory.

保留期限Retention period

保留期限設定可讓雲端操作員指定時間間隔天數 (介於 0 到 9999 天),在此期間,任何已刪除的帳戶都可能復原。The retention period setting lets a cloud operator to specify a time period in days (between 0 and 9999 days) during which any deleted account can potentially be recovered. 預設保留期限設定為 0 天。The default retention period is set to 0 days. 將值設定為 0 表示立即不再保留任何已刪除的帳戶,並標示為供定期記憶體回收。Setting the value to 0 means that any deleted account is immediately out of retention and marked for periodic garbage collection.

安全性、合規性和身分識別Security, compliance, and identity

管理 RBACManage RBAC

Azure Stack Hub 中的使用者可以是訂用帳戶、資源群組或服務中每個執行個體的讀者、擁有者或參與者。A user in Azure Stack Hub can be a reader, owner, or contributor for each instance of a subscription, resource group, or service.

如果適用於 Azure 資源的內建角色無法滿足您組織的特定需求,您可以建立自己的自訂角色。If the built-in roles for Azure resources don't meet the specific needs of your organization, you can create your own custom roles. 在此教學課程中,您會使用 Azure PowerShell 建立名為讀者支援票證的自訂角色。For this tutorial, you create a custom role named Reader Support Tickets using Azure PowerShell.

透過 CSP 管理使用量和帳單Manage usage and billing as a CSP

選擇您用於 Azure Stack Hub 的共用服務帳戶類型。Choose the type of shared services account that you use for Azure Stack Hub. 可用於註冊多租用戶 Azure Stack Hub 的訂用帳戶類型為:The types of subscriptions that can be used for registration of a multi-tenant Azure Stack Hub are:

  • 雲端解決方案提供者Cloud Solution Provider
  • 合作夥伴共用服務訂用帳戶Partner Shared Services subscription

取得縮放單位計量Get scale unit metrics

您可以使用 PowerShell 取得戳記使用量資訊,而不需要 Microsoft 支援服務的協助。You can use PowerShell to get stamp utilization information without help from Microsoft Support. 若要取得戳記使用量:To obtain stamp utilization:

  1. 建立 PEP 工作階段。Create a PEP session.
  2. 執行 test-azurestackRun test-azurestack.
  3. 結束 PEP 工作階段。Exit PEP session.
  4. 使用叫用命令呼叫來執行 get-azurestacklog -filterbyrole seedringRun get-azurestacklog -filterbyrole seedring using an invoke-command call.
  5. 將 seedring .zip 解壓縮。Extract the seedring .zip. 您就可以從執行 test-azurestack 的 ERCS 資料夾中取得驗證報告。You can obtain the validation report from the ERCS folder where you ran test-azurestack.

如需詳細資訊,請參閱 Azure Stack Hub 診斷For more information, see Azure Stack Hub Diagnostics.

針對虛擬機器 (VM) 進行疑難排解Troubleshoot virtual machines (VMs)

重設 Linux VM 密碼Reset Linux VM password

如果您忘記 Linux VM 的密碼,而 [ 重設密碼 ] 選項因為 VMAccess 擴充功能的問題而無法運作,您可以遵循下列步驟來執行重設:If you forget the password for a Linux VM and the Reset password option is not working due to issues with the VMAccess extension, you can perform a reset following these steps:

  1. 選擇要作為復原 VM 使用的 Linux VM。Choose a Linux VM to use as a recovery VM.

  2. 登入使用者入口網站:Sign in to the User portal:

    1. 記下 VM 大小、NIC、公用 IP、NSG 和資料磁片。Make a note of the VM size, NIC, Public IP, NSG and data disks.
    2. 停止受影響的 VM。Stop the impacted VM.
    3. 移除受影響的 VM。Remove the impacted VM.
    4. 將磁片從受影響的 VM 連結為復原 VM 上的資料磁片 (可能需要幾分鐘的時間,才能使用磁片) 。Attach the disk from the impacted VM as a data disk on the recovery VM (it may take a couple of minutes for the disk to be available).
  3. 登入復原 VM,然後執行下列命令:Sign in to the recovery VM and run the following command:

    sudo su –
    mkdir /tempmount
    fdisk -l
    mount /dev/sdc2 /tempmount /*adjust /dev/sdc2 as necessary*/
    chroot /tempmount/
    passwd root /*substitute root with the user whose password you want to reset*/
    rm -f /.autorelabel /*Remove the .autorelabel file to prevent a time consuming SELinux relabel of the disk*/
    exit /*to exit the chroot environment*/
    umount /tempmount
    
  4. 登入使用者入口網站:Sign in to the User portal:

    1. 從復原 VM 卸離磁片。Detach the disk from the Recovery VM.
    2. 從磁片重新建立 VM。Recreate the VM from the disk.
    3. 請務必從先前的 VM 傳輸公用 IP、連接資料磁片等等。Be sure to transfer the Public IP from the previous VM, attach the data disks, etc.

您也可以建立原始磁片的快照集,並從中建立新的磁片,而不是直接在原始磁片上執行變更。You may also take a snapshot of the original disk and create a new disk from it rather than perform the changes directly on the original disk. 如需詳細資訊,請參閱下列主題:For more information, see these topics:

布建期間 Windows Server 2012 R2 的授權啟用失敗License activation fails for Windows Server 2012 R2 during provisioning

在此情況下,Windows 將無法啟動,而且您會在螢幕右下角看到浮水印。In this case, Windows will fail to activate and you will see a watermark on the bottom-right corner of the screen. 位於 C:\Windows\Panther 下的 WaSetup.xml 記錄包含下列事件:The WaSetup.xml logs located under C:\Windows\Panther contains the following event:

<Event time="2019-05-16T21:32:58.660Z" category="ERROR" source="Unattend">
    <UnhandledError>
        <Message>InstrumentProcedure: Failed to execute 'Call ConfigureLicensing()'. Will raise error to caller</Message>
        <Number>-2147221500</Number>
        <Description>Could not find the VOLUME_KMSCLIENT product</Description>
        <Source>Licensing.wsf</Source>
    </UnhandledError>
</Event>

若要啟用授權,請複製您想要啟用的 SKU (AVMA) 金鑰的自動虛擬機器啟用。To activate the license, copy the Automatic Virtual Machine Activation (AVMA) key for the SKU you want to activate.

版本Edition AVMA 索引鍵AVMA Key
資料中心Datacenter Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TWY4TGP-NPTV9-HTC2H-7MGQ3-DV4TW
標準Standard DBGBW-NPF86-BJVTX-K3WKJ-MTB6VDBGBW-NPF86-BJVTX-K3WKJ-MTB6V
EssentialsEssentials K2XGM-NMBT3-2R6Q8-WF2FK-P36R2K2XGM-NMBT3-2R6Q8-WF2FK-P36R2

在 VM 上執行下列命令:On the VM, run the following command:

slmgr /ipk <AVMA_key>

如需完整的詳細資訊,請參閱 VM 啟用For complete details, see VM Activation.

在 Azure Stack Hub 中部署 VM 之前,必須先新增 Windows Server 映像與資源庫項目。A Windows Server image and gallery item must be added before deploying VMs in Azure Stack Hub.

我已刪除某些 VM,但仍在磁碟上看到 VHD 檔案。I've deleted some VMs, but still see the VHD files on disk

這是設計預設的行為:This behavior is by design:

  • 當您刪除 VM 時,不會刪除 VHD。When you delete a VM, VHDs aren't deleted. 磁碟是資源群組中的獨立資源。Disks are separate resources in the resource group.
  • 刪除儲存體帳戶時,可以立即透過 Azure Resource Manager 看見刪除。When a storage account gets deleted, the deletion is visible immediately through Azure Resource Manager. 但是它可能包含的磁碟仍會保留在儲存體中,直到記憶體回收執行為止。But the disks it may contain are still kept in storage until garbage collection runs.

若您看到「孤立」的 VHD,您必須知道它是否屬於已刪除之儲存體帳戶的資料夾。If you see "orphan" VHDs, it's important to know if they're part of the folder for a storage account that was deleted. 若儲存體帳戶並未刪除,則 VHD 仍然存在就是正常情況。If the storage account wasn't deleted, it's normal that they're still there.

您可以在管理儲存體帳戶中深入了解如何設定保留閾值與隨選回收。You can read more about configuring the retention threshold and on-demand reclamation in manage storage accounts.

針對儲存體進行疑難排解Troubleshoot storage

儲存體回收Storage reclamation

已回收的容量最多可能需要 14 小時才會顯示在入口網站中。It may take up to 14 hours for reclaimed capacity to show up in the portal. 空間回收取決於不同因素,包括區塊 Blob 存放區中內部容器檔案的使用量百分比。Space reclamation depends on different factors including usage percentage of internal container files in block blob store. 因此,視刪除的資料量而定,我們無法保證當記憶體回收行程執行時可回收多少空間。Therefore, depending on how much data is deleted, there's no guarantee on the amount of space that could be reclaimed when garbage collector runs.

Azure 儲存體總管無法與 Azure Stack Hub 搭配運作Azure Storage Explorer not working with Azure Stack Hub

如果您要在中斷連線的案例中使用整合式系統,建議您使用企業憑證授權單位 (CA)。If you're using an integrated system in a disconnected scenario, it's recommended to use an Enterprise Certificate Authority (CA). 以 Base-64 格式匯出根憑證,然後在 Azure 儲存體總管中將其匯入。Export the root certificate in a Base-64 format and then import it in Azure Storage Explorer. 請確實從 Resource Manager 端點中移除尾端的斜線 (/)。Make sure that you remove the trailing slash (/) from the Resource Manager endpoint. 如需詳細資訊,請參閱準備連線至 Azure Stack HubFor more information, see Prepare for connecting to Azure Stack Hub.

針對 App Service 進行疑難排解Troubleshoot App Service

Create-AADIdentityApp.ps1 指令碼失敗Create-AADIdentityApp.ps1 script fails

如果 App Service 所需的 Create-AADIdentityApp.ps1 指令碼失敗,請務必在執行指令碼時包含必要的 -AzureStackAdminCredential 參數。If the Create-AADIdentityApp.ps1 script that's required for App Service fails, be sure to include the required -AzureStackAdminCredential parameter when running the script. 如需詳細資訊,請參閱部署 Azure Stack Hub 上的 App Service 必要條件For more information, see Prerequisites for deploying App Service on Azure Stack Hub.

針對 Azure Stack Hub 更新進行疑難排解Troubleshoot Azure Stack Hub updates

Azure Stack Hub 修補和更新程序的設計訴求,是要讓操作員以一致且有效率的方式套用更新套件。The Azure Stack Hub patch and update process is designed to allow operators to apply update packages in a consistent, streamlined way. 雖不常見,但問題可能會在修補和更新過程中發生。While uncommon, issues can occur during patch and update process. 如果您在修補和更新程序期間遇到問題,建議您執行下列步驟:The following steps are recommended should you encounter an issue during the patch and update process:

  1. 先決條件:請確定您已依照 更新活動檢查清單啟用主動記錄收集中的指示操作。Prerequisites: Be sure that you have followed the Update Activity Checklist and enable proactive log collection.

  2. 請遵循您的更新失敗時所建立失敗警示中的補救步驟。Follow the remediation steps in the failure alert created when your update failed.

  3. 如果您無法解決問題,請建立 Azure Stack Hub 支援票證If you have been unable to resolve your issue, create an Azure Stack Hub support ticket. 請確定您已針對發生問題的時間範圍收集記錄Be sure you have logs collected for the time span when the issue occurred. 如果更新失敗(使用重大警示或警告),請務必檢查失敗,並依照警示中的指示來聯繫 Microsoft 客戶支援服務,讓您的縮放單位無法長期保持在失敗狀態。If an update fails, either with a critical alert or a warning, it's important that you review the failure and contact Microsoft Customer Support Services as directed in the alert so that your scale unit does not stay in a failed state for a long time. 將縮放單位保持在失敗的更新狀態一段長時間後,可能會導致其他更難解決的問題。Leaving a scale unit in a failed update state for an extended period of time can cause additional issues that are more difficult to resolve later.

常見 Azure Stack Hub 修補和更新問題Common Azure Stack Hub patch and update issues

適用於:Azure Stack Hub 整合系統Applies to: Azure Stack Hub integrated systems

PreparationFailedPreparationFailed

適用於:此問題適用於所有支援版本。Applicable: This issue applies to all supported releases.

原因︰嘗試安裝 Azure Stack Hub 更新時,其狀態可能會顯示失敗並變更為 PreparationFailedCause: When attempting to install the Azure Stack Hub update, the status for the update might fail and change state to PreparationFailed. 就已連接網際網路的系統而言,這通常表示因為網際網路連線不佳而無法正確下載更新套件。For internet-connected systems this is usually indicative of the update package being unable to download properly due to a weak internet connection.

補救:此問題的因應措施為再按一下 立即安裝Remediation: You can work around this issue by clicking Install now again. 如果問題持續發生,建議您依照安裝更新區段以手動方式上傳更新套件。If the problem persists, we recommend manually uploading the update package by following the Install updates section.

發生次數:通用Occurrence: Common

更新失敗:檢查並強制執行 Csv 上的外部金鑰保護裝置Update failed: Check and Enforce external key protectors on CSVs

適用於:此問題適用於所有支援版本。Applicable: This issue applies to all supported releases.

原因:未正確設定基礎板管理控制器 (BMC) 密碼。Cause: The baseboard management controller (BMC) password is not set correctly.

補救更新 BMC 認證 並繼續更新。Remediation: Update the BMC credential and resume the update.

更新正在進行時回報的警告和錯誤Warnings and errors reported while update is in progress

適用於:此問題適用於所有支援版本。Applicable: This issue applies to all supported releases.

原因:當 Azure Stack Hub 更新處於 進行 中狀態時,可能會在入口網站中報告警告和錯誤。Cause: When Azure Stack Hub update is in status In progress, warnings and errors may be reported in the portal. 元件可能會在升級期間等候其他元件等待時間,而導致錯誤。Components may timeout waiting for other components during upgrade resulting in an error. 因為間歇性錯誤,Azure Stack Hub 具有重試或補救某些工作的機制。Azure Stack Hub has mechanism to retry or remediate some of the tasks due to intermittent errors.

補救:當 Azure Stack Hub 更新處於 進行 中狀態時,可以忽略入口網站中回報的警告和錯誤。Remediation: While the Azure Stack Hub update is in status In progress, warnings and errors reported in the portal can be ignored.

發生次數:通用Occurrence: Common

2002更新失敗2002 update failed

適用:此問題僅適用于2002版本。Applicable: This issue applies only to the 2002 release.

原因:嘗試2002更新時,更新可能會失敗並提供此訊息: The private network parameter is missing from cloud parameters. Please use set-azsprivatenetwork cmdlet to set private networkTraceCause: When attempting the 2002 update, the update might fail and provide this message: The private network parameter is missing from cloud parameters. Please use set-azsprivatenetwork cmdlet to set private networkTrace.

補救設定私人內部網路Remediation: Set up a private internal network.