Thursday, May 5, 2016

Identifying Hyper-V Virtual Host of a VM

Recently I came across to manage the Virtual Space for the VMs which are running out of space. I had to identify Virtual Host's free space before trying to expand the VHD size as Hyper-V allows to expand it.

You can identify the Hyper-V host name in the guest VM's Registry at the following key:

HKLM\Software\Microsoft\Virtual Machine\Guest\Parameters

Dword HostName should reflect your Hyper-V Host Name where the VM is hosted.

If you feel lazy to get deep into Registry, run the below command from Powershell (I prefer Run as administrator). It works on Windows Server 2008 and higher

PS C:\Windows\System32> (get-item "HKLM:\Software\Microsoft\Virtual Machines\Guest\Parameters").GetValue("HostName")

No comments:

Post a Comment