VMware Cloud Community
jibran13
Contributor
Contributor

How can I retrieve ResourcePool in vRealize Orchestrator without using vCenter Server plugin installed in vRealize Orchestrator

Hello,

I'm trying to get ResourcePool from the vCenter into vRealize Orchestrator but there is no vCenter Server instance in the vCenter Server. Can anyone suggest how we can do this using JavaScript or any other way.

Thank You.

0 Kudos
5 Replies
iiliev
VMware Employee
VMware Employee

Hi,

Just to clarify - what exactly is your situation?

  1. You have a vRO setup where someone has explicitly removed vRO vCenter plug-in, or
  2. You have a vRO setup with vRO vCenter plug-in, but there are no vCenter instances registered with the plug-in, and you don't want to manually register one in vRO Java client.

If the latter, then you can try to dynamically register the vCenter instance you want to connect to, retrieve resource pool, and then un-register the vCenter instance. There are 2 ways to do so:

  • Using execute() method of Workflow scripting object, execute the workflows Add a vCenter Server instance and Remove a vCenter Server instance
  • Using VcPlugin scripting singleton, and at its methods registerVCenterServerInstance/unregisterVCenterServerInstance (but this assumes the vCenter certificate is already imported in vRO).

Also, vCenter exposes SOAP API and client libraries/bindings for various languages - Java, C#, etc.

If none of the above is applicable to your use case, then please provide more detailed information what exactly is your use case and what you are trying to achieve.

0 Kudos
jibran13
Contributor
Contributor

Yes, I have vRO setup with vRO vCenter plug-in, but there are no vCenter instances registered with the plug-in, and you don't want to manually register one in vRO Java client or server for the same. I understand your solution, but the issue is I cannot add the instance, even at runtime of workflow, I need to find a work around it, without adding vCenter Server instance in vRO (even dynamically).

So the scenario is, I need to retrieve objects from vCenter Server into vRO for the further processing(for updating properties of Resource Pool, VM's, adding/removing VM's from ResourcePool, Creating/Deleting ResourcePool ect). I'm able to retrieve VM's, because there is an instance of "vCAC Infrastructure Administration" plugin, I tried using same instance for retrieving ResourcePool that didn't worked (or maybe I'm missing something).

Is it clear now?

0 Kudos
DDinu
Enthusiast
Enthusiast

Was there any workaround for this one ?

I have the same scenario, Need to add a vCenter when needed and once done with the changes need to unregistered it.

VcPlugin.registerVCenterServerinstance(false, "vcentername", 443, "/sdk", false, username, "******************", "domain")

I] TypeError: Cannot find function registerVCenterServerinstance in object DynamicWrapper (Instance) : [_VcPlugin]-[class com.vmware.vmo.plugin.vi4.VMwareInfrastructure] -- VALUE : com.vmware.vmo.plugin.vi4.VMwareInfrastructure@5289a741.

Did any one had a luck with SOAP API ?

Add it as a soap host and remove it when done the task ?

0 Kudos
eoinbyrne
Expert
Expert

Depending on the version of vCenter you might be able to add it as a REST Host and use that API to get what you want? It's largely the same thing as the SOAP approach but if you've got 6.5 the REST API is pretty good

HTH

0 Kudos
DDinu
Enthusiast
Enthusiast

vCenter Version is 6.0, will not be able to make use of Rest API.

0 Kudos