Azure Stack Hub VM 功能Azure Stack Hub VM features

Azure Stack Hub 虛擬機器 (VM) 提供隨選、可調整的計算資源。Azure Stack Hub virtual machines (VMs) provide on-demand, scalable computing resources. 在部署 VM 之前,應先了解 Azure Stack Hub 與 Microsoft Azure 所提供的虛擬機器功能有何差異。Before you deploy VMs, you should learn the differences between the VM features available in Azure Stack Hub and Microsoft Azure. 本文將說明這些差異,並指明規劃 VM 部署方面的主要考量。This article describes these differences and identifies key considerations for planning VM deployments. 若要深入了解 Azure Stack Hub 與 Azure 之間的大致差異,請參閱主要考量文章。To learn about high-level differences between Azure Stack Hub and Azure, see the Key considerations article.

VM 差異VM differences

功能Feature Azure (全域)Azure (global) Azure Stack HubAzure Stack Hub
虛擬機器映像Virtual machine images Azure Marketplace 具備您可用來建立虛擬機器的映像。The Azure Marketplace has images that you can use to create a VM. 若要檢視 Azure Marketplace 中可用的映像清單,請參閱 Azure Marketplace 頁面。See the Azure Marketplace page to view the list of images that are available in the Azure Marketplace. Azure Stack Hub Marketplace 中預設沒有提供任何映像。By default, there aren't any images available in the Azure Stack Hub Marketplace. Azure Stack Hub 雲端管理員必須先將映像發行或下載到 Azure Stack Hub Marketplace,使用者才能使用這些映像。The Azure Stack Hub cloud admin must publish or download images to the Azure Stack Hub Marketplace before users can use them.
VHD 世代VHD generation 第二代 VM 可支援第一代 VM 所不支援的重要功能。Generation two VMs support key features that aren't supported in generation one VMs. 這些功能包括記憶體增加、Intel Software Guard Extensions (Intel SGX) 和虛擬化的持續性記憶體 (vPMEM)。These features include increased memory, Intel Software Guard Extensions (Intel SGX), and virtualized persistent memory (vPMEM). 在內部部署環境執行的第二代 VM 擁有一些 Azure 尚未支援的功能。Generation two VMs running on-premises, have some features that aren't supported in Azure yet. 如需詳細資訊,請參閱 Azure 上第二代 VM 的支援For more information see Support for generation 2 VMs on Azure Azure Stack Hub 僅支援第一代 VM。Azure Stack Hub supports only generation one VMs. 您可以將第一代 VM 從 VHDX 轉換為 VHD 檔案格式,並從動態擴充轉換為固定大小的磁碟。You can convert a generation one VM from VHDX to the VHD file format and from dynamically expanding to a fixed-size disk. 您無法變更 VM 的世代。You can't change a VM's generation. 如需詳細資訊,請參閱 Azure 上第二代 VM 的支援For more information, see Support for generation 2 VMs on Azure.
虛擬機器大小Virtual machine sizes Azure 支援各種不同的 VM 大小。Azure supports a wide variety of sizes for VMs. 若要瞭解可用的大小和選項,請參閱 Azure vm 大小To learn about the available sizes and options, refer to the Azure VMs sizes. Azure Stack Hub 支援 Azure 中一部分可用的 VM 大小。Azure Stack Hub supports a subset of VM sizes that are available in Azure. 若要檢視支援的大小清單,請參考本文的 VM 大小小節。To view the list of supported sizes, refer to the VM sizes section of this article.
虛擬機器配額Virtual machine quotas 配額限制由 Microsoft 設定。Quota limits are set by Microsoft. Azure Stack Hub 雲端管理員在提供 VM 給其使用者之前,必須先指派配額。The Azure Stack Hub cloud admin must assign quotas before they offer VM to their users.
虛擬機器擴充功能Virtual machine extensions Azure 支援多種不同的 VM 擴充功能。Azure supports a wide variety of VM extensions. 若要了解可用的擴充功能,請參考 VM 擴充功能和功能一文。To learn about the available extensions, refer to the VM extensions and features article. Azure Stack Hub 支援 Azure 中一部分可用的擴充功能,且每個擴充功能都有特定的版本。Azure Stack Hub supports a subset of extensions that are available in Azure and each of the extensions have specific versions. Azure Stack Hub 雲端管理員可選擇要將哪些擴充功能提供給其使用者使用。The Azure Stack Hub cloud admin can choose which extensions to be made available to for their users. 若要檢視支援的擴充功能清單,請參考本文的 VM 擴充功能小節。To view the list of supported extensions, refer to the VM extensions section of this article.
虛擬機器網路Virtual machine network 指派給租用戶 VM 的公用 IP 位址可透過網際網路存取。Public IP addresses assigned to a tenant VM are accessible over the Internet.


Azure VM 有固定的 DNS 名稱。Azure VMs have a fixed DNS name.
指派給租用戶 VM 的公用 IP 位址只能從 Azure Stack 開發套件環境內存取。Public IP addresses assigned to a tenant VM are accessible within the Azure Stack Development Kit environment only. 使用者必須能夠透過 RDPVPN 存取 Azure Stack 開發套件,才能連線到在 Azure Stack Hub 中建立的 VM。A user must have access to the Azure Stack Development Kit via RDP or VPN to connect to a VM that is created in Azure Stack Hub.

在特定 Azure Stack Hub 執行個體內建立的 VM,其 DNS 名稱會以雲端管理員所設定的值為基礎。VMs created within a specific Azure Stack Hub instance have a DNS name based on the value that is configured by the cloud admin.
虛擬機器儲存體Virtual machine storage 支援受控磁碟Supports managed disks. Azure Stack Hub 版本 1808 和更新版本可支援受控磁碟。Managed disks are supported in Azure Stack Hub with version 1808 and later.
虛擬機器磁碟效能Virtual machine disk performance 取決於磁碟類型和大小。Depends on disk type and size. 取決於磁碟所連結的虛擬機器大小。Depends on VM size of the VM, which the disks are attached to. 如需詳細資訊,請參閱 Azure Stack Hub 中支援的 VM 大小一文。For more info, refer to the VM sizes supported in Azure Stack Hub article.
API 版本API versions Azure 的所有 VM 功能一律採用最新 API 版本。Azure always has the latest API versions for all the VM features. Azure Stack Hub 支援特定的 Azure 服務及這些服務的特定 API 版本。Azure Stack Hub supports specific Azure services and specific API versions for these services. 若要檢視支援的 API 版本清單,請參考此文章的 API 版本一節。To view the list of supported API versions, refer to the API versions section of this article.
Azure 執行個體中繼資料服務Azure Instance Metadata Service Azure 執行個體中繼資料服務會提供如何執行虛擬機器執行個體用以管理和設定虛擬機器的相關資訊。The Azure Instance Metadata Service provides info about running VM instances that can be used to manage and set up your VM. Azure Stack Hub 不支援 Azure 執行個體中繼資料服務。The Azure Instance Metadata Service isn't supported on Azure Stack Hub.
虛擬機器可用性設定組Virtual machine availability sets 多個容錯網域 (每一區域 2 或 3 個)。Multiple fault domains (2 or 3 per region).
多個更新網域。Multiple update domains.
多個容錯網域 (每一區域 2 或 3 個)。Multiple fault domains (2 or 3 per region).
單一更新網域,具有即時移轉可在更新期間保護工作負載。Single update domain, with live migration to protect workloads during update. 支援 20 個更新網域以確保範本相容性。20 update domains supported for template compatibility.
VM 和可用性設定組應位於相同的位置和資源群組中。VM and availability set should be in the same location and resource group.
虛擬機器擴展集Virtual machine scale sets 支援自動調整。Autoscale is supported. 不支援自動調整。Autoscale isn't supported.

使用入口網站、Resource Manager 範本或 PowerShell 將更多執行個體新增到擴展集。Add more instances to a scale set using the portal, Resource Manager templates, or PowerShell.
雲端見證Cloud Witness 從 Azure Stack Hub 可用的儲存體帳戶屬性中選取端點。Select the endpoints from the storage account properties available in Azure Stack Hub. 雲端見證是一種容錯移轉叢集仲裁見證類型,使用 Microsoft Azure 提供叢集仲裁投票功能。Cloud Witness is a type of Failover Cluster quorum witness that uses Microsoft Azure to provide a vote on cluster quorum.
相較於 Azure Stack Hub,全域 Azure 中的端點可能如下所示:The endpoints in global Azure compared to Azure Stack Hub may look like:
若是全域 Azure:For global Azure:
https://mywitness.blob.core.windows.net/
若是 Azure Stack Hub:For Azure Stack Hub:
https://mywitness.blob.<region>.<FQDN>/
虛擬機器診斷Virtual machine diagnostics 支援 Linux VM 診斷。Linux VM diagnostics are supported. Azure Stack Hub 不支援 Linux VM 診斷。Linux VM diagnostics aren't supported in Azure Stack Hub. 當您部署啟用了 VM 診斷的 Linux VM 時,部署會失敗。When you deploy a Linux VM with VM diagnostics enabled, the deployment fails. 如果您透過診斷設定啟用 Linux VM 基本計量,部署也會失敗。The deployment also fails if you enable the Linux VM basic metrics through diagnostic settings.
巢狀虛擬化 VM 大小Nested virtualization VM sizes 支援Supported 不支援Not supported

VM 大小VM sizes

Azure Stack Hub 會施加資源限制,來避免資源 (伺服器本機和服務層級) 的過度耗用。這類限制會降低其他租用戶耗用資源所造成的影響,進而改善租用戶體驗。Azure Stack Hub imposes resource limits to avoid over consumption of resources (server local and service-level.) These limits improve the tenant experience by reducing the affect resource consumption by other tenants.

  • 虛擬機器的網路輸出已有頻寬上限。For networking egress from the VM, there are bandwidth caps in place. Azure Stack Hub 的上限與 Azure 的上限相同。Caps in Azure Stack Hub are the same as the caps in Azure.
  • 針對儲存體資源,Azure Stack Hub 會實作儲存體 IOPS (每秒輸入/輸出作業數) 限制,以避免租用戶為了使用儲存體而造成基本的資源過度耗用。For storage resources, Azure Stack Hub implements storage IOPS (Input/Output Operations Per Second) limits to avoid basic overconsumption of resources by tenants for storage use.
  • 就 VM 磁碟而言,Azure Stack Hub 的磁碟 IOPS 是 VM 大小的函式,而不是磁碟類型的函式。For VM disks, disk IOPS on Azure Stack Hub is a function of VM size instead of the disk type. 這表示,對於 Standard_Fs 系列虛擬機器,無論您選擇 SSD 或 HDD 磁碟類型,次要資料磁碟的 IOPS 限制都是 2300 個 IOPS。This means that for a Standard_Fs series VM, regardless of whether you choose SSD or HDD for the disk type, the IOPS limit for an second data disk is 2300 IOPS.
  • 連接至 VM 的暫存磁片不是持續性的,而且可能會在控制項平面作業(例如調整大小或停止解除配置)上遺失。Temp disks attached to the VM are not persistent and can be lost on control plane operations such as resize or stop-deallocate.

下表列出 Azure Stack Hub 所支援的虛擬機器及其設定:The following table lists the VMs that are supported on Azure Stack Hub along with their configuration:

類型Type 大小Size 支援的大小範圍Range of supported sizes
一般用途General purpose 基本 ABasic A A0 - A4A0 - A4
一般用途General purpose 標準 AStandard A A0 - A7A0 - A7
一般用途General purpose Av2 系列Av2-series A1_v2 - A8m_v2A1_v2 - A8m_v2
一般用途General purpose D 系列D-series D1 - D4D1 - D4
一般用途General purpose Dv2 系列Dv2-series D1_v2 - D5_v2D1_v2 - D5_v2
一般用途General purpose DS 系列DS-series DS1 - DS4DS1 - DS4
一般用途General purpose DSv2 系列DSv2-series DS1_v2 - DS5_v2DS1_v2 - DS5_v2
記憶體最佳化Memory optimized D 系列D-series D11 - D14D11 - D14
記憶體最佳化Memory optimized DS 系列DS-series DS11 - DS14DS11 - DS14
記憶體最佳化Memory optimized Dv2 系列Dv2-series D11_v2 - DS14_v2D11_v2 - DS14_v2
記憶體最佳化Memory optimized DSv2 系列DSv2-series DS11_v2 - DS14_v2DS11_v2 - DS14_v2
計算最佳化Compute optimized F 系列F-series F1 - F16F1 - F16
計算最佳化Compute optimized Fs 系列Fs-series F1s - F16sF1s - F16s
計算最佳化Compute optimized Fsv2 系列Fsv2-series F2s_v2 - F64s_v2F2s_v2 - F64s_v2

Azure Stack Hub 與 Azure 之間的 VM 大小及其關聯的資源數量是一致的。VM sizes and their associated resource quantities are consistent between Azure Stack Hub and Azure. 舉凡記憶體數量、核心數目,以及可建立的資料磁碟數目/大小,都具有此一致性。This consistency includes the amount of memory, the number of cores, and the number/size of data disks that can be created. 不過,相同大小 VM 的效能取決於特定 Azure Stack Hub 環境的底層特性。However, performance of VMs with the same size depends on the underlying characteristics of a particular Azure Stack Hub environment.

VM 擴充功能VM extensions

Azure Stack Hub 包含一小組擴充功能。Azure Stack Hub includes a small set of extensions. 您可以透過 Marketplace 摘要整合取得更新和額外的擴充功能。Updates and additional extensions are available through Marketplace syndication. 將自訂延伸模組帶入 Azure Stack Hub 不是支援的案例;必須先將擴充功能上線至 Azure,才能在 Azure Stack Hub 中使用。Bringing custom extensions into Azure Stack Hub is not a supported scenario; an extension must first be onboarded to Azure to be made available in Azure Stack Hub.

使用下列 PowerShell 腳本,取得您 Azure Stack Hub 環境中可用的 VM 擴充功能清單。Use the following PowerShell script to get the list of VM extensions that are available in your Azure Stack Hub environment.

Get-AzVmImagePublisher -Location local | `
  Get-AzVMExtensionImageType | `
  Get-AzVMExtensionImage | `
  Select Type, Version | `
  Format-Table -Property * -AutoSize

如果在 VM 部署上佈建延伸模組所花費的時間太長,請讓佈建逾時,而不要嘗試停止程序來將 VM 解除配置或刪除。If provisioning an extension on a VM deployment takes too long, let the provisioning timeout instead of trying to stop the process to deallocate or delete the VM.

API 版本API versions

Azure Stack Hub 中的 VM 功能支援下列 API 版本:VM features in Azure Stack Hub support the following API versions:

"2017-12-01"、"2017-03-30"、"2016-03-30"、"2015-06-15""2017-12-01", "2017-03-30", "2016-03-30", "2015-06-15"

您可以使用下列 PowerShell 指令碼,取得您的 Azure Stack Hub 環境中可用 VM 功能的 API 版本:You can use the following PowerShell script to get the API versions for the VM features that are available in your Azure Stack Hub environment:

Get-AzResourceProvider | `
  Select ProviderNamespace -Expand ResourceTypes | `
  Select * -Expand ApiVersions | `
  Select ProviderNamespace, ResourceTypeName, @{Name="ApiVersion"; Expression={$_}} | `
  where-Object {$_.ProviderNamespace -like "Microsoft.compute"}

如果雲端操作員將您的 Azure Stack Hub 環境更新成較新的版本,所支援資源類型和 API 版本的清單可能會有所不同。The list of supported resource types and API versions may vary if the cloud operator updates your Azure Stack Hub environment to a newer version.

Windows 啟用Windows activation

Windows 產品的使用必須使用符合產品使用權及 Microsoft 授權條款。Windows products must be used in accordance with Product Use Rights and Microsoft license terms. Azure Stack Hub 會使用自動虛擬機器啟用 (AVMA) 來啟用 Windows Server VM。Azure Stack Hub uses Automatic VM Activation (AVMA) to activate Windows Server VMs.

  • Azure Stack Hub 主機會使用 Windows Server 2016 的 AVMA 金鑰啟動 Windows。Azure Stack Hub host activates Windows with AVMA keys for Windows Server 2016. 所有執行 Windows Server 2012 R2 或更新版本的 VM 均會自動啟動。All VMs that run Windows Server 2012 R2 or later are automatically activated.
  • 執行 Windows Server 2012 或更新版本的 VM 不會自動啟用,而必須使用 MAK 啟用來啟用。VMs that run Windows Server 2012 or earlier aren't automatically activated and must be activated by using MAK activation. 若要使用 MAK 啟用,您必須提供您自己的產品金鑰。To use MAK activation, you must provide your own product key.

Microsoft Azure 會使用 KMS 啟用來啟動 Windows VM。Microsoft Azure uses KMS activation to activate Windows VMs. 將 VM 從 Azure Stack Hub 移至 Azure 時若遇到啟用方面的問題,請參閱對 Azure Windows VM 啟用問題進行疑難排解If you move a VM from Azure Stack Hub to Azure and encounter activation problems, see Troubleshoot Azure Windows VM activation problems. 如需其他資訊,請參閱 Azure 支援小組的部落格文章:對 Azure VM 上的 Windows 啟用失敗進行疑難排解Additional info can be found at the Troubleshooting Windows activation failures on Azure VMs Azure Support Team Blog post.

高可用性High Availability

您的 VM 可能會因為 Azure Stack Hub 操作員排定的計劃性維護而需要重新啟動。Your VM may be subject to a reboot due to planned maintenance as scheduled by the Azure Stack Hub operator. 為了讓 Azure 中的多 VM 生產系統實現高可用性,會將 VM 放在可用性設定組中,此設定組會將 VM 分散在多個容錯網域和更新網域中。For high availability of a multi-VM production system in Azure, VMs are placed in an availability set that spreads them across multiple fault domains and update domains. 在較小規模的 Azure Stack Hub 中,可用性設定組中的容錯網域會定義為縮放單位中的單一節點。In the smaller scale of Azure Stack Hub, a fault domain in an availability set is defined as a single node in the scale unit.

雖然 Azure Stack Hub 的基礎結構已經具備失敗復原能力,但在發生硬體故障時,基礎技術 (容錯移轉叢集) 仍然會造成受影響實體伺服器上的 VM 產生一些停機時間。While the infrastructure of Azure Stack Hub is already resilient to failures, the underlying technology (failover clustering) still incurs some downtime for VMs on an impacted physical server if there's a hardware failure. Azure Stack Hub 支援的可用性設定組最多可以有三個容錯網域 (與 Azure 一致)。Azure Stack Hub supports having an availability set with a maximum of three fault domains to be consistent with Azure.

容錯網域Fault domains 系統會將放在可用性設定組中的 VM 儘可能平均分散到多個容錯網域 (Azure Stack Hub 節點),讓這些 VM 在實體上彼此隔離。VMs placed in an availability set will be physically isolated from each other by spreading them as evenly as possible over multiple fault domains (Azure Stack Hub nodes). 如果發生硬體故障,失敗容錯網域中的 VM 將會在其他容錯網域中重新啟動。If there's a hardware failure, VMs from the failed fault domain will be restarted in other fault domains. 它們會保留在與其他 VM 不同的容錯網域中,但如有可能,則會留在相同的可用性設定組中。They'll be kept in separate fault domains from the other VMs but in the same availability set if possible. 當硬體回到線上時,系統會將 VM 重新平衡以保持高可用性。When the hardware comes back online, VMs will be rebalanced to maintain high availability.
更新網域Update domains 更新網域是另一種可讓 Azure 在可用性設定組中提供高可用性的方式。Update domains are another way that Azure provides high availability in availability sets. 更新網域是可以同時進行維護的基礎硬體邏輯群組。An update domain is a logical group of underlying hardware that can undergo maintenance at the same time. 位於相同更新網域中的 VM 會在預定進行的維護期間一起重新啟動。VMs located in the same update domain will be restarted together during planned maintenance. 當租用戶在可用性設定組內建立 VM 時,Azure 平台會自動將 VM 分散到這些更新網域中。As tenants create VMs within an availability set, the Azure platform automatically distributes VMs across these update domains.
在 Azure Stack Hub 中,會先將 VM 即時移轉至叢集內的各個其他線上主機,然後才更新 VM 的基礎主機。In Azure Stack Hub, VMs are live migrated across the other online hosts in the cluster before their underlying host is updated. 由於在主機更新期間並不會導致租用戶停機,因此 Azure Stack Hub 上更新網域功能的存在只是為了與 Azure 的範本相容。Since there's no tenant downtime during a host update, the update domain feature on Azure Stack Hub only exists for template compatibility with Azure. 可用性設定組中的 VM 會在入口網站上顯示 0 來作為更新網域的號碼。VMs in an availability set will show 0 as their update domain number on the portal.

後續步驟Next steps

在 Azure Stack Hub 中使用 PowerShell 建立 Windows VMCreate a Windows VM with PowerShell in Azure Stack Hub