Skip navigation
Hyper-V Key-Value Pairs

Hyper-V Key-Value Pairs

Q: What are Hyper-V Key-Value pairs?

A: Although virtual machines (VMS) are often enabled with network connectivity and can be communicated with via the Hyper-V host, there's a benefit for Hyper-V hosts to directly gather information from VMs and also for virtual machines to ascertain certain information about the Hyper-V host they're currently running on.

To enable this direct communication, one of the integration services enabled on VMs is Data Exchange, which enables the VM to communicate via values written to the registry.

The Hyper-V host writes to location HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters within the VM, which the OS in the guest can then read from to gather information about the host. This information includes the Hyper-V host name (which is the cluster name if a cluster node), its fully qualified name, and the actual VM's name and ID as the screen shows below.

Conversely the Hyper-V host reads information from the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Virtual Machine\Auto in the guest, which is populated by the guest OS, giving Hyper-V a lot of information about the OS including version, naming, and IP configuration as the screen shot below shows.

This information is very useful in automated provisioning scenarios to gather information about VMs and for the VM to identify the host its running on using basic registry reading commands.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish