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 与 Azure 所提供的 VM 功能有何差异。Before you deploy VMs, you should learn the differences between the VM features available in Azure Stack Hub and 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 (China) Azure Stack HubAzure Stack Hub
虚拟机映像Virtual machine images Azure 市场包含可用于创建 VM 的映像。The Azure Marketplace has images that you can use to create a VM. 若要查看 Azure 市场中的可用映像列表,请参阅 Azure 市场页。See the Azure Marketplace page to view the list of images that are available in the Azure Marketplace. Azure Stack Hub 市场中默认不会提供任何映像。By default, there aren't any images available in the Azure Stack Hub marketplace. Azure Stack Hub 云管理员必须先将映像发布或下载到 Azure Stack Hub 市场,然后用户才能使用这些映像。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. 这些特性包括更大的内存和虚拟化持久性内存 (vPMEM)。These features include increased memory, and virtualized persistent memory (vPMEM). 在本地运行的第二代 VM 具有 Azure 中尚不支持的一些功能。Generation two VMs running on-premises, have some features that aren't supported in Azure yet. 有关详细信息,请参阅对 Azure 上的第 2 代 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 上的第 2 代 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 配额限制由 Azure 设置Quota limits are set by Azure 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 地址可通过 Internet 访问。Public IP addresses assigned to a tenant VM are accessible over the Internet.

Azure VM 具有固定的 DNS 名称。Azure VMs have a fixed DNS name.
只能在 Azure Stack 开发工具包环境中访问分配给租户 VM 的公共 IP 地址。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. 版本为 1808 及更高版本的 Azure Stack Hub 支持托管磁盘。Managed disks are supported in Azure Stack Hub with version 1808 and later.
虚拟机磁盘性能Virtual machine disk performance 取决于磁盘类型和大小。Depends on disk type and size. 取决于磁盘所附加到的 VM 的大小。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 实例元数据服务提供有关可用于管理和设置 VM 的正在运行的 VM 实例的信息。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.

使用门户、资源管理器模板或 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. 云见证是一种故障转移群集仲裁见证,它使用 Azure 提供对群集仲裁的投票。Cloud Witness is a type of Failover Cluster quorum witness that uses Azure to provide a vote on cluster quorum.
Azure 中的终结点与 Azure Stack Hub 相比可能如下所示:The endpoints in Azure compared to Azure Stack Hub may look like:
对于 Azure:For Azure:
对于 Azure Stack Hub:For Azure Stack Hub:
虚拟机诊断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 大小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.

  • VM 的网络出口有带宽上限。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 系列 VM,不管你选择 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 支持的 VM 及其配置: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
GPUGPU NCv3 系列NCv3-series NC6s_v3-NC24s_v3NC6s_v3-NC24s_v3
GPUGPU NVv4 系列NVv4-series NV4as_v4NV4as_v4
GPUGPU NCasT4_v3 系列NCasT4_v3-series NC4as_T4_v3-NC64as_T4_v3NC4as_T4_v3-NC64as_T4_v3

VM 大小及其关联的资源数量在 Azure Stack Hub 与 Azure 之间是一致的。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. 可以通过市场联合来获取更新和其他扩展。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 的分配或将 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

必须根据产品使用权利和 Microsoft 许可条款使用 Windows 产品。Windows products must be used in accordance with Product Use Rights and Microsoft license terms. Azure Stack Hub 使用自动 VM 激活 (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.

Azure 使用 KMS 激活来激活 Windows VM。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 支持团队博客文章 Troubleshooting Windows activation failures on Azure VMs(排查 Azure VM 上的 Windows 激活故障)中找到其他信息。Additional info can be found at the Troubleshooting Windows activation failures on Azure VMs Azure Support Team Blog post.

高可用性High Availability

由于 Azure Stack Hub 操作员计划的计划内维护,你的VM 可能需要重新启动。Your VM may be subject to a reboot due to planned maintenance as scheduled by the Azure Stack Hub operator. 为了在 Azure 中实现多 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 保持一致,Azure Stack Hub 支持的可用性集最多有三个容错域。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 节点)中。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 会先跨群集中的其他联机主机进行实时迁移,然后其基础主机才会进行更新。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