Wednesday, December 18, 2013

Hyper-V: How to find the Host Server Name from the guest OS.

I was recently asked to gather additional information for a specific server. Device Manager showed Microsoft Virtual Hardware, which narrowed down the search.  To get the Host Server information from a Windows 2008 R2 VM, look in the registery key below:

HKLM\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters



In this case, the Server Owner decided to install the Hyper-V Role and create this single VM.

Alternatively, you can run the following command in Powershell from within the VM:

(get-item "HKLM:\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters").GetValue("HostName")

No comments:

Post a Comment