If you are running vCloud Usage Meter 3.3.1 or older your appliance is at risk and needs to be updated. VMware released an update but didnt exactly provide the best instructions for getting your systems updated. The purpose of this blog is to fill that gap and provide some detailed instructions.
To get started you should first go download 3.3.2 or newer vCloud Usage Meter OVA. Once you have that file you should make sure your current system has all the prerequisites taken care of, because if you dont when you upgrade and try to visit your updated Usage Meter you will only be greeted by a big ugly stack trace. Lets take care of those now. By default sshd is not running, but the upgrade script called
importum requires it, and requires it to be running on the default port of 22. You can check your system by logging in as root and running the command
service sshd status. If you get the response:
Checking for service sshd unused
then its not running and you will need to use
service sshd start to start it up. Next just to be sure you should verify it is running on port 22 and listening on all interfaces like this:
ss -an|grep 22 That should give you some output like the following:
LISTEN 0 128 :::22 :::*
LISTEN 0 128 *:22 *:*
If your output shows this then you are ready to move on to the next step which is to make sure your root password is set. By default there is no root password set and if that is the case with your system its time to set a password using
passwd. Once that is set you should test ssh connectivity to make sure you can connect to the server as root. Once you have successfully logged in as root from a remote system you are ready to upgrade.
The upgrade process is pretty simple. All you need to do is deploy your new OVA and once it boots up log in as root with no password. Next issue the
importum command. It takes 2 params. The first one should be the hostname or IP of the old Usage Meter, the next param is the version of the usage meter software. In my case I wanted to update the host 172.16.214.130 and it was running 3.3.1 so I ran the command:
importum 172.16.214.130 331
Here is the output from my command:
localhost:~ # importum 172.16.214.130 331
Connecting to Usage Meter at 172.16.214.130 to dump and compress the database and copy files to transfer directory
The authenticity of host '172.16.214.130 (172.16.214.130)' can't be established.
RSA key fingerprint is 42:d7:3a:ad:9c:b1:b0:41:7f:93:5a:fd:a5:13:d9:01.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.16.214.130' (RSA) to the list of known hosts.
VMware vCloud Usage Meter
Copying files from old Usage Meter
Moving existing keystore file to /opt/vmware/cloudusagemetering/encryption/defaultks-20141004_195153
Renaming existing database to usgmtr_20141004_195153
Import is complete. See /var/log/usgmtr/import-20141004_195153.log for details.
Once this is complete you are all done. If you have any problems check the logs in
/var/log/usgmtr/ Happy updating!