VMware Cloud Community
yong321
Contributor
Contributor

Clue about two VMs on the same host?

A frequently asked question is How to find the name of the host from inside a guest VM.

https://communities.vmware.com/t5/Virtual-Machine-Guest-OS-and-VM/How-to-find-the-host-on-which-VM-i... https://communities.vmware.com/t5/ESXi-Discussions/Get-host-name-from-inside-guest-os/td-p/1365645 https://communities.vmware.com/t5/ESXi-Discussions/Extract-ESXi-host-information-from-vm-guest-serve... https://communities.vmware.com/t5/vSphere-Guest-SDK-Discussions/Question-on-finding-the-Hostname-fro...

Many years ago it was doable but is no longer so allegedly for security reasons. There *is* a supported way of "Finding the ESX/ESXi host on which a virtual machine is running" (https://kb.vmware.com/s/article/2004187 ). But you have to have access to the vCenter Server database, not from inside the guest. The same question is also often asked on the forums for Oracle Virtualboxes and Microsoft VMs. Only MS VMs publicly support this feature.

At our shop we'd like to prevent this situation from happening: a software cluster, such as Oracle RAC or MySQL cluster, has all nodes (VM guests) on the same ESXi host. If this happens, HA (high availability) is somewhat compromised because if the host crashes, all cluster nodes crash. It would be nice if the admins managing these clusters running on their VMs were given permission to find such situations without given access to the hosts. No need to find the actual hostnames or IPs of the hosts. Any clue to this situation would be more than enough.

0 Kudos
2 Replies
scott28tt
VMware Employee
VMware Employee

DRS rules can stop certain VMs from being on the same host, assuming your host cluster is enabled for DRS.

 


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
maksym007
Expert
Expert

yes exactly, affinity rules will help to solve the problem

0 Kudos