Skip to content

Registering your first vCenter

Most of the recipes later in the book act on vSphere objects. Before Orchestrator can see them, the vSphere vCenter plug-in needs to know which vCenters to talk to. Registering one is itself a workflow, which makes it a nice first run.

Getting ready

  • A working Orchestrator login with administrator rights.
  • A vCenter 9.x (here vc01.vmw.lab) and an account with enough privileges for the work you plan to automate.

How to do it

  1. In the Orchestrator Client, go to Library > Workflows and search for add a vcenter.
  2. Open Add a vCenter Server instance and click Run.
  3. On the Set the vCenter Server instance properties page, enter the vCenter address, vc01.vmw.lab. Leave the port at 443 and the SDK location at /sdk. Tick Do you want to ignore certificate warnings? only in a lab: it adds vCenter’s certificate to the trusted store without asking.
  4. Open the Set the connection properties page:
    • Choose whether to create a session per user to the vCenter Server. With per-user sessions, each workflow acts on vCenter as the person who ran it. Without it, Orchestrator uses one shared session.
    • Enter a username and password. The form requires them either way; with a shared session, they’re the account every workflow uses. The form fills in your own login name to start with, so change it to the service account you intend.
  5. Click Run. If vCenter’s certificate isn’t signed by a trusted authority, you’re asked to accept it.
  6. Watch the run in Activity > Workflow Runs. A green tick means the vCenter is registered.
  7. Go to Administration > Inventory > vSphere vCenter Server and expand the new vCenter. You should see its data centers, clusters, hosts, and VMs.
Run form of Add a vCenter Server instance, on the Set the connection properties page: the check box Do you want to create a session per user to the vCenter Server is ticked, followed by the username, password and domain name fields.
Figure 1.19. The input form of the Add a vCenter Server instance workflow.
Administration, Inventory: vSphere vCenter Server expanded to the vCenter vc01.vmw.lab, then Datacenters, the data center VCF-MGMT-dc01, its host folder with the cluster VCF-MGMT-cl01, and its vm folder with the VM folders and the first VMs.
Figure 1.20. The registered vCenter in the Inventory view.

How it works

The vSphere plug-in keeps a list of vCenter connections. The workflow you ran adds one, and from then on the plug-in maps vCenter’s objects to Orchestrator types such as VC:VirtualMachine, VC:HostSystem, and VC:ClusterComputeResource. Those are the types you’ll use as workflow inputs, and why a workflow form can show a VM picker that browses the live inventory.

Session per user matters for auditing. With a shared account, vCenter records every change as that account. With per-user sessions, the token of the person who started the workflow is passed to vCenter, so vCenter’s tasks and events show who really made the change. That works when Orchestrator and vCenter trust the same identity source, as with vSphere authentication or VCF SSO.

There's more

Changing or removing a vCenter. The same workflow folder contains Update a vCenter Server instance and Remove a vCenter Server instance.

Registering vCenter isn’t the same as integrating with the vSphere Client. This recipe lets Orchestrator act on vCenter. Putting Orchestrator workflows into the vSphere Client’s right-click menu is a separate step (see recipe 1.4, There’s more).

See also