Does anybody know how to distinguish a Virtual Machine that's an ESX server from other Virtual Machines? If I query Virtual Center For Virtual Machines using VIM, I get back a list of those machines. Is there some way to determine if a given machine is an ESX server?
Hi,
ESX-server can't run as a VM inside an ESX-server, so all the VM's you're seeing are not ESX-servers.
- Stefan
Hi!
Assuming that it is possible to run a ESX server as a VM, what about registering this VM as a ESX host within VC!? with this you could check possibly the name of the server as the ip address to registered ESX hosts in Virtual Center.
Btw: When not having the ESX registered in VC, keep in mind the all ESX servers provide the MOB-webservice on <esx-server>/mob This could be used to detect ESX servers anyway.
There will not be a flag "isESX", so you have to check the properties or services of the specific VM...
Tos2k
Is there a way to detect if the MOB web service is provided on a VM, other than trying to connect to it? I haven't found anything in the reference docs that mentions it.
Right, thats what I had in mind...
Tos2k
Are you sure? If I query the Virtual Center server for a list of
Virtual Machines, I see both the ESX servers and the non-servers. Or
might my query be wrong? In any case, I need to separate the servers
from the non-servers.
Is there a way to detect if the MOB web service is provided on a VM, other than trying to connect to it? I haven't found anything in the reference docs that mentions it.
I have no better idea than trying to connect to the MOB webservice, sorry...
Btw: What comes up in:
Data Object Type: GuestInfo
Parent Managed Object ID: vm-11568
Property Path: guest
Properties
Name Type Value
disk GuestDiskInfo[] disk
dynamicProperty DynamicProperty[] Unset
dynamicType string Unset
guestFamily string "windowsGuest"
guestFullName string "Microsoft Windows Server 2003, Enterprise Edition"
for the ESX - VM? I do not have a virtual ESX available
Tos2k
What IS your query?
This only returns Virtual Machines:
my $vm_views = Vim::find_entity_views(view_type => 'VirtualMachine');
If you want Hosts:
my $host_views = Vim::find_entity_views(view_type => 'HostSystem');
Message was edited by: hicksj
added Host lookup too
Here's what I get for one of our ESX servers...
GuestInfo for ESX Server:
disk: GuestDiskInfo[]
guest family: windowsGuest
guest full name: Microsoft Windows Server 2003, Standard Edition
guest ID: winNetStandardGuest
guest state: running
host name: unagi.genilogix.com
net: GuestNicInfo[]
screen: GuestScreenInfo
tools status: toolsOk
tools version: 52542