Configuring High Availability for VMware vcenter in RMS Distributed Setup This chapter describes the process of configuring high availability for the VMware vcenter. It provides the prerequisites and procedures required to configure and test the hot standby and cold standby for Cisco RMS. It also includes procedures required to back up and restore VMware vcenter. These procedures apply to Distributed RMS deployment. Prerequisites, page 1 Configuring Hot Standby for vcenter VM, page 2 Testing Hot Standby for vcenter VM, page 2 Configuring Cold Standby for vcenter VM, page 3 Testing Cold Standby for vcenter VM, page 3 Recovering the Primary of vcenter VM, page 4 Backing Up vcenter VM Database, page 4 Restoring vcenter VM Database, page 6 Prerequisites Operator or user of this procedure should have the following experience: Knowledge basic database/dba know-how Knowledge of basic linux/shell commands Ability to edit files with vi or vim Ability to view files (cat, tail, more, less) Ability to use SSH, and basic VMware commands. Complete installation of vcenter VM and add SAN support as recommended in the Cisco RAN Management System Installation Guide and the RMS VMs are added as described in Configuring Hot Standby for the Central Node. 1
Configuring Hot Standby for vcenter VM Configuring High Availability for VMware vcenter in RMS Distributed Setup For primary vcenter VM, install VM as part of the host that is planned to be part of the high availability cluster for the Central VM. Install cold standby vcenter VM as part of the host for cold standby Central VM. Note the following information on your setup before proceeding to configure high availability for vcenter VM: Node Location Node IP Address Node Description vcenter VM 1 vcenter VM 2 <VCENTER_IP_1> <VCENTER_IP_2> Primary vcenter VM Cold standby vcenter VM Ensure that the following ssh commands are working; use the root login. ssh root@<vcenter_ip_1> ssh root@<vcenter_ip_2> Note This section covers only additional steps required to achieve high availability for vcenter VM. Configuring Hot Standby for vcenter VM Step 3 Install VMware vcenter as described in the Installing the VMware vcenter 5.1.0 section of the Cisco RAN Management System Installation Guide to install primary vcenter VM on the same host where the primary Central VM is going to be installed or is already installed. Add vsphere high availability cluster as described in the Creating a High Availability Cluster to add vsphere high availability cluster for the host containing Central VM and vcenter VM. Take a database backup as described in the Backing Up vcenter VM Database, on page 4 and take a snapshot of the primary vcenter for use in recovery in case of a disaster after the primary vcenter is completely configured and all primary and hot standby VMs and hosts for Cisco RMS are being managed by the primary vcenter VM, Note Primary vcenter is configured to manage primary and hot standby Central VM, active-active pairs for Serving VM and Upload VM, and primary and hot standby PMG DB VM (if applicable). What to Do Next Testing Hot Standby for vcenter VM To test hot standby for vcenter VM, see the Testing High Availability Failover. The testing of high availability for vcenter VM is same as testing high availability on the Central node. For more information, see Testing High Availability on the Central Node. 2
Configuring High Availability for VMware vcenter in RMS Distributed Setup Configuring Cold Standby for vcenter VM Configuring Cold Standby for vcenter VM Step 3 Step 4 Install VMware vcenter as described in the Cisco RAN Management System Installation Guide to install vcenter VM with VCENTER_IP_2 on the host to be used for cold standby Central VM. Take a backup of the vcenter database as described in the Backing Up vcenter VM Database, on page 4 after the primary vcenter VM is completely configured and is managing all primary, hot standby hosts, and other VMs for Cisco RMS, Use the backed up database to restore it on the cold standby vcenter VM as described in Restoring vcenter VM Database, on page 6. Proceed with steps (see, Testing Cold Standby for vcenter VM, on page 3) to connect the hosts running the cold standby Central VM and cold standby PMG DB VM (if applicable) after the DB is restored on the cold standby vcenter VM. Note Cold standby vcenter VM continues to manage the hosts running the cold standby Central VM, and the cold standby PMG DB VM (if applicable). Take a VM snapshot and database backup of the cold standby vcenter VM to be used in case the cold standby vcenter also fails and needs reinstallation. Testing Cold Standby for vcenter VM Check if one of the hosts can be recovered to reinstall vcenter from the backup snapshot. If available, recover the primary vcenter. Perform this step only when both hosts fail in the high availability cluster at the primary site containing the primary vcenter VM. Else, proceed to the next step. Perform these steps if there is no host at the primary site to restore primary vcenter and there is a urgent need to manage remaining Serving, Upload, and PMG DB hosts and VMs at primary and secondary site. a) Connect hosts on the new vcenter. To do this, log in to vcenter. b) Go to Home > Inventory > Hosts and Clusters and right-click on the desired host and select Connect. c) In the Reconnect host window that is displayed, click Yes. d) In the Reconnect host error window that is displayed, which indicates that you need to enter the correct login credentials for the respective host, click Close. This automatically opens the Add Host Wizard. e) In the Specify Connection Settings screen of the wizard, enter your username and password for the host. f) Click Next. g) In the Security Alert pop-up window that is displayed, indicating that you need to add SHA1 thumbprint certificate, click Yes. h) In the Host Summary screen, which displays details about the host and VMs running under this host, click Next. i) In the Virtual Machines Location screen, which indicates the location where the host is present, expand the datacenter and select the respective folder under which the host is running. j) Click Next. 3
Recovering the Primary of vcenter VM Configuring High Availability for VMware vcenter in RMS Distributed Setup k) In the Ready to Complete screen, which displays the summary of the hosts that will be connected, click Finish. l) Repeat steps a to k on all hosts that need to be connected to the new vcenter. This will ensure successful connection of hosts on the new vcenter. m) Connect back the hosts mapping to active-active Serving node and Upload node after the primary site VMs and hosts are restored on the cold standby vcenter. n) Connect back the primary PMG DB, hot standby PMG DB (if applicable). o) Proceed to connect the host on the cold standby site for redundant Serving and Upload VM to the cold standby vcenter VM after the working hosts from primary site, that is, host for Serving node and Upload node and primary and hot standby PMG DB( if applicable) are connected to the cold standby vcenter VM. p) Proceed to configure cold standby for the Central node as described in the Configuring Cold Standby for vcenter VM, on page 3, which deals with testing cold standby for Central node. Recovering the Primary of vcenter VM Using the saved VM snapshots of the vcenter VM or saved database for vcenter, restore the primary vcenter after the replacement hosts for primary vcenter VM and central VM are installed or original failed hosts are recovered. For information on performing primary recovery of the Central node, see Enabling Primary Site After Restoration. Backing Up vcenter VM Database Establish an ssh connection using the root user to connect to the vcenter VM. ssh root@vcenter_ip_1 The system responds by connecting the user to the vcenter VM. Enter the root user password to gain access. Step 3 [enter root password] The system responds with a command prompt. Stop the vcenter server service. service vmware-vpxd stop Stopping VMware vsphere Profile-Driven Storage Service... Stopped VMware vsphere Profile-Driven Storage Service. Stopping tomcat: success 4
Configuring High Availability for VMware vcenter in RMS Distributed Setup Backing Up vcenter VM Database Step 4 Step 5 Stopping vmware-vpxd: success Shutting down ldap-server..done Display the vpostgres database configuration file and make a note of the values for EMD_DB_INSTANCE, EMB_DB_USER and EMB_DB_PASSWORD. cat /etc/vmware-vpx/embedded_db.cfg cat /etc/vmware-vpx/embedded_db.cfg EMB_DB_INSTALL_DIR='/opt/vmware/vpostgres/9.0' EMB_DB_TYPE='PostgreSQL' EMB_DB_SERVER='127.0.0.1' EMB_DB_PORT='5432' EMB_DB_INSTANCE='VCDB' EMB_DB_USER='vc' EMB_DB_PASSWORD='I&8rx)A=rLs6u}22' EMB_DB_STORAGE='/storage/db/vpostgres' On the vcenter Server Appliance virtual machine, navigate to the vpostgres utility directory. Step 6 Step 7 cd /opt/vmware/vpostgres/1.0/bin The system responds with a command prompt. Take a backup of the vcenter server database../pg_dump <EMB_DB_INSTANCE> -U <EMB_DB_USER> -Fp -c > <path/vcdbbackupfile> Fill in the EMD_DB_INSTANCE and EMB_DB_USER from the embedded_db.cfg configuration information listed in Step 4. Fill in the path/vcdbbackupfile with the location and file name to be generated./pg_dump VCDB -U vc -Fp -c > /tmp/vcdbackupfile1 Verify that the backup file created. Step 8 ls -l /VCDBackUpfile> ls -l /tmp/vcdbackupfile1 -rw------- 1 root root 210205828 Aug 20 05:23 /tmp/vcdbackupfile1 Start the vcenter Server service. Step 9 service vmware-vpxd start Waiting for the embedded database to start up: success Verifying EULA acceptance: success Executing pre-startup scripts... Updating the vcenter endpoint in the Lookup Service. Intializing registration provider... Getting SSL certificates for https://10.105.242.123:7444/lookupservice/sdk Service with name 'vpxd-blrrms-vcenter-ha-278ddba1-f0bd-4da5-8f5c-7e52daca9685' and ID 'local:f7bf9c8d-ea7c-459d-be49-b6b6281abdb4' was updated. Return code is: Success Starting ldap-server..done Starting vmware-vpxd: success Waiting for vpxd to initialize:.success Starting tomcat: success Executing startup scripts... Autodeploy service is disabled, skipping registration. Starting VMware vsphere Profile-Driven Storage Service...Waiting for VMware vsphere Profile-Driven Storage Service... VMware vsphere Profile-Driven Storage Service started. Using WinSCP or SCP, connect to the vcenter VM and download the VCDBackUpFile from /tmp/. scp /VCDBackUpfile> root@10.5.242.123:/tmp/ scp /tmp/vcdbackupfile1 root@10.105.242.123:/tmp/ VMware vcenter Server Appliance root@10.105.242.123's password: VCDBackUpfile1 5
Restoring vcenter VM Database Configuring High Availability for VMware vcenter in RMS Distributed Setup 198MB 65.9MB/s 00:03 100% What to Do Next Restoring vcenter VM Database Before You Begin Establish an ssh connection using the root user to connect to the vcenter VM. ssh root@vcenter_ip_1 The system responds by connecting the user to the vcenter VM. Enter the root user password to gain access. Step 3 [enter root password] The system responds with a command prompt. Using WinSCP or SCP, connect to the vcenter Server Appliance and upload the backup copy of the VCDBackUp file into the /tmp/ directory. Step 4 scp /tmp/vcdbackupfile1 root@10.5.242.123:/tmp/ scp /tmp/vcdbackupfile1 root@10.105.242.123:/tmp/ VMware vcenter Server Appliance root@10.105.242.123's password: VCDBackUpfile1 198MB 65.9MB/s 00:03 Stop the vcenter Server service. 100% Step 5 service vmware-vpxd stop service vmware-vpxd stop Stopping VMware vsphere Profile-Driven Storage Service... Stopped VMware vsphere Profile-Driven Storage Service. Stopping tomcat: success Stopping vmware-vpxd: success Shutting down ldap-server..done Display the vpostgres database configuration file and make a note of values for EMD_DB_INSTANCE, EMB_DB_USER and EMB_DB_PASSWORD. cat /etc/vmware-vpx/embedded_db.cfg EMB_DB_INSTALL_DIR='/opt/vmware/vpostgres/9.0' EMB_DB_TYPE='PostgreSQL' EMB_DB_SERVER='127.0.0.1' EMB_DB_PORT='5432' EMB_DB_INSTANCE='VCDB' 6
Configuring High Availability for VMware vcenter in RMS Distributed Setup Restoring vcenter VM Database Step 6 EMB_DB_USER='vc' EMB_DB_PASSWORD='$vq1oOh_CTmgG5E6' EMB_DB_STORAGE='/storage/db/vpostgres' On the vcenter Server Appliance virtual machine, navigate to the vpostgres utility directory. Step 7 cd /opt/vmware/vpostgres/1.0/bin The system responds with a command prompt. Restore the vcenter Server vpostgres database from backup. Step 8 PGPASSWORD='EMB_DB_PASSWORD';./psql -d <EMB_DB_INSTANCE> -Upostgres -f </path/vcdbbackupfile> #PGPASSWORD='$vq1oOh_CTmgG5E6' #./psql -d VCDB -Upostgres -f /tmp/vcdbackfile1 ALTER TABLE ALTER TABLE... Restart the VMware vcenter Server service for the database restore to take effect. service vmware-vpxd start Waiting for the embedded database to start up: success Verifying EULA acceptance: success Executing pre-startup scripts... Updating the vcenter endpoint in the Lookup Service. Intializing registration provider... Getting SSL certificates for https://10.105.242.123:7444/lookupservice/sdk Service with name 'vpxd-blrrms-vcenter-ha-278ddba1-f0bd-4da5-8f5c-7e52daca9685' and ID 'local:f7bf9c8d-ea7c-459d-be49-b6b6281abdb4' was updated. Return code is: Success Starting ldap-server..done Starting vmware-vpxd: success Waiting for vpxd to initialize:.success Starting tomcat: success Executing startup scripts... Autodeploy service is disabled, skipping registration. Starting VMware vsphere Profile-Driven Storage Service...Waiting for VMware vsphere Profile-Driven Storage Service... VMware vsphere Profile-Driven Storage Service started. 7
Restoring vcenter VM Database Configuring High Availability for VMware vcenter in RMS Distributed Setup 8