I have three Bash/CentOS7 guests running on VMWare. They all do the same thing; the only reason I have three is fault tolerance as this is critical software. Scaling is not an issue.

I have full control of these guest machines, including root access, but absolutely no knowledge or control of their hosts.

I would like to verify that my three guest machines are running on separate host machines as I had requested.

How can I get the IP Address and/or machine name of a host machine from a guest running on it?

  • You need to talk to your VMware admin to make sure they have rules set up to keep your VMs separate. You can only pull this data from the host or vcenter.
    – SpiderIce
    Oct 13 '17 at 14:19
  • @SpiderIce my admins are overloaded, and I don't want to seem like I don't trust their competency; so I was hoping to avoid that route. I do trust their competency, but I like to verify; especially because I am the one that looks bad if things go down. Oct 13 '17 at 14:27

That is the beauty of virtualization. It separates the VM from other VMs and the host. You can not obtain this from the guest machine, unless there is a security bug in hypervisor.

You can, however obtain the list of VMs running on the host. All virtualization software have a command line interface (like virsh) and a web based API that allows to obtain this information from a software that is orchestrating your infrastructure.


Review the hypervisor configuration. In your case, look at where the VMs are running now, and DRS VM-VM anti-affinity rules, in vSphere.

During a maintenance window, do a HA test by forcibly powering off one of your VM hosts. Ideally, services can recover even before the VM boots somewhere else.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.