將 VM 移至 Azure Stack Hub 總覽Move a VM to Azure Stack Hub overview

您可以將虛擬機器從您的環境 (VM) 移至 Azure Stack Hub。You can move virtual machines (VM)s from your environment to Azure Stack Hub. 規劃移動您的工作負載時,有一些您必須預期的限制。There are some limitations that you need to expect when planning to move your workloads. 本文列出 Azure Stack Hub 中虛擬硬碟 (VHD) 的需求。This article lists the requirements for virtual hard disk (VHD)s in Azure Stack Hub. Azure Stack Hub 需要第一個 (1) VHD。Azure Stack Hub requires a generation one (1) VHD. 您的 VM 必須是一般化或特製化。Your VM will need to be either generalized or specialized. 針對在 Azure Stack 中建立的 VM,使用一般化 Vm 作為基礎 mage。Use generalized VMs as the base-mage for VMS created in Azure Stack. 特製化 VM 包含使用者帳戶。Specialized VM contains user accounts. 若要遷移、準備及下載 VHD,請驗證 VHD 是否符合需求、將映射上傳至 Azure Stack Hub 中的儲存體帳戶,然後在您的雲端中建立 VM。To migrate, prepare and download the VHD, validate that the VHD meets the requirements, upload the image to a storage account in Azure Stack Hub, and then create the VM in your cloud. 如果您有更複雜的遷移工作,您可以在 [ 遷移至 Azure Stack Hub ] 白皮書中找到完整的討論。If you have a more complex migration task, you can find a complete discussion in the Migrate to Azure Stack Hub whitepaper.

自訂映射有兩種形式: 一般化特製 化。Custom images come in two forms: generalized and specialized.

  • 一般化映射Generalized image
    一般化磁片映射是利用 Sysprep 來移除任何唯一資訊 (例如使用者帳戶) ,讓它可以重複使用以建立多個 vm 的映射。A generalized disk image is one that has been prepared with Sysprep to remove any unique information (such as user accounts), enabling it to be reused to create multiple VMs. 一般化的 Vhd 適合用來建立 Azure Stack Hub cloud 操作員計畫作為 marketplace 專案使用的映射。Generalized VHDs are a good fit for when are creating images that the Azure Stack Hub cloud operator plans to use as marketplace items. 透過系統管理員入口網站或系統管理員端點提供的映射是 平臺映射Images offered through the administrator portal or administrator endpoints are platform images.

  • 特製化映射Specialized image
    特製化磁片映射是虛擬硬碟 (VHD 的複本,從現有的 VM) ,其中包含來自原始 VM 的使用者帳戶、應用程式和其他狀態資料。A specialized disk image is a copy of a virtual hard disk (VHD) from an existing VM that contains the user accounts, applications, and other state data from your original VM. 這通常是將 Vm 遷移至 Azure Stack Hub 的格式。This is typically the format in which VMs are migrated to Azure Stack Hub. 當您需要將 Vm 從內部部署遷移至 Azure Stack Hub 時,專用 Vhd 很適合使用。Specialized VHDs are a good fit for when you need to migrate VMs from on-premises to Azure Stack Hub.

將映射移至 Azure Stack Hub 時,請考慮您要如何使用映射。When moving an image into Azure Stack Hub, consider how you would like to have the image used.

  • 個人工作負載Personal workload
    您的內部部署環境或全域 Azure 中可能會有一部機器用於開發或特定工作,而且您想要利用 Azure Stack Hub 將它裝載在私用雲端中。You may have a machine in your on-premises environment or in global Azure that you use for development or specific tasks and you would like to take advantage of hosting it in a private cloud with Azure Stack Hub. 您想要保留電腦上的資料和使用者帳戶。You you would like to retain the data and user accounts on the machine. 您會想要將這部機器移入 Azure Stack Hub 作為特製化映射。You would want to move this machine into the Azure Stack Hub as a specialized image.

  • 黃金映射Golden image
    您可能會想要在工作組內共用一般 VM 設定和應用程式集合。You may want to share a common VM configuration and set of applications within your workgroup. 您將不需要與 Azure Stack Hub 網域以外的使用者共用映射 (directory 租使用者) 。You will not have the need to share the image with users outside of your Azure Stack Hub domain (directory tenant). 在此情況下,您會想要藉由移除資料和使用者帳戶來將映射一般化。In this case, you will want to generalize the image by removing data and user accounts. 然後,您可以與租使用者中的其他使用者共用此映射。You can then share this image with other users in your tenant.

  • Azure Stack Hub Marketplace 供應專案Azure Stack Hub Marketplace offering
    您的雲端操作員可以使用一般化映射作為 marketplace 供應專案的基礎。Your cloud operator can use generalized image as the basis of a marketplace offering. 當您準備好映射之後,您的雲端操作員可以使用自訂映射來建立 Azure Stack Hub 實例的 marketplace 供應專案。Once you have prepared your image, your cloud operator can use the custom image to create a marketplace offering for your Azure Stack Hub instance. 使用者可以從映射建立自己的 VM,就像 Marketplace 中的任何其他供應專案一樣。Users can create their own VM from the image as they would any other offering in the Marketplace. 您將需要使用雲端操作員來建立此供應專案。You will need to work with your cloud operator to create this offering.

驗證 VHD 需求Verify VHD requirements


準備 VHD 時,您必須具備下列需求,否則您將無法在 Azure Stack Hub 中使用 VHD。When preparing your VHD, you must have the following requirements in place or your will not be able to use your VHD in Azure Stack Hub. 上傳映射之前,請考慮下列事項:Before you upload the image, consider the following:

  • Azure Stack Hub 僅支援第一代 (1) Vm 的映射。Azure Stack Hub only supports images from generation one (1) VMs.
  • VHD 是固定類型。VHD is of fixed type. Azure Stack Hub 不支援動態磁碟 VHD。Azure Stack Hub does not support dynamic disk VHDs.
  • VHD 的虛擬大小下限至少為 20 MB。VHD has minimum virtual size of at least 20 MB.
  • VHD 對齊,也就是虛擬大小必須是 1 MB 的倍數。VHD is aligned, that is, the virtual size must be a multiple of 1 MB.
  • VHD blob 長度 = 虛擬大小 + vhd 頁尾長度 (512) 。VHD blob length = virtual size + vhd footer length (512). Blob 最後的小型頁尾會說明 VHD 的屬性。A small footer at the end of the blob describes the properties of the VHD.

您可以在 [驗證 vhd ] 中找到修復 vhd 的步驟You can find steps to repair your VHD at Verify your VHD

移動 VM 的方法Methods of moving a VM

您可以使用下列案例,手動將 VM 移至 Azure Stack Hub:You can manually move your VM into Azure Stack Hub with the following scenarios:

狀況Scenario 指示Instructions
全球 Azure 到 Azure Stack HubGlobal Azure to Azure Stack Hub 在全域 Azure 中準備您的 VHD,然後上傳至 Azure Stack Hub。Prepare your VHD in global Azure and then upload to Azure Stack Hub. 如需詳細資訊,請參閱 將 VM 從 Azure 移至 Azure Stack HubFor more information, see Move a VM from Azure to Azure Stack Hub.
本機通用至 Azure Stack HubLocal generalized to Azure Stack Hub 準備您的 VHD,並在 Hyper-v 本機將 VHD 一般化,然後上傳至 Azure Stack Hub。Prepare your VHD and generalize a VHD locally in Hyper-V and then upload to Azure Stack Hub. 如需詳細資訊,請參閱 將一般化 VM 從內部部署移至 Azure Stack HubFor more information, see Move a generalized VM from on-premises to Azure Stack Hub.
本機專用於 Azure Stack HubLocal specialized to Azure Stack Hub 在 Hyper-v 本機準備您的特製化 VHD,然後上傳至 Azure Stack Hub。Prepare your specialized VHD locally in Hyper-V and then upload to Azure Stack Hub. 如需詳細資訊,請參閱 將特製化 VM 從內部部署移至 Azure Stack HubFor more information, see Move a specialized VM from on-premises to Azure Stack Hub.

遷移至 Azure Stack HubMigrate to Azure Stack Hub

您可以找到詳細資料、檢查清單和最佳作法,以大量規劃和遷移您的工作負載,以 Azure Stack Hub 在 Azure 全球的 AzureCAT 專家所撰寫的指南中。You can find details, checklists, and best practices for planning and migrating your workloads in bulk to Azure Stack Hub in a guide written by the AzureCAT experts in Azure Global. 本指南著重于在實體伺服器或現有虛擬化平臺上執行的現有應用程式的遷移。The guide focuses on the migration of existing applications that run either on physical servers or on existing virtualization platforms. 藉由將這些工作負載移到 Azure Stack Hub IaaS 環境,小組可以從更順暢的作業、自助式部署、標準化的硬體設定和 Azure 一致性中獲益。By moving these workloads to the Azure Stack Hub IaaS environment, teams can benefit from smoother operations, self-service deployments, standardized hardware configurations, and Azure consistency.

取得技術白皮書。Get the white paper.

您也可以在雲端採用架構中找到有關遷移的指引。You can also find guidance about migration in the Cloud Adoption Framework. 如需詳細資訊,請參閱 規劃 Azure Stack Hub 遷移For more information, see Plan your Azure Stack Hub migration.

後續步驟Next steps

Azure Stack Hub VM 簡介Introduction to Azure Stack Hub VMs

將自訂 VM 映像新增至 Azure Stack HubAdd a custom VM image to Azure Stack Hub