Recently came across an issue with vCOPS 5, where I had stale adapters and data within my vCOPS database, and it would not allow me to re register a vCenter server, even tho I unregistered it previously.
The error you receive is:
Exception occurred during vCenter Server registration. UUID is not available for the currently registered vCenter [vCenter name] (https://[vcenter-FQDN]/sdk.) This can happen if you added the vCenter from custom UI instead of the admin UI. Please contact support to fix the problem and then attempt to register a new vCenter."
Bascially what happened was I had a peviously registered vCenter, it was refreshed same FQDN etc and it would not allow me to register it as there was already a vCenter with the same FQDN registered.
When un registering a vCenter using the admin UI, all the data and details remain, this can cause problems like I was seeing or the data is no longer needed but is taking up space in the database.
There was 2 ways to tackle this:
1) Using the force register (this would be used if you wanted to try and keep existing data if you had the same hosts and virtual machines etc. SSH to the UI server log in as admin and run the following command:
vcops-admin register --vc-name [name] --vc-server [FQDN/ip] --user [user] --password [password] --collection-user [user] --collection-password [password] --force
There is other commands available with vcops-admin, just type it in with no arguments and get the full list available. In this case its something I wanted to do as the hosts and vm’s did not change it was basically a migration. But unfortunately this did not do the trick.
2) Purge the old data and adapters out (warning: this will remove every trace or a previously registered vCenter server.) Time to get out the nuke and wipe the old instance out of existence. use the following command at your own risk, there is a reason its not listed as a command.
vcops-admin purge --vc-name [name]
The name is the name you gave the instance when first registered the vCenter, It will follow up with a confirmation and you have to type yes/no.
This is the option I had to go with, and in my case I was fine with it, You can use this option to remove old data from the vCOPS database. I got back a good 200GB from removing the old instance. Left my other 3 vCenters intact and finnally allowed me to resgister a new but old vCenter
note: depending on the size of the data attached to a peviously registered vCenter it can take a long time for this command to execute.