VMworld


3 Replies Last post: Mar 17, 2010 2:29 PM by James Burd  
Eric Breihan Candidate 1 posts since
Feb 25, 2010
Currently Being Moderated

Feb 25, 2010 10:06 AM

What ESX server am I on from a WindowsVM host?

I need to find a way to get "what esx host am I on" from a Windows Server VM. Is there a WMI query or something I can run on the command line to find what esx server a particulr Windows VM is hosted on? It needs to run on the VM instance, in this case a Windows platform. Are VM's self aware that they are VM's running on a particular ESX host? If so, I'm looking for a way to dig that information out.
123 Candidate 1 posts since
Mar 5, 2010
Currently Being Moderated
1. Mar 5, 2010 11:15 AM in response to: Eric Breihan
Re: What ESX server am I on from a WindowsVM host?

The virtual OS does NOT know anything about the ESX or whatever system its running, i mean,,,on physical or on virtual.

 

You have to find a way to know it by usig the Vmware SDK and run it to get the required result by runnig a query on vCenter or vSphere consoles.

just an idea, rest depends upon u.

David Sellens Apprentice 9 posts since
Aug 17, 2008
Currently Being Moderated
2. Mar 17, 2010 1:33 PM in response to: 123
Re: What ESX server am I on from a WindowsVM host?

check into the Power CLI.  You can download it from

http://www.vmware.com/go/powershell

In case the link doesn't work, it's under vSphere 4 downloads, Drivers and Tools, Automation Tools and SDKs

 

the get-VMHost commandlet with the -VM option should get you what you want

James Burd Apprentice 13 posts since
Aug 27, 2008
Currently Being Moderated
3. Mar 17, 2010 2:29 PM in response to: David Sellens
Re: What ESX server am I on from a WindowsVM host?
David is correct, powershell may be your only option here. But, it all pass thru VC, so you either need to give permissions to users of the virtual machines to read data in VC or build credentials into your powershell scripts. You may want to post to the VMware Communities to reach a wider audience.

More Like This

  • Retrieving data ...