ESXi

 View Only
  • 1.  on which host a vm is running

    Posted Apr 01, 2010 08:28 AM

    Hello

    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



  • 2.  RE: on which host a vm is running

    Posted Apr 01, 2010 09:07 AM

    Is it possible to get the ESX name from linux... what is the command to get the ESX name from inside the Linux VM.



  • 3.  RE: on which host a vm is running

    Posted Apr 01, 2010 09:24 AM

    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.

    Greets



  • 4.  RE: on which host a vm is running

    Posted Apr 01, 2010 02:03 PM

    Hi,

    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-->export->export list.

    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.

    thnx.



  • 5.  RE: on which host a vm is running

    Posted Apr 01, 2010 03:56 PM

    I know how to do it from Windows VM (with PowerShell), but could you please explain what for?


    ---

    MCSA, MCTS, VCP, VMware vExpert '2009

    http://blog.vadmin.ru