How to find the Physical host of a Guest/VM in Hyper-V
Environment.
If you ever required to find out the HYPER-V hostname
from the Guest/VM, here is the power shell command provided that Hyper-V
integration services installed.
PS
C:\Users\tafzal> (Get-ItemProperty -Path
"HKLM:\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters").PhysicalHostName
KOAKB111
PS
C:\Users\tafzal>
PS
C:\Users\tafzal> (Get-ItemProperty -Path
"HKLM:\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters").PhysicalHostNameFullQualified
KOAKB111.KENT
PS
C:\Users\tafzal>
Another way
Sometimes it’s necessary to find out host machine
information from a particular guest virtual machine.
With Hyper-V Integration Services installed, the
following registry key contains information about the Host server:
HKLM\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters
Some keys of interest are:
- HostName
- PhysicalHostName
- PhysicalHostNameFullyQualified
- VirtualMachineName
- Plus a number of settings about the Host
Server’s version