Hyper-V 集成服务Hyper-V Integration Services

集成服务(通常称为集成组件)是允许虚拟机与 Hyper-V 主机通信的服务。Integration services (often called integration components), are services that allow the virtual machine to communicate with the Hyper-V host. 其中许多服务都很便利,但其他服务对虚拟机能够正常工作却至关重要。Many of these services are conveniences while others can be quite important to the virtual machine's ability to function correctly.

本文是 Windows 中提供的每个集成服务的参考。This article is a reference for each integration service available in Windows. 它也将作为特定集成服务或其历史记录的相关信息的起点。It will also act as a starting point for any information related to specific integration services or their history.

用户指南:User Guides:

快速参考Quick Reference

名称Name Windows 服务名称Windows Service Name Linux 守护程序名称Linux Daemon Name 说明Description 禁用后对 VM 的影响Impact on VM when disabled
Hyper V 检测信号服务Hyper-V Heartbeat Service vmicheartbeatvmicheartbeat hv_utilshv_utils 报告虚拟机运行正常。Reports that the virtual machine is running correctly. 视情况而定Varies
Hyper-V 来宾关闭服务Hyper-V Guest Shutdown Service vmicshutdownvmicshutdown hv_utilshv_utils 允许主机触发虚拟机关闭。Allows the host to trigger virtual machines shutdown. 严重High
Hyper V 时间同步服务Hyper-V Time Synchronization Service vmictimesyncvmictimesync hv_utilshv_utils 使虚拟机的时钟与主计算机的时钟同步。Synchronizes the virtual machine's clock with the host computer's clock. 严重High
Hyper-V 数据交换服务 (KVP)Hyper-V Data Exchange Service (KVP) vmickvpexchangevmickvpexchange hv_kvp_daemonhv_kvp_daemon 提供交换虚拟机和主机之间的基本元数据的方法。Provides a way to exchange basic metadata b etween the virtual machine and the host. Medium
Hyper-V 卷影复制请求程序Hyper-V Volume Shadow Copy Requestor vmicvssvmicvss hv_vss_daemonhv_vss_daemon 允许卷影复制服务在不关闭虚拟机的情况下对其进行备份。Allows Volume Shadow Copy Service to back up the virtual machine with out shutting it down. 视情况而定Varies
Hyper-V 来宾服务接口Hyper-V Guest Service Interface vmicguestinterfacevmicguestinterface hv_fcopy_daemonhv_fcopy_daemon 提供 Hyper-V 主机将文件复制到虚拟机或从虚拟机复制文件的界面。Provides an interface for the Hyper-V host to copy files to or from the virtual machine. Low
Hyper-V PowerShell Direct 服务Hyper-V PowerShell Direct Service vmicvmsessionvmicvmsession 不可用not available 提供在没有网络连接的情况下,使用 PowerShell 管理虚拟机的方法。Provides a way to manage virtual machine with PowerShell without a network connection. Low

Hyper-V 检测信号服务Hyper-V Heartbeat Service

Windows 服务名称: vmicheartbeatWindows Service Name: vmicheartbeat
Linux 守护程序名称: hv_utilsLinux Daemon Name: hv_utils
描述: 告知 Hyper-V 主机,虚拟机已安装操作系统并且正常启动。Description: Tells the Hyper-V host that the virtual machine has an operating system installed and that it booted correctly.
添加于: Windows Server 2012、Windows 8Added In: Windows Server 2012, Windows 8
影响: 禁用后,虚拟机无法报告其内部的操作系统是否正常运行。Impact: When disabled, the virtual machine can't report that the operating system inside of the virtual machine is operating correctly. 这可能会影响某些类型的监视和主机端诊断。This may impact some kinds of monitoring and host-side diagnostics.

检测信号服务使其可以回答如“虚拟机启动了吗?”等类似的基本问题。The heartbeat service makes it possible to answer basic questions like "did the virtual machine boot?".

当 Hyper-V 报告虚拟机状态为“正在运行”(请参阅以下示例)时,表示 Hyper-V 在为虚拟机预留资源,而不是已安装或正在运行操作系统。When Hyper-V reports that a virtual machine state is "running" (see the example below), it means Hyper-V set aside resources for a virtual machine; it does not mean that there is an operating system installed or functioning. 这是检测信号十分有用的地方。This is where heartbeat becomes useful. 检测信号服务告知 Hyper-V,虚拟机内的操作系统已启动。The heartbeat service tells Hyper-V that the operating system inside the virtual machine has booted.

使用 PowerShell 检查检测信号Check heartbeat with PowerShell

以管理员身份运行 Get-VM 以查看虚拟机的检测信号:Run Get-VM as Administrator to see a virtual machine's heartbeat:

Get-VM -VMName $VMName | select Name, State, Status

你的输出应类似下面的形式:Your output should look something like this:

Name    State    Status
----    -----    ------
DemoVM  Running  Operating normally

Status 字段由检测信号服务确定。The Status field is determined by the heartbeat service.

Hyper-V 来宾关闭服务Hyper-V Guest Shutdown Service

Windows 服务名称: vmicshutdownWindows Service Name: vmicshutdown
Linux 守护程序名称: hv_utilsLinux Daemon Name: hv_utils
描述: 允许 Hyper-V 主机请求关闭虚拟机。Description: Allows the Hyper-V host to request that the virtual machine shutdown. 主机始终可以强制关闭虚拟机,但这样做类似于切换电源开关而不是选择关闭。The host can always force the virtual machine to turn off, but that is like flipping the power switch as opposed to selecting shutdown.
添加于: Windows Server 2012、Windows 8Added In: Windows Server 2012, Windows 8
影响: 重大影响 禁用后,主机无法触发虚拟机中的友好关闭。Impact: High Impact When disabled, the host can't trigger a friendly shutdown inside the virtual machine. 所有关闭都将为硬关机,可能导致数据丢失或数据损坏。All shutdowns will be a hard power-off, which could cause data loss or data corruption.

Hyper-V 时间同步服务Hyper-V Time Synchronization Service

Windows 服务名称: vmictimesyncWindows Service Name: vmictimesync
Linux 守护程序名称: hv_utilsLinux Daemon Name: hv_utils
描述: 使虚拟机的系统时钟与物理计算机的系统时钟同步。Description: Synchronizes the virtual machine's system clock with the system clock of the physical computer.
添加于: Windows Server 2012、Windows 8Added In: Windows Server 2012, Windows 8
影响: 重大影响 禁用后,虚拟机的时钟将出现不确定的偏移。Impact: High Impact When disabled, the virtual machine's clock will drift erratically.

Hyper-V 数据交换服务 (KVP)Hyper-V Data Exchange Service (KVP)

Windows 服务名称: vmickvpexchangeWindows Service Name: vmickvpexchange
Linux 守护程序名称: hv_kvp_daemonLinux Daemon Name: hv_kvp_daemon
描述: 提供交换虚拟机和主机之间的基本元数据的机制。Description: Provides a mechanism to exchange basic metadata between the virtual machine and the host.
添加于: Windows Server 2012、Windows 8Added In: Windows Server 2012, Windows 8
影响: 禁用后,运行 Windows 8 或 Windows Server 2012 或更早版本的虚拟机将不会收到 Hyper-V 集成服务的更新。Impact: When disabled, virtual machines running Windows 8 or Windows Server 2012 or earlier will not receive updates to Hyper-V integration services. 禁用数据交换可能还会影响某些类型的监视和主机端诊断。Disabling data exchange may also impact some kinds of monitoring and host-side diagnostics.

数据交换服务(有时称为 KVP)使用 Windows 注册表中的键值对 (KVP),在虚拟机和 Hyper-V 主机之间共享少量计算机信息。The data exchange service (sometimes called KVP) shares small amounts of machine information between virtual machine and the Hyper-V host using key-value pairs (KVP) through the Windows registry. 相同的机制还可用于在虚拟机和主机之间共享自定义数据。The same mechanism can also be used to share customized data between the virtual machine and the host.

键值对由“键”和“值”组成。Key-value pairs consist of a “key” and a “value”. 键和值都是字符串,不支持任何其他数据类型。Both the key and the value are strings, no other data types are supported. 当创建或更改键值对时,来宾和主机都可以看到。When a key-value pair is created or changed, it is visible to the guest and the host. 键值对信息通过 Hyper-V VMbus 传输,不需要来宾操作系统和 Hyper-V 主机之间的任何类型的网络连接。The key-value pair information is transferred across the Hyper-V VMbus and does not require any kind of network connection between the guest and the Hyper-V host.

数据交换服务是保留有关虚拟机信息的重要工具,对于交互式数据共享或数据传输,请使用 PowerShell DirectThe data exchange service is a great tool for preserving information about the virtual machine -- for interactive data sharing or data transfer, use PowerShell Direct.

用户指南:User Guides:

Hyper-V 卷影复制请求程序Hyper-V Volume Shadow Copy Requestor

Windows 服务名称: vmicvssWindows Service Name: vmicvss
Linux 守护程序名称: hv_vss_daemonLinux Daemon Name: hv_vss_daemon
描述: 允许卷影复制服务备份虚拟机上的应用程序和数据。Description: Allows Volume Shadow Copy Service to back up applications and data on the virtual machine.
添加于: Windows Server 2012、Windows 8Added In: Windows Server 2012, Windows 8
影响: 禁用后,虚拟机无法在运行(使用 VSS)的情况下被备份。Impact: When disabled, the virtual machine can not be backed up while running (using VSS).

卷影复制服务 (VSS) 需要卷影复制请求程序集成服务。The Volume Shadow Copy Requestor integration service is required for Volume Shadow Copy Service (VSS). 卷影复制服务 (VSS) 捕获并复制运行系统(特别是服务器)上的映像以进行备份,但不会过度降低其提供的服务的性能和稳定性。The Volume Shadow Copy Service (VSS) captures and copies images for backup on running systems, particularly servers, without unduly degrading the performance and stability of the services they provide. 此集成服务通过使用主机的备份过程,协调虚拟机的工作负荷来实现它。This integration service makes that possible by coordinating the virtual machine's workloads with the host's backup process.

有关卷影复制的详细信息,请阅读此处的内容。Read more about Volume Shadow Copy here.

Hyper-V 来宾服务接口Hyper-V Guest Service Interface

Windows 服务名称: vmicguestinterfaceWindows Service Name: vmicguestinterface
Linux 守护程序名称: hv_fcopy_daemonLinux Daemon Name: hv_fcopy_daemon
描述: 提供 Hyper-V 主机双向复制文件到虚拟机或从虚拟机双向复制文件的界面。Description: Provides an interface for the Hyper-V host to bidirectionally copy files to or from the virtual machine.
添加于: Windows Server 2012 R2、Windows 8.1Added In: Windows Server 2012 R2, Windows 8.1
影响: 禁用后,主机无法使用 Copy-VMFile 将文件复制到来宾和从来宾复制文件。Impact: When disabled, the host can not copy files to and from the guest using Copy-VMFile. 阅读更多有关 Copy-VMFile cmdlet 的内容。Read more about the Copy-VMFile cmdlet.

注意:Notes:
默认情况下处于禁用状态。Disabled by default. 请参阅 PowerShell Direct - 使用 Copy-ItemSee PowerShell Direct using Copy-Item.

Hyper-V PowerShell Direct 服务Hyper-V PowerShell Direct Service

Windows 服务名称: vmicvmsessionWindows Service Name: vmicvmsession
Linux 守护程序名称: n/aLinux Daemon Name: n/a
描述: 提供在没有虚拟网络的情况下,通过 VM 会话使用 PowerShell 管理虚拟机的机制。Description: Provides a mechanism to manage virtual machine with PowerShell via VM session without a virtual network.
添加于: Windows Server TP3、Windows 10Added In: Windows Server TP3, Windows 10
影响: 禁用此服务后,主机将无法使用 PowerShell Direct 连接到虚拟机。Impact: Disabling this service prevents the host from being able to connect to the virtual machine with PowerShell Direct.

注意:Notes:
服务名称最初为 Hyper-V VM 会话服务。The service name was originally was Hyper-V VM Session Service.
PowerShell Direct 还在继续开发中,仅在 Windows 10/Windows Server 技术预览版 3 或更高版本的主机/来宾上可用。PowerShell Direct is under active development and only available on Windows 10/Windows Server Technical Preview 3 or later hosts/guests.

不管 Hyper-V 主机或虚拟机上的网络配置或远程管理设置如何,PowerShell Direct 都允许在 Hyper-V 主机上的虚拟机中管理 PowerShell。PowerShell Direct allows PowerShell management inside a virtual machine from the Hyper-V host regardless of any network configuration or remote management settings on either the Hyper-V host or the virtual machine. 这使得 Hyper-V 管理员能够更简单地自动化管理和配置任务,并为其编写脚本。This makes it easier for Hyper-V Administrators to automate and script management and configuration tasks.

阅读更多有关 PowerShell Direct 的内容Read more about PowerShell Direct.

用户指南:User Guides: