Over the past couple years, I’ve been using more and more virtual servers and workstations. At the moment, and for a few different reasons, I have various VMs hosted on any one of three physical machines.
If you connect to a hosted virtual machine, how do you determine where it is physically hosted?
If you are using Hyper-V, this is available in the registry in:
And there are several other things which are available too:
I looked and I haven’t found anything similar for VirtualBox. For VMWare… I’m not a fan, so I didn’t look at all for that.
One thing I started using again is bginfo.exe – which is a little SysInternals app which creates a desktop background which gives you information about the current machine. Again, if you are regularly connecting to different machines, sometimes it can be confusing which is which. BGInfo generates the yellow text in the top-right of the desktop:
Where do you get it?
Or you can manually install the SysInternals suite from Microsoft, from here: http://technet.microsoft.com/en-us/sysinternals/bb842062.aspx
You can use this any number of ways. You can have it run as part of startup, run as a service, or you can just run it interactively. Just double-click the .exe to begin:
You can tweak the information you want to show and hide using this interface, and ultimately do FIle –> Save to save your settings – and Apply to actual apply your changes.
Including Hyper-V info:
The last step is to add the Hyper-V in which the current VM is running. On the right side of bginfo, there is a list of Fields which you can add to the output. You can click “Custom” to add custom information.
I am creating a new field called VMHost which will go out to the register and pull the value from here:
Note that if you are on a 64-bit machine, you must check off that “64-bit registry view” for this to work. Now, when you click OK, OK, and then Apply, if you add <VMHost> as one of your tokens, you will now see the Hyper-V host on which the current VM is running!