Last week VMware released a new version of vRealize Automation (vRA), version 7.0.1. In this version most of the version 7.0.0 bugs and issues are resolved. In the release notes you can find the list of all resolved issues. In this blog I will guide you through the upgrade process.
It is possible to upgrade to this new version from any supported vRealize Automation 6.2.x version and the latest 7.0 version. In this blog I will focus on an upgrade from version 7.0.0 to version 7.0.1. If you still use an earlier version of vRA you have to upgrade frist to version 6.2.x. The environment we will upgrade is a minimum deployment based on version 7.0.0.
The following steps are required for a successful upgrade of vRealize Automation.
Before you start the upgrade it is important to backup some components of the existing installation. If something goes wrong you can always go back to the current version.
Configuration file backup
First start with a backup of the vRA configuration files. This file can be backupped with the following steps:
First create a directory backup.
mkdir /etc/backupconf
Copy now all directories to this folder:
cp -R /etc/vcac/ /etc/backupconf/
Perform these steps for each folder.
Database backup
Make a SQL backup of the vRA IAAS database. For the integrated postgres database it is enough to snapshot the complete vRA appliance.
Screenshots of the tenant configuration and users.
If something goes wrong with the upgrade it could be possible that this configuration information is changed. For safety it is recommended to capture this information.
Backup any files you have customized
The vRA upgrade will possibly delete or modify all customized files. If you want to keep this files please backup them. In our environment we don’t use any customized files.
Create snapshot of the IAAS server
To take a snapshot of the IAAS server is the last step in the upgrade process.
For the upgrade it is necessary to extend the existing disks of the vRA appliance. But before we do this, create a copy of the existing vRA appliance.
Service vcac-server stop
Service vco-server stop
Service vpostgres stop
Unmount swap table:
Swapoff –a
Delete existing partitions and create a 44GB root and 6GB swap partition. This command and the next command return an error about the kernel that is still active at this point. After a reboot at step 13 all changes will be active:
(echo d; echo 2; echo d; echo 1; echo n; echo p; echo ; echo ; echo ‘+44G’; echo n; echo p; echo ; echo ; echo ; echo w; echo p; echo q) | fdisk /dev/sda
Change the swap partition type:
(echo t; echo 2; echo 82; echo w; echo p; echo q) | fdisk /dev/sda
Set disk 1 bootable:
(echo a; echo 1; echo w; echo p; echo q) | fdisk /dev/sda
Register partition changes and format the new swap partition:
Partprobe
Mkswap /dev/sda2
Mount the swap partition:
Swapon –a
Resize2fs /dev/sda1
If everything is checked, click on the update tab. If not all services are running and you are using a proxy server, check this Vmware article: https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2144067
/opt/vmware/var/log/vami/vami.log
/var/log/vmware/horizon/horizon.log
The most useful information can be found in the vami.log and updatecli.log. In these log files you can see the download progress and information about the upgrade status.
Use tail –f /opt/vmware/var/log/vami/* to show all log files
The next step in this process is to upgrade the IAAS components. The IAAS installer will also upgrade the MSSQL database. In earlier upgrade processes it was needed to separately upgrade the database. To start the IAAS upgrade, follow the following steps:
After the IAAS upgrade first check the correct operation of the vRA appliance. Click on the infrastructure tab and click on endpoint. Verify the endpoint overview is correct. Next try to request a blueprint and check if everything will finish successful.
If everything is correct, the last step is the upgrade of the vRA agents on the OS templates. The new agents also contain some bug fixes. In our environment we use CentOS and Windows Operating Systems. We will first start with the upgrade of the CentOS agent followed by the Windows Agent.
chmod +x prepare_vra_template.sh
For the upgrade of the Windows Agent we will use the script made by Gary Coburn. He developed a script that will install all the needed components and the vRA agent on Windows. Thanks to my colleague Ronald van Vugt for this modification on this script because of newer java version. The original script is based on vRA version 7.0.0 which included version jre-1.8.0-66. The java version included in version 7.0.1 is newer, so a modification to the script is required.
./prepare_vra_template.ps1 vra-hostname iaas-hostnamePasswordofDarwinUser
Now request some of your blueprints to verify the correct operation of the vRA appliance, IAAS server and the guest agents. If everything is OK, then it is time to delete the snapshots of the vRA appliance and IAAS server.
Before executing this upgrade in a production environment it is recommended to plan the upgrade and verify that all dependencies will work after the upgrade. Also plan enough time for this upgrade, so you have the time to check and verify the installation.