There was an interesting question on twitter from Matt Cowger yesterday asking how to modify the IP Address of the Analytics VM in the new vCenter Operations 5 vApp after it has been deployed. The new VC Ops 5 is actually composed of two virtual machines: UI and Analytics VM. As part of the initial deployment, they're is an exchange of information between the two VMs to properly get setup which includes the IP Addresses of each other. Simply modifying the IP Address of either VM will result in VC Ops not functioning correctly.
I personally have not had to re-IP my home deployment of VC Ops, but I did have some experience with CapacityIQ before it was combined into the VC Ops product and there was a nifty CLI tool called ciq-admin that was not very well known. I thought I check to see if the new VC Ops had something similar and to my surprise, an updated version of the tool exists and has been renamed to vcops-admin.
After a few minutes of looking around, it was clear that one could modify the IP Address of the Analytics VM and here are three simple steps.
Disclaimer: This is for educational purposes only, this is not officially supported by VMware. Please ensure you test and backup your system before making any changes in a real production system. Data that was previously collected will still be available after the change of an IP Address.
Step 1 - First we need to shutdown VC Ops, you can do this from the administrator page by going to https://[vcops-ip]/admin and stopping the service under the Status tab. In this example, I will be showing you how to so using the CLI on the UI VM (this is primary system you use to access VC Ops)
You will need to sudo to "admin" user to run the command "vcops-admin stop". If you accidentally logged into the analytics VM and try to run the command, you will receive an error as the CLI is only available on the UI VM.
Step 2 - Log into the remote console of the analytics VM, this is required as you will be changing the IP Address and may possible impact network traffic. You will need to edit /etc/sysconfig/network/ifcfg-eth0 using an editor such as "vi" and specify the IP Address you wish to change to. Once you are done, you will need to restart the network interface for the changes to take effect. To so so, run the following command "service network restart".
Step 3 - Go back to the UI VM (you will need to sudo over to "admin" account if you are not already) and you will now need to "repair" the connection between the UI and Analytics VM to ensure they can communicate with each other. To do so, you will run the following command "vcops-admin repair --ipaddress [new-analytics-ip]". If the UI VM is able to successfully connect to the new IP Address of the Analytics VM, it will automatically start up the VC Ops service. Once the service has been started, VC Ops is now running and operational.
Now what if you want to change the UI VM's IP Address? I thought this should be pretty straight forward right? Well, it took me a bit longer than I was expecting but the process is just four easy steps.
Modifying IP Address for UI VM:
Step 1 - Stop VC Ops service, you can do this using the admin portal or via SSH as shown in Step 1 of Analytics VM
Step 2 - Login to the remote console of the UI VM this is required as you will be changing the IP Address and may possible impact network traffic. You will need to edit /etc/sysconfig/network/ifcfg-eth0 using an editor such as "vi" and specify the IP Address you wish to change to. Once you are done, you will need to restart the network interface for the changes to take effect. To so so, run the following command "service network restart".
Step 3 - Login via SSH to UI VM using the new IP Address (you will need to sudo over to "admin" account if you are not already) and you will now need to "repair" the connection between the UI and Analytics VM to ensure they can communicate with each other. To do so, you will run the following command "vcops-admin repair --ipaddress [new-analytics-ip]". If the UI VM is able to successfully connect to the Analytics VM, it will automatically start up the VC Ops service.
Step 4 - The last step is to update the vCenter VC Ops plugin information so when you navigate to the VC Ops extension, it knows the new IP Address. This step can be done by logging into the admin portal and under "Registration" tab, you will need to click on the "update" button for each and every vCenter that is attached to the VC Ops. In this example, I will show how to do so using the "vcops-admin" CLI. You will need to run the following command:
vcops-admin register update --vc-name [vc-name] --vc-server [https://vc-server/sdk] --username [vc-username] --password [vc-password] --force
Note: This process may take a few minutes for each vCenter that you need to update, also if you have a dedicated service account for the collector, you can specify --collection-user and --collection-password agruments.
Though the process of modifying the IP Address is not available through the UI today, it is a feature that I will be requesting as this should be a trivial task for users.