Unsolved
This post is more than 5 years old
47 Posts
1
16347
Clearing up old VMs in avamar
My client has alot of virtual machines which are backed up daily..... We are using avamar 7.4
In Administration we see alot of VMs which are GREY....and the note says "VM is no longer addressable through vCenter"
From the CLI, how do we identify these VM clients and either retire or delete them???
thanks!
Ryan_Johnson
73 Posts
1
November 8th, 2017 08:00
CLI command "mccli vmchache show --name=" will list if a VM client is deleted from vCenter or not.
CLI command "mccli client delete --name=" or "mccli client retire -name=" are the commands to remove them.
There is probably a solution to automate what your trying to do with custom bash scripting.
mikelavery69
47 Posts
0
November 9th, 2017 05:00
thanks for the information but I'm assuming that there isnt a command to show VMs that arent addressable to vcenter?
If the client deletes alot of VM's then it seems we can only delete them manually.
dynamox
2 Intern
2 Intern
•
20.4K Posts
2
November 11th, 2017 17:00
Mike,
I used these utilities to automate retirement of deleted VMs:
java -jar proxycp.jar --listdeletedvms --vc myvcenter.company.com >>retire.clients.list
java -jar av2ool.jar client retire --filename retire.clients.list
mikelavery69
47 Posts
0
November 13th, 2017 03:00
many thanks. Useful info!
IDIGIT39
1 Message
0
July 10th, 2019 08:00
dynamox,
Where can I download av2ool.jar file from? Or is there any other better ways to retire VM clients automatically once they are deleted from the vCenter.
dynamox
2 Intern
2 Intern
•
20.4K Posts
0
July 10th, 2019 12:00
Here you go
ftp://avamar_ftp:anonymous@ftp.avamar.com/software/scripts/av2ool.jar
cei.sto
17 Posts
0
November 20th, 2019 10:00
Hi,
I have done such a script.
Here we go :
D.Michaud
2 Posts
0
January 6th, 2020 03:00
Hi,
Thanks for those information.
I work on something similar. I have already a script that delete retired client.
But I work on case of deleted client in VMware. On VMware, I have a use case that seems delete an existing VM. I didn't test because it's a production one.
Like a cloud, users have a selfcare on our VMware environment. And someome delete a VM and recreate a new with the same name. We do that sometimes to upgrade or redeploy and appliance.
In this case, a users recreate a VM with the same name. So avamar have two entries in mccli client show.
And when I specify the client name, I have only the active one.
Any idea?
Regards,
cei.sto
17 Posts
0
January 9th, 2020 02:00
Yes I have the same. They redeploy some vm frequently. But for Avamar the vm gets a new cid therefore is seen as a new client. You can still recover data from the old client, but the old one should be retired.
bkin
14 Posts
0
February 21st, 2020 16:00
Thanks for the sample code!
I would like to 'me too' the 'non-unique name' issue.
Is there a way to work with VMs via their unique identifiers instead of by name in these java apps?
Just for kicks I tested, and sure enough, the incorrect VM (the newly created one) was retired when using the /domainpath/VMName in the 'VMs to retire' file, as populated by java -jar proxycp.jar --listdeletedvms --vc
cei.sto
17 Posts
0
March 2nd, 2020 06:00
As I do on my script, I test if there are still backups attached to the client before deleting it. Worst case if the wrong vm gets retired (not deleted) the rules will add again the correct vm in the inventory and the policies. This is the main advantage of working with auto-add rules by vmware tags.
bkin
14 Posts
0
April 9th, 2020 16:00
I played with this a bit more, and clients retired in this manner aren't necessarily rediscovered it seems.
I used the script to retire a few, some active VMs were retired, and the next day after backups I checked, and none of them were back again. (We import all VMs found on the clusters both to Clients and to the Backup Policy itself). I was able to manually add the clients fine.
It seems the problem is proxycp.jar --listdeletedvms outputs a 'friendly name' of the client (/vcenter/folder/hostname), isntead of the 'Fully Qualified Name' (/vcenter/folder/hostname_UID)
mccli client retire (and likely av2ool.jar) accept the Fully Qualified Name, likely it should be used in all instances, otherwise 'bad information' is being passed by the scripts.
cei.sto
17 Posts
0
June 12th, 2020 04:00
Actually if you force a vcenter sync as in https://www.dell.com/community/Avamar/Equivalent-MCCLI-command-for-quot-Sync-with-vCenter-quot-feature/m-p/7449411/highlight/true#M17310 it re-adds automatically the vm back.
Our setting in mcserver.xml is to resync every 4 hours, so it adds back the reinstalled vm's automatically.
D.Michaud
2 Posts
1
March 8th, 2021 08:00
Ok, I find a solution.
In CLI, we use following command :
I list all long name :
avmgr getm --path="/VMWARE_DOMAIN"
1 Request succeeded
VMNAME_hLf7ue4cOa2Xyxnl8LCH8g location: eea8ee7dca74f3a292ba5587974f37406d88b1ab pswd: bffac819da543c3c38f291cf76f5630bbc031b59
[...]
After, I can check and manipulate each VM with mccli using long name
mccli client show --domain=/VMWARE_DOMAIN --name=VMNAME_hLf7ue4cOa2Xyxnl8LCH8g
0,23000,CLI command completed successfully.
Attribute Value ------------------------ ------------------------------------------------------
Client Name VMNAME
Fully Qualified Name /VMWARE_DOMAIN/VMNAME_hLf7ue4cOa2Xyxnl8LCH8g
[...]
cei.sto
17 Posts
0
March 22nd, 2021 08:00
As now procycp.jar and av2ool.jar don't work with Avamar >=19.3 anymore, I'll work on a new script which will also address this non unique problem using only mccli and avmgr tools.
Will keep you in touch.