Vmware CapacityIQ Unregister a Vcenter Server via the CLI

Vmware-logoOk two in a row, now thats strange. Anyway.. I was working on a rebuild and re-ip of my Vcenter Server as I was in the process of changing over to the Vcenter appliance, when i realized that I was going to have to lay hands on a lot of tools and change them to point/connect to my new Vcenter Server instance. Anyway. I started of with VCOPS, and I was surprisingly sucessful. So I figured I would move on to Capacity IQ.

Again, being the Linux guy that I am, I hit up the cli and stated fiddling around. I stumbled across the ciq-admin command and was able to find the following

[ciqadmin@ciq ~]$ ciq-admin register status
vCenter Server Registration Status = Registered
vCenter Server address             = https://vc00.lab.localdomain/sdk
vCenter Server user                = LAB\user

 

Hey ok, that looks good so far. Lets see if we can unregister.

[ciqadmin@ciq ~]$ ciq-admin unregister
Connection to VC failed. Disconnected CIQ, but could not remove CIQ extension from VC.

 

Well crap, you will never be able to connect to my original Vcenter Server… it's dead and its not coming back. Luckily it appears that we can force the registration of a new Vcenter Server

[ciqadmin@ciq ~]$ ciq-admin  register –vc-server vc01.lab.localdomain –force  –user root –password mypasswd
Stopping CIQ :                                             [  OK  ]
Starting CIQ :                                             [  OK  ]
ciq-watchdog is now enabled

 

Now head back on over and get a gander at the webUI. Still shows the old Vcenter Server? Just logout and log back in again and life should be good.

 

Related articles

Vmware VCenter Virtual Appliance – Death to Windows.. I think.
ESX 5: How to Power On A Virtual Machine from the Command Line
VMware vCenter Operations Manager Essentials – Introduction to vCenter Operations Manager
vCenter Operations Manager: VMware's move into cloud monitoring?
Advertisements

Vmware Vcenter Operations Manager Unregister a Vcenter Server via the CLI

Vmware-workstation-17-535x535So my Windows based Vmware Vcenter Server went belly up again. Something to do with the SSO database not starting. Not being a lover of Windows I decided to give the Vcenter Server Appliance a shot. Install was great and I am kicking myself a bit as to why I spent so much time fighting with Windows. My new Vcenter Server, which has a different IP address then the original Windows box (might make a great Veeam server) was not registered with Vcenter Operations Manager. I was not prepared to reinstall that thing again. So I needed to figure out how to manually unregister a Vcenter instance and add register another one in its place.

Since VCOPs runs Linux, I decided to ssh into the server and see if I could figure it out. First thing I found that I needed to do was figure out the registered Vcenter Server name and Vcenter Name (whatever that's supposed to be) I was able to do this using the vcops-admin command.

admin@vcops:~> vcops-admin summary

 

This command output a bunch of stuff, but the important bits for this task are below.

Registration Details
——————–
vCenter Server address  = https://vc00.lab.localdomain/sdk
vCenter Server name = Lab Vcenter

 

So now we need to unregister the sucker above. Note that this command takes a bit to unregister

admin@vcops:~> vcops-admin unregister –vc-name Lab\ Vcenter –vc-server https://vc00.lab.localdomain/sdk –user LAB\\userid –password mypassword–force

vCenter Server unregister = success

 

So flip on over to your browser and log in. The unregister process will cause the webUI to reload, so if you were already logged in you will find that you still need to log in again.

Now you can register your new Vcenter Server via the webUI.

Related articles

Vmware VCenter Virtual Appliance – Death to Windows.. I think.
ESX 5: How to Power On A Virtual Machine from the Command Line
vCenter Operations Manager: VMware's move into cloud monitoring?
VCOPs – VMware's Move into Cloud Monitoring