Hi,
I'm trying to retrieve a the HostSystem for my ESX server so that I can work my way down and rescan my HBAs. I've tried to get it by using FindByIp and FindByDnsName, but with no luck. The hostd log shows the input IP or DNS is compared only against the VMs, not itself.
Is there a way to get the HostSystem for the ESX server? I'd like to be able to retrieve whether I'm connecting to an ESX or VC.
Thanks.
For findByIP method, you will need to the pass atleast three parameters:
a) the managedobjectreference of a searchindex which is a property of servicecontent
b) the ip address of the host
c) vmSearch boolean needs to be passed as false, for searching hosts.
I think you are probably missing on the vmSearch - false parameter. When a true boolean is passed, then only vms are looked for.
For findByIP method, you will need to the pass atleast three parameters:
a) the managedobjectreference of a searchindex which is a property of servicecontent
b) the ip address of the host
c) vmSearch boolean needs to be passed as false, for searching hosts.
I think you are probably missing on the vmSearch - false parameter. When a true boolean is passed, then only vms are looked for.
That flag is what I forgot. I was using FindByIp elsewhere and it was already setup for VMs and I totally forgot about that flag. Thank you.