用 Windows 管理中心管理虚拟机Managing Virtual Machines with Windows Admin Center

适用于:Windows Admin Center、Windows Admin Center 预览版Applies To: Windows Admin Center, Windows Admin Center Preview

如果在服务器或群集上启用了 Hyper-v 角色,则可以在服务器故障转移群集超聚合群集连接中使用虚拟机工具。The Virtual Machines tool is available in Server, Failover Cluster or Hyper-Converged Cluster connections if the Hyper-V role is enabled on the server or cluster. 你可以使用虚拟机工具来管理运行 Windows Server 2012 或更高版本的 Hyper-v 主机,该主机可以使用桌面体验或服务器核心安装。You can use the Virtual Machines tool to manage Hyper-V hosts running Windows Server 2012 or later, either installed with Desktop Experience or as Server Core. 还支持 hyper-v Server 2012、2016和2019。Hyper-V Server 2012, 2016 and 2019 are also supported.

主要功能Key features

Windows 管理中心中的 "虚拟机" 工具的亮点包括:Highlights of the Virtual Machines tool in Windows Admin Center include:

  • 高级别 Hyper-v 主机资源监视。High-level Hyper-V host resource monitoring. 在单个仪表板中查看 Hyper-v 主机服务器或整个群集的总体 CPU 和内存使用情况、IO 性能指标、VM 运行状况警报和事件。View overall CPU and memory usage, IO performance metrics, VM health alerts and events for the Hyper-V host server or entire cluster in a single dashboard.
  • 使 Hyper-v 管理器和故障转移群集管理器功能结合起来的统一体验。Unified experience bringing Hyper-V Manager and Failover Cluster Manager capabilities together. 查看整个群集中的所有虚拟机,并向下钻取到单个虚拟机以进行高级管理和故障排除。View all the virtual machines across a cluster and drill down into a single virtual machine for advanced management and troubleshooting.
  • 为虚拟机管理简化但功能强大的工作流。Simplified, yet powerful workflows for virtual machine management. 为 IT 管理方案定制的新 UI 体验可用于创建、管理和复制虚拟机。New UI experiences tailored to IT administration scenarios to create, manage and replicate virtual machines.

下面是可以在 Windows 管理中心执行的一些 Hyper-v 任务:Here are some of the Hyper-V tasks you can do in Windows Admin Center:

监视 Hyper-v 主机资源和性能Monitor Hyper-V host resources and performance

虚拟机摘要屏幕

  1. 单击左侧导航窗格中的 "虚拟机" 工具。Click the Virtual Machines tool from the left side navigation pane.
  2. 虚拟机工具顶部有两个选项卡: "摘要" 选项卡和 "清单" 选项卡。"摘要" 选项卡为当前服务器或整个群集提供 hyper-v 主机资源和性能的整体视图,包括以下各项:There are two tabs at the top of the Virtual Machines tool, the Summary tab and the Inventory tab. The Summary tab provides a holistic view of Hyper-V host resources and performance for the current server or entire cluster, including the following:
    • 按状态(正在运行、已关闭、已暂停和已保存)分组的 Vm 数The number of VMs grouped by state - running, off, paused and saved
    • 最近的运行状况警报或 Hyper-v 事件日志事件 (警报仅适用于运行 Windows Server 2016 或更高版本的超聚合群集) Recent health alerts or Hyper-V event log events (Alerts are only available for hyper-converged clusters running Windows Server 2016 or later)
    • CPU 和内存使用情况,包括主机与来宾细目CPU and memory usage with host vs guest breakdown
    • 占用最多 CPU 和内存资源的顶级 VmTop VMs consuming the most CPU and memory resources
    • 用于 IOPS 和 IO 吞吐量的实时和历史数据折线图 (存储性能行图表仅适用于运行 Windows Server 2016 或更高版本的超聚合群集。Live and historical data line charts for IOPS and IO throughput (Storage performance line charts are only available for hyper-converged clusters running Windows Server 2016 or later. 历史数据仅适用于运行 Windows Server 2019) 的超聚合群集Historical data is only available for hyper-converged clusters running Windows Server 2019)

查看虚拟机清单View virtual machine inventory

虚拟机库存屏幕

  1. 单击左侧导航窗格中的 "虚拟机" 工具。Click the Virtual Machines tool from the left side navigation pane.
  2. 虚拟机工具顶部有两个选项卡: "摘要" 选项卡和 "清单" 选项卡。"清单" 选项卡列出了当前服务器或整个群集上可用的虚拟机,并提供用于管理单个虚拟机的命令。There are two tabs at the top of the Virtual Machines tool, the Summary tab and the Inventory tab. The Inventory tab lists the virtual machines available on the current server or entire cluster, and provides commands to manage individual virtual machines. 可以:You can:
    • 查看在当前服务器或群集上运行的虚拟机的列表。View a list of the virtual machines running on the current server or cluster.
    • 查看虚拟机的状态和主机服务器(如果正在查看群集的虚拟机)。View the virtual machine's state and host server if you are viewing virtual machines for a cluster. 还可查看主机透视中的 CPU 和内存使用情况,包括内存压力、内存需求和分配的内存,以及使用 Azure Site Recovery 的虚拟机的运行时间、检测信号状态和保护状态。Also view CPU and memory usage from the host perspective, including memory pressure, memory demand and assigned memory, and the virtual machine's uptime, heartbeat status and protection status using Azure Site Recovery.
    • 创建新的虚拟机Create a new virtual machine.
    • 删除、启动、关闭、关闭、暂停、继续、重置或重命名虚拟机。Delete, start, turn off, shut down, pause, resume, reset or rename a virtual machine. 同时保存虚拟机、删除已保存状态或创建检查点。Also save the virtual machine, delete a saved state, or create a checkpoint.
    • 更改虚拟机的设置Change settings for a virtual machine.
    • 通过 Hyper-v 主机使用 VMConnect 连接到虚拟机控制台。Connect to a virtual machine console using VMConnect via the Hyper-V host.
    • 使用 Azure Site Recovery 复制虚拟机Replicate a virtual machine using Azure Site Recovery.
    • 对于可在多个 Vm 上运行的操作,例如 "启动"、"关闭"、"保存"、"暂停"、"删除" 和 "重置",可以选择多个 Vm 并同时运行操作。For operations that can be run on multiple VMs, such as Start, Shut down, Save, Pause, Delete, Reset, you can select multiple VMs and run the operation at once.

注意:如果你已连接到群集,则虚拟机工具将仅显示群集虚拟机。NOTE: If you are connected to a cluster, the Virtual Machine tool will only display clustered virtual machines. 我们计划还会在将来显示非群集虚拟机。We plan to also show non-clustered virtual machines in the future.

新建虚拟机Create a new virtual machine

"新建虚拟机" 屏幕

  1. 单击左侧导航窗格中的 "虚拟机" 工具。Click the Virtual Machines tool from the left side navigation pane.

  2. 在 "虚拟机" 工具的顶部,选择 "清单" 选项卡,然后单击 "新建" 以创建新的虚拟机。At the top of the Virtual Machines tool, choose the Inventory tab, then click New to create a new virtual machine.

  3. 输入虚拟机名称,并在第1代和第2代虚拟机之间进行选择。Enter the virtual machine name and choose between generation 1 and 2 virtual machines.

  4. 如果要在群集上创建虚拟机,可以选择最初在其中创建虚拟机的主机。If you are creating a virtual machine on a cluster, you can choose which host to initially create the virtual machine on. 如果你运行的是 Windows Server 2016 或更高版本,则该工具将为你提供主机建议。If you are running Windows Server 2016 or later, the tool will provide a host recommendation for you.

  5. 选择虚拟机文件的路径。Choose a path for the virtual machine files. 从下拉列表中选择一个卷,或者单击 "浏览" 以使用文件夹选取器选择一个文件夹。Choose a volume from the dropdown list or click Browse to choose a folder using the folder picker. 虚拟机配置文件和虚拟硬盘文件将保存在 \Hyper-V\\[virtual machine name] 选定卷或路径的路径下的单个文件夹中。The virtual machine configuration files and virtual hard disk file will be saved in a single folder under the \Hyper-V\\[virtual machine name] path of the selected volume or path.

    提示

    在文件夹选取器中,可以通过在 "文件夹名称" 字段中输入路径来浏览到网络上的任何可用 SMB 共享 \\server\shareIn the folder picker, you can browse to any available SMB share on the network by entering the path in the Folder name field as \\server\share. 为 VM 存储使用网络共享需要CredSSPUsing a network share for VM storage will require CredSSP.

  6. 选择虚拟处理器数量,无论是要启用嵌套虚拟化、配置内存设置、网络适配器、虚拟硬盘,还是选择要从 .iso 映像文件或网络安装操作系统。Choose the number of virtual processors, whether you want nested virtualization enabled, configure memory settings, network adapters, virtual hard disks and choose whether you want to install an operating system from an .iso image file or from the network.

  7. 单击 “创建” 创建虚拟机。Click Create to create the virtual machine.

  8. 创建虚拟机并将其显示在虚拟机列表中后,可以启动虚拟机。Once the virtual machine is created and appears in the virtual machine list, you can start the virtual machine.

  9. 启动虚拟机后,可以通过 VMConnect 连接到虚拟机的控制台以安装操作系统。Once the virtual machine is started, you can connect to the virtual machine's console via VMConnect to install the operating system. 从列表中选择虚拟机,单击 "更多 > 连接" 下载 .rdp 文件。Select the virtual machine from the list, click More > Connect to download the .rdp file. 在远程桌面连接应用中打开 .rdp 文件。Open the .rdp file in the Remote Desktop Connection app. 由于这将连接到虚拟机的控制台,因此需要输入 Hyper-v 主机的管理员凭据。Since this is connecting to the virtual machine's console, you will need to enter the Hyper-V host's admin credentials.

更改虚拟机设置Change virtual machine settings

虚拟机设置屏幕

  1. 单击左侧导航窗格中的 "虚拟机" 工具。Click the Virtual Machines tool from the left side navigation pane.
  2. 在 "虚拟机" 工具的顶部,选择 "清单" 选项卡。从列表中选择一个虚拟机,然后单击 "更多 > 设置"。At the top of the Virtual Machines tool, choose the Inventory tab. Choose a virtual machine from the list and click More > Settings.
  3. 在 "常规"、"安全"、"内存"、"处理器"、"磁盘"、"启动顺序 " 和"检查点" 选项卡之间进行切换,配置所需的设置,然后单击 "保存" 以保存当前Switch between the General, Security, Memory, Processors, Disks, Networks, Boot order and Checkpoints tab, configure the necessary settings, then click Save to save the current tab's settings. 可用的设置取决于虚拟机的生成。The settings available will vary depending on the virtual machine's generation. 此外,某些设置无法更改以运行虚拟机,你将需要先停止虚拟机。Also, some settings cannot be changed for running virtual machines and you will need to stop the virtual machine first.

将虚拟机实时迁移到另一个群集节点Live migrate a virtual machine to another cluster node

如果已连接到群集,则可以将虚拟机实时迁移到另一个群集节点。If you are connected to a cluster, you can live migrate a virtual machine to another cluster node.

  1. 从故障转移群集或超聚合群集连接中,单击左侧导航窗格中的 "虚拟机" 工具。From a Failover Cluster or Hyper-converged cluster connection, click the Virtual Machines tool from the left side navigation pane.
  2. 在 "虚拟机" 工具的顶部,选择 "清单" 选项卡。从列表中选择一个虚拟机,然后单击 "更多 > 移动"。At the top of the Virtual Machines tool, choose the Inventory tab. Choose a virtual machine from the list and click More > Move.
  3. 从可用群集节点列表中选择服务器,然后单击 "移动"。Choose a server from the list of available cluster nodes and click Move.
  4. 移动进度的通知将显示在 Windows 管理中心的右上角。Notifications for the move progress will be displayed in the upper right corner of Windows Admin Center. 如果移动成功,则会在虚拟机列表中看到主机服务器名称已更改。If the move is successful, you will see the Host server name changed in the virtual machine list.

针对单个虚拟机的高级管理和故障排除Advanced management and troubleshooting for a single virtual machine

单个虚拟机详细信息屏幕

你可以从 "单一虚拟机" 页查看单个虚拟机的详细信息和性能图表。You can view detailed information and performance charts for a single virtual machine from the single virtual machine page.

  1. 单击左侧导航窗格中的 "虚拟机" 工具。Click the Virtual Machines tool from the left side navigation pane.
  2. 在 "虚拟机" 工具的顶部,选择 "清单" 选项卡。在虚拟机列表中,单击虚拟机的名称。At the top of the Virtual Machines tool, choose the Inventory tab. Click on the name of a virtual machine from the virtual machine list.
  3. 在单个虚拟机页上,你可以:From the single virtual machine page, you can:
    • 查看虚拟机的详细信息。View detailed information for the virtual machine.
    • 查看 CPU、内存、网络、IOPS 和 IO 吞吐量 (的实时和历史数据折线图仅适用于运行 Windows Server 2019 的超聚合群集) View Live and historical data line charts for CPU, memory, network, IOPS and IO throughput (Historical data is only available for hyper-converged clusters running Windows Server 2019)
    • 查看、创建、应用、重命名和删除检查点。View, create, apply, rename and delete checkpoints.
    • 查看虚拟机的虚拟硬盘 () 文件、网络适配器和主机服务器的详细信息。View details for the virtual machine's virtual hard disk (.vhd) files, network adapters and host server.
    • 删除、启动、关闭、关闭、暂停、继续、重置或重命名虚拟机。Delete, start, turn off, shut down, pause, resume, reset or rename the virtual machine. 同时保存虚拟机、删除已保存状态或创建检查点。Also save the virtual machine, delete a saved state, or create a checkpoint.
    • 更改虚拟机的设置Change settings for the virtual machine.
    • 通过 Hyper-v 主机使用 VMConnect 连接到虚拟机控制台。Connect to the virtual machine console using VMConnect via the Hyper-V host.
    • 使用 Azure Site Recovery 复制虚拟机Replicate the virtual machine using Azure Site Recovery.

通过 Hyper-v 主机 (VMConnect) 管理虚拟机Manage a virtual machine through the Hyper-V host (VMConnect)

通过 web 浏览器连接 VM

  1. 单击左侧导航窗格中的 "虚拟机" 工具。Click the Virtual Machines tool from the left side navigation pane.
  2. 在 "虚拟机" 工具的顶部,选择 "清单" 选项卡。从列表中选择一个虚拟机,然后单击 "更多 > 连接" 或 "下载 RDP 文件"。At the top of the Virtual Machines tool, choose the Inventory tab. Choose a virtual machine from the list and click More > Connect or Download RDP file. 连接将允许你通过集成到 Windows 管理中心的远程桌面 web 控制台与来宾 VM 交互。Connect will allow you to interact with the guest VM through the Remote Desktop web console, integrated in to Windows Admin Center. 下载 rdp 文件会下载一个 .rdp 文件,你可以使用远程桌面连接应用程序打开该文件, ( # A0) 。Download RDP file will download an .rdp file that you can open with the Remote Desktop Connection application (mstsc.exe). 这两个选项都将使用 VMConnect 通过 Hyper-v 主机连接到来宾 VM,并将要求你输入 Hyper-v 主机服务器的管理员凭据。Both options will use VMConnect to connect to the guest VM through the Hyper-V host and will require you to enter administrator credentials for the Hyper-V host server.

更改 Hyper-v 主机设置Change Hyper-V host settings

Hyper-v 主机设置屏幕

  1. 在服务器、超聚合群集或故障转移群集连接上,单击左侧导航窗格底部的 "设置" 菜单。On a Server, Hyper-converged Cluster or Failover Cluster connection, click the Settings menu at the bottom of the left side navigation pane.
  2. 在 Hyper-v 主机服务器或群集上,你将看到一个Hyper-v 主机设置组,其中包含以下部分:On a Hyper-V host server or cluster, you will see a Hyper-V Host Settings group with the following sections:
    • 常规:更改虚拟硬盘和虚拟机的文件路径,以及虚拟机监控程序计划类型 ((如果支持)) General: Change virtual hard disks and virtual machines file path, and hypervisor schedule type (if supported)
    • 增强会话模式Enhanced Session Mode
    • NUMA 跨越NUMA Spanning
    • 实时迁移Live Migration
    • 存储迁移Storage Migration
  3. 如果在超聚合群集或故障转移群集连接中进行任何 Hyper-v 主机设置更改,则更改将应用到所有群集节点。If you make any Hyper-V host setting changes in a Hyper-converged Cluster or Failover Cluster connection, the change will be applied to all cluster nodes.

查看 Hyper-v 事件日志View Hyper-V event logs

你可以直接从虚拟机工具查看 Hyper-v 事件日志。You can view Hyper-V event logs directly from the Virtual Machines tool.

  1. 单击左侧导航窗格中的 "虚拟机" 工具。Click the Virtual Machines tool from the left side navigation pane.
  2. 在 "虚拟机" 工具的顶部,选择 "摘要" 选项卡。在右上方的事件部分中,单击 "查看所有事件"。At the top of the Virtual Machines tool, choose the Summary tab. In the top right Events section, click VIEW ALL EVENTS.
  3. 事件查看器工具将在左窗格中显示 Hyper-v 事件通道。The Event Viewer tool will show the Hyper-V event channels in the left pane. 选择通道,在右窗格中查看事件。Choose a channel to view the events in the right pane. 如果要管理故障转移群集或超聚合群集,事件日志将显示所有群集节点的事件,并在计算机列中显示主机服务器。If you are managing a failover cluster or hyper-converged cluster, the event logs will display events for all cluster nodes, displaying the host server in the Machine column.

通过 Azure Site Recovery 保护虚拟机Protect virtual machines with Azure Site Recovery

你可以使用 Windows 管理中心来配置 Azure Site Recovery 并将本地虚拟机复制到 Azure。You can use Windows Admin Center to configure Azure Site Recovery and replicate your on-premises virtual machines to Azure. 了解详细信息Learn more

更多More coming

Windows 管理中心中的虚拟机管理正在开发中主动,不久后将添加新功能。Virtual machine management in Windows Admin Center is actively under development and new features will be added in the near future. 可以查看 UserVoice 中的功能的状态和投票:You can view the status and vote for features in UserVoice:

查看全部或建议新功能See all or propose new features.