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.

Modifying IP Address for Analytics VM:

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.

8 thoughts on “How to Change the IP Address for vCenter Operations 5 vApp

  1. Hi William

    Excellent article. Does the IP pool address range need to be adjusted after you change the IP of the VCOPS VM’s? Assuming you are changing subnets or vlans for example for the vcops vm’s?

    Thanks
    David

  2. David,

    I’ve not personally used IP Pools, so I can’t say if it’s needed. My understanding is the IP Pool is only needed during deployment, modifying the IP should not require any changes in the IP Pool itself as it just defines a set of IP’s within the pool that can be used.

  3. I had an issue on my installation where you could only edit the UI VM config file ip address by using the root account, NOT using the SUDO admin account.

    Great article though!! Thanks!

  4. I was unable to hit the webpage after making these configuration changes. The connection was being refused because my server was no longer listening on port 80. I had to edit the /etc/apache2/listen.conf file and change it to the new IPs as well. I assume this was supposed to change manually but did not.

  5. One note, you can update the appliance IP configuration using the vami tool as well. To do so simply run the following command: /opt/vmware/share/vami/vami_config_net

  6. This worked, but I also needed to modify my route, which is done in the /etc/sysconfig/network/route file, or via yast.

  7. I found that changing the IP was really easy via the “Configure Network” option directly on the VM Console. Follow the prompts to plug in the IP and Gateway. It seemed to update everything correctly when I did it that way.

Thanks for the comment!