VMware Cloud Community
mcfadyenj
Hot Shot
Hot Shot
Jump to solution

retrieve hostname from Vc:HostSystem

how do you retrieve the hostname from the HostSystem object under the vc3.5 api.

I have tried

host.name host.Name

host.info.name host.info.Name

host.summary.info.name host.summary.info.Name

I have an array of host objects I want to select a host by its name.

var array = new Array();

for (var host in cluster.host)

{

     System.log (host.xxxxxx)

}

Reply
0 Kudos
1 Solution

Accepted Solutions
cdecanini_
VMware Employee
VMware Employee
Jump to solution

vCO 4.0 had a 32 bit JRE 1.5, vCO 4.1 has a 64 bit JRE 1.6.

I am not sure if the VIM3.5 plug-in you have for version 4.0 would work on version 4.1. I am sure this was not something the QA teams tested.

I have checked with the doc team. The last guide mentioning the vim3.5 plug-in is the 4.01. So it must be available for this vCO version (4.0 Update 1).

To be in a supported situation you should install a vCO 4.01 including the vim3.5 plug-in in the Install_Directory/extras/plugins.

Of course idealy you would have the last matching vCO 4.1 / vCenter 4.1 U1.

Please note that writing workflows against the vim3.5 plug-in will requires refactoring the vim3.5 plug-ins types to the VC plug-ins ones.

Christophe.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter

View solution in original post

Reply
0 Kudos
4 Replies
Burke-
VMware Employee
VMware Employee
Jump to solution

I have not been keeping up with all your posts... have you installed and configured the correct VI3 plug-in under vCO? And are you accessing the cluster resource from that VI3 plug-in?

Please confirm that you are getting more than 0 hosts from cluster.host by entering the following line before your loop:

System.log("Host Count: "+cluster.host.length);

I assume you have a valid cluster set as an input to your script....

I don't have the VI3 plugin installed right now in my mobile lab, but the hostsystem properties should be similar.. in the vCenter plugin, the syntax of :

System.log("Hostname: "+host.name);

properly displayed the ESXi host I have in my cluster.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
mcfadyenj
Hot Shot
Hot Shot
Jump to solution

re my of my problems are stemming from the fact I cannot install the vi3 plugin correctly.

so a large portion of these posts are because I am trying to workaround using the vc4 plugin against a vc 3.5 backend.

I have installed vco on 3 different servers. none of which will allow me to complete the vi3 plugin installation.

this particular case I am trying to get a list of hosts. Using cluster.host I get the correct number of hosts I would expect.

I cannot retrieve any data from the objects other than the array length.

I expect most of my issues would go away if I could get the vi3 plugin to work.

Basically once installed the plugin allows me to goto the configure screen. Once I fill out the config screen the plugin crashes therefore I am doing all these crazy work arounds to get things to work.

to make matters worse I don't even know if the plugin I have is the correct one.

this is the file I have found.

vmo_vi35_4_0_1_4502.vmoapp I found this on a vc 4.0 install that was updated to 4.1

not sure if it is supposed to work on vco 4.1 or not. I am assuming it is not due to it filename.

When I install 4.1 vc it does not have an extras folder which is stated in the dev doco.

Reply
0 Kudos
cdecanini_
VMware Employee
VMware Employee
Jump to solution

vCO 4.0 had a 32 bit JRE 1.5, vCO 4.1 has a 64 bit JRE 1.6.

I am not sure if the VIM3.5 plug-in you have for version 4.0 would work on version 4.1. I am sure this was not something the QA teams tested.

I have checked with the doc team. The last guide mentioning the vim3.5 plug-in is the 4.01. So it must be available for this vCO version (4.0 Update 1).

To be in a supported situation you should install a vCO 4.01 including the vim3.5 plug-in in the Install_Directory/extras/plugins.

Of course idealy you would have the last matching vCO 4.1 / vCenter 4.1 U1.

Please note that writing workflows against the vim3.5 plug-in will requires refactoring the vim3.5 plug-ins types to the VC plug-ins ones.

Christophe.

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
Reply
0 Kudos
mcfadyenj
Hot Shot
Hot Shot
Jump to solution

now this would make sense with my findings as well.

I think I just have the right amount of bad circumstances to makes this all break.

I did scam the 3.5 vim plugin from a 4.01 vc server with update 1 applied.

I also noted that I could only installed the vco 4.1 on a 64 bit box, hence my earlier post re installing on both 2003 and 2008x64.

As I do not control the vc boxes there is 0 chance of getting the vc server upgraded to 4.0 or 4.1. This is scheduled for another 2 months.

So this leaves me with installing a vco 4.0 server. This leaves me with one question where does one get that? I think I will have to get our EA team to download it as I do not have a download account.

I can confirm that you cannot even configure the vim3 plugin against a 64 bit 4.1 vco server. I am aware I will need to refactor the code for 4.1, the differences in the object model seemed quite significant.

Reply
0 Kudos