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?

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

Vmware Esxtop Displaying Incorrectly In ESXi 5.5 Over SSH From Linux

Clip-art-top-cat-796078So I ran into this odd issue last night working in the old homelab. I was working on troubleshooting an issue with datastore performance on one of my Supermicro ESXi servers. I have two and they are awesome beasts that have been migrated into fancy Cooler Master cases, however that is a tale for another day. Anyway, I digress… the datastore. So yeah, it's a local raid 5 datastore attached to an LSI 9260-8i controller. This particular datastore is 3 600gb 15k SAS drives, and for some reason its slow as all get-out.

So being the command line guy that I am, I ssh from my Linux (Fedora 19, specifically) into my troublesome ESXi server and attempt to run esxtop to see if I can get a read on the disks. Much to my chagrin, the output of esxtop is a garble of text Unreadable to say the least.



an example of the horror i saw that night


Turns out that this is an issue related to terminal emulation type. Thanks to this bro, who ran into same issue on his Mac, I was able to get back in the game and determine that yes, you should not configure raid 5 with a dead BBU. Anyway, while his fix was not exactly help for me, it let me know what I needed to do to fix this issue.

The gist of the issue is this. In Linux (Fedora at the very least) the default terminal emulation type is xterm-256color. Set your terminal type to this, ssh to and ESXi 5.5 box, and experience this formatting debacle for your self.

Thankfully the fix is simple, just change your terminal emulation type to "xterm" and you will be good to go. I accomplished this with the command below.

# export TERM=xterm


I can tell you this, I never had issues ssh'ing to ESXi 5.0 from Linux, so this was probably introduced in ESXi 5.5


Related articles

HomeLab: Basic Syslog Configuration on Cisco Catalyst Devices
HomeLab: Upgrading Cisco IOS Via tftp on RHEL
Experiences with ESXi deployments on removable media
HOWTO Install VMware Tools in Nested ESXi on ESXi
HomeLab: Cisco 3550 Switch Software Configuration Guide


ESX 5: How to Power On A Virtual Machine from the Command Line

Avengers_lego___captain_america_by_robking21-d4wjhwtSo lately I have been noticing some strange issues with my home lab. Every so often I find my all my virtuall machines are down, however the ESX box is up and running fine. Checking the logs on the ESX server has not helped me get to the bottom of the issue, rather I can just see the messages that the server has rebooted. So at the very least I know that something is happening to the ESX server causing it to crash.

This morning I happned to get lucky as I was sitting in my office when the basement airconditioner turned on around the same time that the whole home dehumidifier kicked on. Bleep when all my UPSs, and then I heard my ESX server power off and power back on again.

So now I am on a mission to figure out how to get my ESX server and my UPS to communicate so i can get at least 30 seconds of power during brownout. However this is an issue for another day, right now I just need to get my Vcenter Server back up and running, however my challenge is how to do so despite the fact that I do not have a Windows machine that I can use to connect directly to my ESX server via Vcenter Client.

Thanfully I can power up my Virtual Machines on the Command Line Via SSH. First step is to log into the ESX Server and get a list of all the Virtual Machines that are currently registerd on it. You can do this using the command below.


 # vim-cmd vmsvc-getallvms

Now that I have a list of all my registered Virtual Machines, I need to check its current power state and ensure that it is in fact powered off.

~ # vim-cmd vmsvc/power.getstate 1
Retrieved runtime info
Powered off

Yup – its down. Now lets power it back on.

~ # vim-cmd vmsvc/power.on 1
Powering on VM:
~ #

Now wait a minute or so to allow the Virtual Machine time to boot… Now I should be able to RDP from my Linux Workstation to the Vcenter Server. No extra Windows Workstations needed.

Related articles

Vmware VCenter Virtual Appliance – Death to Windows.. I think.
HomeLab: Simple DHCP Service Configuration on a Cisco Router
NEW VMSA-2013-0016 VMware ESXi and ESX unauthorized file access through vCenter Server and ESX
Anonymous leaks VMware ESX Server Kernel source code

Vmware VCenter Virtual Appliance – Death to Windows.. I think.

6a00d8341c77ee53ef01630028e663970dI am, and have always been, a Linux/Unix Administrator, until VMware forced me to learn a bit of Windows.

This, above all, has been the very WORST part about Vmware. Just to run Virtual Center, I had to BUY Windows, I had to Install Windows, and I had to try to learn Windows.  Oh, and then I had to slap some sort of virus protection on it, and figure out how to patch it. And then worst of all try to authenciate to it, as I am not administering Active Directory. No, I use Openldap, as any Linux/Unix admin would.

Then on top of that I needed Windows to even run the VCenter Client and Connect to my VCenter Server.  Well hell, I don't run Windows, not even on my desktop, not even on my laptop… not at home and not in the office. Its been this way for 5 years and VMware, is not going to make me change this.

Now, flash forward to VSphere 5.1, and low and behold, what is this. A real, fully functioning, web client for VCenter. Ok now we are getting somewhere. Now, I have not had a ton of experience with it, but my first impressions are pretty good. Its flashy, its fast, and it appears to be fully functioning.

To further make my day, the Vmware VCenter Appliance is now no longer beta (this is probably old news to most). For those who are not in the know, its Linux (albeit Suse).  So I am downloading it now and am going to give it a spin. How fully functioning is it… I have no idea. Do I need a database somewhere or does it have one built in? I do know it can connect to oracle, which is really neat, but not as neat as postgres or mysql. Also, how awesome would it be if I could configure the thing to use Openldap for auth?

Dunno all the answers yet, but I should have more insight on the topic soon, so stand by.


Related articles

vCenter Server 5: Important Tip while Installation

Bash Script To Auto-Configure Vmware Tools at Boot

AogSpending a lot more time in ESX land these days and am working on auto installing and auto updating vmware tools. Found the link below which will be helpful for configuring vmware tools at boot. Not the greatest thing for vms that do not get rebooted a lot but its still not bad to use.


How to Use Hpacucli in ESXi

Miracle_WhipWow just stumbled into this one today as I was dreading having to reboot my ESXi 4.1 boxes just to see a few new local disks.

Apparently you can install hpacucli in ESXi very easily, and whats even better is that you can install it directly on a datastore and use the install on any host that has access to that datastore. No need to reinstall on each and every host in your cluster. No need to reboot to configure your disks.

Anyway here is the link to the how to, its obviously written by a Windows Guy, but it works easy enough.



Update: Apparently HP now provides an official version of hpacucli for ESXi 5 as part of HP ESXi Utilities Offline Bundle for VMware ESXi 5.0.

Also note that I found that my HP servers with the P400 card did not detect the new logical drives, even after a rescan. Apparently a reboot is required. However my HP boxes with the P410 card did detect the new logical drives after a rescan and no reboot was required.