3

I am asking a rather ridiculous question here. Is there any way we can find out from the guest OS the parent OS and the VMs it is using? If it is possible, what command do we invoke from the guest OS?

Thanks for your help

1
  • I know this sounds silly, but I would try asking someone. Hopefully someone who runs the hypervisor. I find it's pretty effective. Good luck.
    – JavaRocky
    Apr 23, 2010 at 9:16

3 Answers 3

8

VMs are not aware of their host system.

You may be able to figure out roughly which platform you are on by checking what drivers are installed for your devices (NICs on a VMWare VM will have 'VMWare Accelerated' driver or similar) and seeing if any guest additions/vmware tools are installed on your guest.

Beyond that, no.

0
4

You don't really say which hypervisor you are using, and the answer depends entirely on that.

Even so, you use the phrase "parent OS" which is generally only used by Microsoft to describe part of Hyper-V. So I'll give you an answer for Hyper-V.

If you have the Hyper-V integration components installed in your VM, then you can look in the registry under:

HKEY_LOCAL_MACHINE\Software\Microsoft\Virtual Machine\Guest\Parameters\PhysicalHostNameFullyQualified.

That will tell you the name of the parent OS. Note that this value can change from moment to moment, as the VM migrates around a cluster.

As for finding out what VMs are running on that host, assuming your VM and the parent OS are attached to the same networks, you can use the Hyper-V WMI interfaces to enumerate the VMs.

See MSDN on how to use them. http://msdn.microsoft.com/en-us/library/cc136986(v=VS.85).aspx

1

In Powershell

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .