使用门户将 VM 部署到专用主机Deploy VMs to dedicated hosts using the portal

本文介绍了如何创建 Azure 专用主机来托管虚拟机 (VM)。This article guides you through how to create an Azure dedicated host to host your virtual machines (VMs).


  • 专用主机可用的大小和硬件类型因区域而异。The sizes and hardware types available for dedicated hosts vary by region. 请参阅主机定价页来了解详细信息。Refer to the host pricing page to learn more.

创建主机组Create a host group

主机组是表示专用主机集合的资源。A host group is a resource that represents a collection of dedicated hosts. 你在某个区域中创建主机组,并向其中添加主机。You create a host group in a region, and add hosts to it. 规划高可用性时,可以为专用主机进行以下选择:When planning for high availability, you can use the following choice with your dedicated hosts:

  • 跨映射到物理机架的多个容错域。Span across multiple fault domains which are mapped to physical racks.

在这种情况下,你需要为主机组提供容错域计数。In this case, you are need to provide the fault domain count for your host group.

在此示例中,我们将创建使用 2 个容错域的主机组。In this example, we will create a host group using 2 fault domains.

  1. 打开 Azure 门户Open the Azure portal.

  2. 选择左上角的“创建资源”。Select Create a resource in the upper left corner.

  3. 搜索“主机组”,然后从结果中选择“主机组”。Search for Host group and then select Host Groups from the results.

  4. 在“主机组”页中,选择“添加”。In the Host Groups page, select Add.

  5. 选择要使用的订阅,然后选择“新建”以创建新的资源组。Select the subscription you would like to use, and then select Create new to create a new resource group.

  6. 键入“myDedicatedHostsRG”作为“名称”,然后选择“确定”。Type myDedicatedHostsRG as the Name and then select OK.

  7. 对于“主机组名称”,请键入“myHostGroup”。For Host group name , type myHostGroup.

  8. 对于“位置”,请选择“中国东部”。 For Location , select China East.

  9. 选择 2 作为“容错域计数”。For Fault domain count , select 2.

  10. 选择“查看 + 创建”,然后等待验证。Select Review + create and then wait for validation.

  11. 看到“验证通过”消息后,选择“创建”以创建主机组。 Once you see the Validation passed message, select Create to create the host group.

应当只需很短时间便可创建主机组。It should only take a few moments to create the host group.

创建专用主机Create a dedicated host

现在,在主机组中创建一个专用主机。Now create a dedicated host in the host group. 除了主机名称外,还需要提供主机的 SKU。In addition to a name for the host, you are required to provide the SKU for the host. 主机 SKU 捕获受支持的 VM 系列以及专用主机的硬件代系。Host SKU captures the supported VM series as well as the hardware generation for your dedicated host.

有关主机 SKU 和定价的详细信息,请参阅 Azure 专用主机定价For more information about the host SKUs and pricing, see Azure Dedicated Host pricing.

如果为主机组设置了容错域计数,则系统会要求你为主机指定容错域。If you set a fault domain count for your host group, you will be asked to specify the fault domain for your host.

  1. 选择左上角的“创建资源”。Select Create a resource in the upper left corner.

  2. 搜索“主机”,然后从结果中选择“主机”。Search for Hosts and then select Hosts from the results.

  3. 在“主机”页中,选择“添加”。 In the Hosts page, select Add.

  4. 选择要使用的订阅。Select the subscription you would like to use.

  5. 选择“myDedicatedHostsRG”作为“资源组”。Select myDedicatedHostsRG as the Resource group.

  6. 在“实例详细信息”中,键入“myHost”作为“名称”,并选择“中国东部”作为位置。In Instance details , type myHost for the Name and select China East for the location.

  7. 在“硬件配置文件”中,对于“大小系列”,请选择“标准 Es3 系列 - 类型 1”;对于“主机组”,请选择“myHostGroup”;对于“容错域”,请选择 1。In Hardware profile , select Standard Es3 family - Type 1 for the Size family , select myHostGroup for the Host group and then select 1 for the Fault domain. 至于其余字段,请保留默认值。Leave the defaults for the rest of the fields.

  8. 完成后,选择“查看 + 创建”,然后等待验证。When you are done, select Review + create and wait for validation.

  9. 看到“验证通过”消息后,选择“创建”以创建主机。 Once you see the Validation passed message, select Create to create the host.

创建 VMCreate a VM

  1. 在 Azure 门户的左上角,选择“创建资源”。Choose Create a resource in the upper left corner of the Azure portal.

  2. 在 Azure 市场资源列表上方的搜索框中,搜索并选择要使用的映像,然后选择“创建”。In the search box above the list of Azure Marketplace resources, search for and select the image you want use, then choose Create.

  3. 在“基本信息”选项卡中的“项目详细信息”下,确保选择了正确的订阅,然后选择 myDedicatedHostsRG 作为“资源组” 。In the Basics tab, under Project details , make sure the correct subscription is selected and then select myDedicatedHostsRG as the Resource group.

  4. 在“实例详细信息”下,对于“虚拟机名称”,键入“myVM”,对于“位置”,选择“中国东部”。Under Instance details , type myVM for the Virtual machine name and choose China East for your Location.

  5. 对于大小,选择“更改大小”。For the size, select Change size. 在可用大小列表中,选择 Esv3 系列其中一个,例如“标准 E2s v3”。In the list of available sizes, choose one from the Esv3 series, like Standard E2s v3. 可能需要清除筛选器才能查看所有可用大小。You may need to clear the filter in order to see all of the available sizes.

  6. 根据需要完成“基本信息”选项卡上的其余字段。Complete the rest of the fields on the Basics tab as needed.

  7. 在页面顶部,选择“高级”选项卡,然后在“主机”部分,对于“主机组”,选择 myHostGroup,对于“主机”,选择 myHost 。At the top of the page, select the Advanced tab and in the Host section, select myHostGroup for Host group and myHost for the Host. 选择主机组和主机

  8. 保留剩余的默认值,然后选择页面底部的“查看 + 创建”按钮。Leave the remaining defaults and then select the Review + create button at the bottom of the page.

  9. 显示验证通过的消息时,选择“创建”。When you see the message that validation has passed, select Create.

部署 VM 需要数分钟。It will take a few minutes for your VM to be deployed.

添加现有 VMAdd an existing VM

可将现有 VM 添加到专用主机,但必须先停止/解除分配该 VM。You can add an exiting VM to a dedicated host, but the VM must first be Stop\Deallocated. 在将 VM 移动到专用主机之前,请确保 VM 配置受支持:Before you move a VM to a dedicated host, make sure that the VM configuration is supported:

  • VM 大小必须属于专用主机所用的同一大小系列。The VM size must be in the same size family as the dedicated host. 例如,如果专用主机是 DSv3,则 VM 大小可以是 Standard_D4s_v3,但不能是 Standard_A4_v2。For example, if your dedicated host is DSv3, then the VM size could be Standard_D4s_v3, but it could not be a Standard_A4_v2.

  • VM 需要位于专用主机所在的同一区域。The VM needs to be located in same region as the dedicated host.

  • VM 不能是邻近放置组的一部分。The VM can't be part of a proximity placement group. 在将 VM 移动到专用主机之前,请先从邻近放置组中删除该 VM。Remove the VM from the proximity placement group before moving it to a dedicated host. 有关详细信息,请参阅将 VM 移出邻近放置组For more information, see Move a VM out of a proximity placement group

  • VM 不能位于可用性集中。The VM can't be in an availability set.

使用门户将 VM 迁移到专用主机。Move the VM to a dedicated host using the portal.

  1. 打开 VM 所对应的页。Open the page for the VM.
  2. 选择“停止”以停止/解除分配 VM。Select Stop to stop\deallocate the VM.
  3. 在左侧菜单中选择“配置”。Select Configuration from the left menu.
  4. 从下拉菜单中选择主机组和主机。Select a host group and a host from the drop-down menus.
  5. 完成操作后,在页面顶部选择“保存”。When you are done, select Save at the top of the page.
  6. 将 VM 添加到主机之后,从左侧菜单中选择“概述”。After the VM has been added to the host, select Overview from the left menu.
  7. 在页面顶部,选择“启动”以重启 VM。At the top of the page, select Start to restart the VM.

后续步骤Next steps

  • 有关详细信息,请参阅专用主机概述。For more information, see the Dedicated hosts overview.

  • 此处有一个示例模板,该模板使用区域和容错域来最大限度地提高在某个地区的复原能力。There is sample template, found here, that uses both zones and fault domains for maximum resiliency in a region.

  • 还可以使用 Azure CLIPowerShell 部署专用主机。You can also deploy a dedicated host using the Azure CLI or PowerShell.