VMware Cloud Community
qc4vmware
Virtuoso
Virtuoso

Import a vCenter VM to vCAC

I am trying to import a vCenter VM and bring it under management of vcac.  I see that VCAC:VirtualMachine types have a .register() method and it looks like the workflow "Import a vCenter Virtual Machine" makes use of this.  When I run this workflow I get no errors but I don't see the vm anywhere in the inventory.  I was hoping this would equate to running the infrastructure organizer from the gui.  That is what I would like to achieve as I would like to weave this into a workflow.  Has anyone else successfully done this with vCO.  Am I missing a step?  One of the parameters is "identityUser" not sure how that is different than the owner.  Also it needs to be associated with a business group.  Anyway if anyone can help I'd appreciate it!

Paul.

0 Kudos
2 Replies
qc4vmware
Virtuoso
Virtuoso

After some trial and error I have discovered the error of my ways.  The vCO workflow requires that "identityUser" is a user with rights to perform the registration.  They do not specify this in api explorer anywhere I can see.  I had been specifying the same value for this as I was for "owner".  This is also not a required parameter which it seems it should be.  The workflow also does not error out if the registration fails which it should.  There are most definitely errors in the vCAC logs (thankfully) which made it apparent to what was occurring (or rather not). Its also worth noting that only the user name is required not the password as well.  I'm not sure what the logic is here.  It seems like this should be running under the context of the vCO user executing the workflow.

0 Kudos
vmwaredownload
Enthusiast
Enthusiast

Hi qc4vmware,

We are working on the same "Import a vCenter VM to vCAC" workflow. Requirement is this :

1. Cloning a machine which is under the vCAC.

2. Importing the cloned VM from vCenter to vCAC.

We are able to do the 1st action. For 2nd action, we don't want any manual interaction processes like importing the cloned VM through Infrastructure Organizer or Bulk Import. We want to automate the 2nd action. As soon as the VM is cloned it should get imported to vCAC. For this to happen we figured this "Import a vCenter VM to vCAC" workflow would help. Just to explore this workflow we tried to run it but encountered some issues here.

The cloned VM (vCenter VM) is selected for input manually. We mention the other inputs like Reservation, Hosts, user and other stuffs. We are getting stuck in the workflow as shown in Fig 1. When we debug the issue the output of the action elemet "getVirtualMachineByexternalRefID" is showing "Null". What is that we are going wrong here?

Help us out!! Smiley Happy

- SK

0 Kudos