您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

教程:在 Hyper-V 中预配 Azure Data Box GatewayTutorial: Provision Azure Data Box Gateway in Hyper-V

概述Overview

本教程介绍如何在主机系统上预配 Data Box Gateway,此类主机系统在 Windows Server 2016、Windows Server 2012 R2 或 Windows Server 2012 上运行 Hyper-V。This tutorial describes how to provision a Data Box Gateway on a host system running Hyper-V on Windows Server 2016, Windows Server 2012 R2, or Windows Server 2012.

需要管理员权限才能预配和配置虚拟设备。You need administrator privileges to provision and configure a virtual device. 完成预配和初始设置可能需要大约 10 分钟。The provisioning and initial setup can take around 10 minutes to complete.

在本教程中,你将了解如何执行以下操作:In this tutorial, you learn how to:

  • 确保主机满足最低设备要求Ensure host meets minimum device requirements
  • 预配虚拟机监控程序中的虚拟设备Provision a virtual device in hypervisor
  • 启动虚拟设备并获取 IP 地址Start the virtual device and get the IP address

如果没有 Azure 订阅,请在开始之前创建一个免费帐户If you don't have an Azure subscription, create a free account before you begin.

先决条件Prerequisites

对于在 Windows Server 2016 或 Windows Server 2012 R2 上运行 Hyper-V 的主机系统,在其上预配虚拟设备的先决条件如下所示。The prerequisites to provision a virtual device on a host system running Hyper-V on Windows Server 2016 or Windows Server 2012 R2, are as follows.

对于 Data Box Gateway 资源For the Data Box Gateway resource

在开始之前,请确保:Before you begin, make sure that:

对于 Data Box Gateway 虚拟设备For the Data Box Gateway virtual device

在部署设备之前,请确保:Before you deploy a device, make sure that:

  • 有权访问在 Windows Server 2012 R2 或更高版本上运行 Hyper-V 的主机系统,以便预配设备。You have access to a host system running Hyper-V on Windows Server 2012 R2 or later that can be used to a provision a device.

  • 主机系统能够将以下资源专用于预配虚拟设备:The host system is able to dedicate the following resources to provision your virtual device:

    • 至少 4 个核心。A minimum of 4 cores.
    • 至少 8 GB 的 RAM。At least 8 GB of RAM. 强烈建议至少配置 16 GB 的 RAM。We strongly recommend at least 16 GB of RAM.
    • 一个网络接口。One network interface.
    • 一个 250 GB 的 OS 磁盘。A 250 -GB OS disk.
    • 一个用于存储数据的 2 TB 虚拟磁盘。A 2-TB virtual disk for data.

对于数据中心中的网络For the network in the datacenter

开始之前:Before you begin:

  • 查看部署 Data Box Gateway 的网络要求,并根据要求配置数据中心网络。Review the networking requirements to deploy a Data Box Gateway and configure the datacenter network as per the requirements. 有关详细信息,请参阅 Data Box Gateway 网络要求For more information, see Data Box Gateway networking requirements.
  • 请确保最小 Internet 带宽为 20 Mbps,以便实现设备的理想运行。Make sure that the minimum Internet bandwidth is 20 Mbps to allow for optimal working of the device.

检查主机系统Check the host system

若要创建虚拟设备,需满足以下条件:To create a virtual device, you need:

  • 在 Windows Server 2016、Windows Server 2012 R2 或 Windows Server 2012 上安装 Hyper-V 角色。The Hyper-V role installed on Windows Server 2016, Windows Server 2012 R2, or Windows Server 2012.

  • 将 Microsoft Windows 客户端上的 Microsoft Hyper-V 管理器连接到主机。Microsoft Hyper-V Manager on a Microsoft Windows client connected to the host.

  • 确保在其上创建虚拟设备的基础硬件(主机系统)能够将以下资源专用于虚拟设备:Make sure that the underlying hardware (host system) on which you are creating the virtual device is able to dedicate the following resources to your virtual device:

    • 至少 4 个虚拟处理器。A minimum of 4 virtual processors.
    • 至少 8 GB 的 RAM。At least 8 GB of RAM.
    • 一个连接到网络的网络接口,可以将流量路由到 Internet。One network interface connected to the network capable of routing traffic to Internet.
    • 一个 250 GB 的 OS 磁盘。A 250-GB OS disk.
    • 一个用于存储系统数据的 2 TB 虚拟磁盘。A 2-TB virtual disk for system data.

BitLocker 注意事项BitLocker Considerations

预配虚拟机监控程序中的虚拟设备Provision a virtual device in hypervisor

执行以下步骤,预配虚拟机监控程序中的设备。Perform the following steps to provision a device in your hypervisor.

  1. 在 Windows Server 主机上,将虚拟设备映像复制到本地驱动器。On your Windows Server host, copy the virtual device image to a local drive. 已通过 Azure 门户下载该 VHDX 映像。You downloaded this VHDX image through the Azure portal. 记下复制映像的位置,因为在以后的过程中将使用此映像。Make a note of the location where you copied the image as you are using this image later in the procedure.

  2. 打开 “服务器管理器”Open Server Manager. 单击右上角的“工具”,并选择“Hyper-V 管理器”。 In the top-right corner, click Tools and select Hyper-V Manager.

    在服务器管理器中选择“Hyper-V 管理器”

  3. 在“Hyper-V 管理器”的作用域窗格中,右键单击系统节点打开上下文菜单,并单击“新建” > “虚拟机”。 In Hyper-V Manager, in the scope pane, right-click your system node to open the context menu, and then click New > Virtual Machine.

    在 Hyper-V 管理器中创建新的虚拟机

  4. 在新建虚拟机向导的“准备工作”页上,单击“下一步”。 On the Before you begin page of the New Virtual Machine Wizard, click Next.

  5. 在“指定名称和位置”页上,提供虚拟设备的“名称”。 On the Specify name and location page, provide a Name for your virtual device. 单击“下一步”。Click Next.

    “指定名称和位置”页

  6. 在“指定代数”页上选择“第 2 代”作为 .vhdx 设备映像类型,然后单击“下一步”。 On the Specify generation page, choose Generation 2 for the .vhdx device image type, and then click Next.

    “指定代数”页

  7. 在“分配内存”页上,将“启动内存”指定为至少“8192 MB”,且不启用动态内存,然后单击“下一步”。 On the Assign memory page, specify a Startup memory of at least 8192 MB, don't enable dynamic memory, and then click Next.

    “分配内存”页

  8. 在“配置网络”页上,指定连接到 Internet 的虚拟交换机,并单击“下一步”。 On the Configure networking page, specify the virtual switch that is connected to the Internet and then click Next.

    “配置网络”页

  9. 在“连接虚拟硬盘”页上,选择“使用现有虚拟硬盘”,指定虚拟设备映像的位置,然后单击“下一步”。 On the Connect virtual hard disk page, choose Use an existing virtual hard disk, specify the location of the virtual device image, and then click Next.

    “连接虚拟硬盘”页

  10. 查看“摘要”,并单击“完成”创建虚拟机。 Review the Summary and then click Finish to create the virtual machine.

    完成“新建虚拟机”向导页

  11. 若要满足最低要求,需要 4 个虚拟处理器。To meet the minimum requirements, you need four virtual processors. 若要添加 4 个虚拟处理器,请在“Hyper-V 管理器”窗口中选择主机系统。To add four virtual processors, select your host system in the Hyper-V Manager window. 在“虚拟机”列表下的右窗格中,找到刚创建的虚拟机。In the right-pane under the list of Virtual Machines, locate the virtual machine you just created. 选择计算机名称,右键单击该名称后选择“设置”。Select and right-click the machine name and select Settings.

    虚拟机设置

  12. 在“设置”页的左窗格中,单击“处理器”。 On the Settings page, in the left-pane, click Processor. 在右窗格中,将“虚拟处理器数目”设置为 4(或 4 以上)。In the right-pane, set number of virtual processors to 4 (or more). 单击“应用”。Click Apply.

    在“设置”页上设置虚拟处理器数量

  13. 若要满足最低要求,还需添加 2 TB 的虚拟数据磁盘。To meet the minimum requirements, you also need to add a 2-TB virtual data disk. 在“设置”页中:In the Settings page:

    1. 在左窗格中,选择“SCSI 控制器”。In the left pane, select SCSI Controller.
    2. 在右窗格中,选择“硬盘驱动器”,并单击“添加”。 In the right pane, select Hard Drive, and click Add.

    在“设置”页上添加硬盘驱动器

  14. 在“硬盘驱动器”页上,选择“虚拟硬盘”选项,并单击“新建”。 On the Hard drive page, select the Virtual hard disk option and click New. 此时会启动“新建虚拟硬盘向导”。The New Virtual Hard Disk Wizard starts.

    新建虚拟硬盘向导

  15. 在新建虚拟硬盘向导的“准备工作”页上,单击“下一步”。 On the Before you begin page of the New Virtual Hard Disk Wizard, click Next.

  16. 在“选择磁盘格式”页上,接受默认选项:“VHDX”格式。 On the Choose Disk Format page, accept the default option of VHDX format. 单击“下一步”。Click Next.

  17. 在“选择磁盘类型”页上,将虚拟硬盘类型设置为“动态扩展”(推荐)。 On the Choose Disk Type page, set virtual hard disk type as Dynamically expanding (recommended). 也可以选择“固定大小”磁盘,但可能需等待很长时间。Fixed size disk would work but you may need to wait a long time. 建议不要使用“差异”选项。We recommend that you do not use the Differencing option. 单击“下一步”。Click Next.

    “选择磁盘类型”页

  18. 在“指定名称和位置”页上,提供数据磁盘的“名称”和“位置”(可以通过浏览选择一个)。 On the Specify Name and Location page, provide a name and location (you can browse to one) for the data disk. 单击“下一步”。Click Next.

    “指定名称和位置”页

  19. 在“配置磁盘”页上,选择“新建空白虚拟硬盘”选项,将大小指定为“2 TB”(或 2 TB 以上)。 On the Configure Disk page, select the Create a new blank virtual hard disk option, and specify the size as 2 TB (or more).

    2 TB 为最低要求,可以预配更大的磁盘。While 2 TB is the minimum requirement, you can always provision a larger disk. 请注意,不能压缩已预配的磁盘。Note that you cannot shrink the disk once it's provisioned. 尝试收缩磁盘会导致设备上的所有本地数据丢失。Attempting to shrink the disk results in a loss of all the local data on the device. 不支持扩展数据磁盘。Expansion of data disk is not supported. 单击“下一步”。Click Next.

    “配置磁盘”页

  20. 在“摘要”页上查看虚拟数据磁盘的详细信息,如果一切符合要求,则请单击“完成”创建该磁盘。 On the Summary page, review the details of your virtual data disk and if satisfied, click Finish to create the disk. 此时会关闭向导并向虚拟机添加虚拟硬盘。The wizard closes and a virtual hard disk is added to your machine.

    完成“新建虚拟硬盘向导”页

  21. 返回到“设置”页。Return to the Settings page. 单击“确定”关闭“设置”页,返回到“Hyper-V 管理器”窗口。 Click OK to close the Settings page and return to Hyper-V Manager window.

    “设置”页

虚拟机现已完全配置。Your virtual machine is now fully configured.

备注

无法通过复制已配置的 VHD 来配置新的 Data Box Gateway。You can't provision a new Data Box Gateway by copying your configured VHD. 每个新 Data Box Gateway 虚拟设备必须通过从 Azure 门户下载的 Hyper-V 虚拟设备映像进行预配。Each new Data Box Gateway virtual device must be provisioned from a virtual device image for Hyper-V that is downloaded from the Azure portal.

启动虚拟设备并获取 IPStart the virtual device and get the IP

执行以下步骤,启动虚拟设备并与其进行连接。Perform the following steps to start your virtual device and connect to it.

启动虚拟设备To start the virtual device

  1. 启动虚拟设备。Start the virtual device.

    启动虚拟设备

  2. 设备运行后,选择该设备,右键单击后选择“连接”。After the device is running, select the device, right click, and select Connect.

  3. 可能需要等待 10-15 分钟设备才能准备就绪。You may have to wait 10-15 minutes for the device to be ready. 控制台会显示指示进度的状态消息。A status message is displayed on the console to indicate the progress. 设备就绪后,转到“操作”。After the device is ready, go to Action. Ctrl + Alt + Delete 登录到虚拟设备。Press Ctrl + Alt + Delete to sign in to the virtual device. 默认用户为 EdgeUser,默认密码为 Password1The default user is EdgeUser and the default password is Password1.

    登录到虚拟设备

  4. 步骤 5-7 仅适用于在非 DHCP 环境中启动的情况。Steps 5-7 only apply when booting up in a non-DHCP environment. 如果是在 DHCP 环境中,请跳过这些步骤。If you are in a DHCP environment, then skip these steps. 如果已在非 DHCP 环境中启动设备,则会看到指示此内容的消息。If you booted up your device in non-DHCP environment, you will see a message to the effect.

  5. 若要配置网络,请使用 Get-HcsIpAddress 命令列出在虚拟设备上启用的网络接口。To configure the network, use the Get-HcsIpAddress command to list the network interfaces enabled on your virtual device. 如果设备启用了单个网络接口,则分配到该接口的默认名称为 EthernetIf your device has a single network interface enabled, the default name assigned to this interface is Ethernet.

  6. 使用 Set-HcsIpAddress cmdlet 配置网络。Use the Set-HcsIpAddress cmdlet to configure the network. 请参阅以下示例:See the following example:

    Set-HcsIpAddress –Name Ethernet –IpAddress 10.161.22.90 –Netmask 255.255.255.0 –Gateway 10.161.22.1

  7. 完成初始设置并启动设备以后,会显示设备横幅文本。After the initial setup is complete and the device has booted up, you will see the device banner text. 记下显示在横幅文本中的 IP 地址和 URL,以便管理设备。Make a note of the IP address and the URL displayed in the banner text to manage the device. 请使用该 IP 地址连接到虚拟设备的 Web UI 并完成本地设置和激活。Use this IP address to connect to the web UI of your virtual device and complete the local setup and activation.

    带有 IP 地址和连接 URL 的虚拟设备横幅

如果设备不符合最低配置要求,则会在横幅文本中显示错误。If your device does not meet the minimum configuration requirements, you see an error in the banner text. 修改设备配置,使虚拟机有足够的资源来满足最低要求。Modify the device configuration so that the machine has adequate resources to meet the minimum requirements. 然后即可重新启动设备并与之进行连接。You can then restart and connect to the device. 请参阅检查主机系统是否满足最小虚拟设备要求中的最低配置要求。Refer to the minimum configuration requirements in Check the host system meets minimum virtual device requirements.

若在使用本地 Web UI 进行初始配置期间遇到其他错误,请参阅以下工作流:If you face any other error during the initial configuration using the local web UI, refer to the following workflows:

后续步骤Next steps

在本教程中,我们已了解有关 Data Box Gateway 的主题,例如:In this tutorial, you learned about Data Box Gateway topics such as:

  • 确保主机满足最低设备要求Ensure host meets minimum device requirements
  • 预配虚拟机监控程序中的虚拟设备Provision a virtual device in hypervisor
  • 启动虚拟设备并获取 IP 地址Start the virtual device and get the IP address

请继续学习下一教程,了解如何连接、设置和激活虚拟设备。Advance to the next tutorial to learn how to connect, set up, and activate your virtual device.