Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

5818

August 27th, 2012 08:00

How to list and add the machines of vCenter using MCCLI those are not added to Avamar domain yet?

After adding a vcenter to the Avamar server, to add a new machine, I can right click on a domain and click new client, you will get option to Browse to all the machines.  When you check the box "show sub-domain virtual machines", it will list all VMs what ever you see in the vCenter.  I can add any machine I want to the vCenter Domain in Avamar.

I want to do that same thing using MCCLI.  "mccli client show" did not work as it can only show the machines already added to the Avamar domain under a vCenter server in Avamr.

Here is the command line and the error I got.  I do not get any errors when I add it using Avamar Admin Console.  Just to note this CentOS VM is part of a vApp in vCloud Director and a machine in a resource pool in vCneter context.  I do not get the error when I add a Windows machine that is NOT in a resource pool, but just a regular VM in vCenter.

mccli client add --type=vmachine --domain=/10.X.Y.Z/TestCompanyName --name="TestVM1 (c343d3e3ed234534tr34r34534345qdf)" --datacenter="TestDataCenter"

1,22356,Encountered null virtual machine object

The above error is basically telling that machine is not found.

Is there any way I can check the logs on the Avamar side for every opearation I do in Avamar Admin console, like some IDEs will allow you to see the command ran behind when you run a task in the GUI?

August 30th, 2012 14:00

Thanks Sudeep.  It is working now.  There are couple of problems in our command line.  I was using double quote for folder option which was causing first problem. Also, I was using the folder pat as "/DataCenter/Resourcepool/vAppResourcePool/VM” as seen in Hosts and Clusters view of vcenter, but it should be /DataCenter/ /OrgFolder/ResourcepoolFolder/vAPPResourcePoolFolder’

The following command line worked out.

mccli client add --name="TestVM3 (b3a0x79a-dc30-4613-ac6c-3f9898d9589c)" --domain=/a.b.c.d/vCenterAvmrDomain --type=vmachine --datacenter="DataCenter1" --folder=' /Org1 (28a1c468-8e3e-4739-8dfc-688b6add8d8c)/OrgvDC1 (4b0a60be-d110-404e-aa24-45d717185fe9)/vApp2 (28dcfe7e-5681-4739-8c2d-bba9e1b831db)'

307 Posts

August 28th, 2012 04:00

The MCCLI command should work to add VM client.

Can you please attach screenshot of the VM from the vSphere view and the screenshot of vCenter domain and VM sub-domain from Avamar administrator GUI

No Events found!

Top