Has anyone ever used CLI to add VM clients into Avamar? I know the procedure to add it into a group but from what I have tested it first needs to be imported and then can be added into a group
Aha! I discovered my error! The curl command updated the version in /usr/local/avamar/bin, but my sudo command was running against the file in the ~admin directory. Got pointed to the one in /usr/local/avamar/bin and all is well.
An easy way is to simply put all the VMs in a file, with each VM name on a line. Then you can run a simple 'for' loop on the CLI to add each VM in sequence.
I will start by assuming that you'll use the same VMware vCenter name and same Domain in your list, and only the VM name will change. For this, I would create a text file called "vm.txt" that contained each VM name on its own line and no other characters, i.e.
VM1
VM2
VM3
etc.
If you're trying to build this file on a Windows computer in a text editor, be 100% sure your file is encoded for ASCII.
I would next make a file called "rename.sh" on the Utility Node and put in the following:
What this does is simply read each line in the file and run the command against the VM name. In the above script, you may also need to provide the full path to the java command or to the proxycp.jar file, depending on your shell environment and path settings.
Amol
2 Intern
•
207 Posts
3455
0
Posted December 5th, 2016 08:00
If you know the exact path of the VM (folder path) on the vCenter you could use the following mccli command
mccli client add --type=vmachine --name=vmname --datacenter=datacentername --folder=/foldername/leve1/level2/ --domain=/VcenterName/VirtualMachines/
If you have proxycp.jar then you can run the following command
java -jar proxycp.jar --addvm --vc --vm
Regards
Amol Powar