We are looking for a script solution to know on which host a Linux/unix VM is running
this script must be run in the VM inside
Example : I have 10 unix linux VMs
and I want to run a script inside the 10 vm that give me the name of the esk host
It's not possible to find out the ESX hostname from inside the VM, see: http://communities.vmware.com/message/953913
You could do it the other way round. You can run a script on your ESX hosts that uses the command "vmware-cmd -l" to show what vms are running on that host. Now you need to grep for your Linux-VM-Names, etc.
Go to your virtual center client ...>select datacenter---> and then on right side
-> select virtual machine tab->right click on that bar and select guest os,esx host ,ip address option from list and uncheck unnecessary option .---->click on guest os tab .u will get the vms with os type...
Get a list of them by exporting list.File--
This is the simplest way,in few click u will get a list distingiushed by os with esx host name/ip.
If you found this or any other answer useful please consider the use of the Helpful or correct
buttons to award points.
I know how to do it from Windows VM (with PowerShell), but could you please explain what for?
MCSA, MCTS, VCP, VMware vExpert '2009