VRA

VMware vRealize Automation 8.x – Helpful Commands

With the move away from using Windows servers as some of the core components for VMware vRealize Automation version 8.0 brings a whole new architecture. The use of kubernetes to deploy and run the VRA components is a massive welcome change to the VMware vRealize Automation suite. with this change brings new learning’s and the need to update your knowledge base notes to make sure you are still able to troubleshoot and report on the health of the VRA infrastructure.

The below commands are a small subset of some of the common commands that i have used and found, i’ll try to update these as i find more.

To begin there are 3 main CLI’s that can be used :

vracli – this is a custom built CLI for VRA
kubeadm – this is a standard kubernetes interface more on this can be found here
kubectl – again a standard kubernetes interface which is mainly used once the cluster is deployed to do pod and container level functions

list all namespaces running on the the VRA appliance:

kubectl get pods --all-namespaces

List the pods inside prelude which is the kubernetes namespace used by VRA, these are all the containers that make up VRA and should be one of the first commands to run if having issues.

kubectl -n prelude get pods

list the prelude services

kubectl get services -n prelude 

Check VRA status

vracli status 

Logs

VRA has a new log framework, the older versions of VRA had logs across multiple nodes Linux and Windows and could be a challenge to collate and review, as per the admin guide there are 2 main ways to get logs

1. Generating a Log bundle
2. Sending to a syslog server

i will also add manually reviewing the log via a SSH session, i’ve always liked to use the tail -f command when running processes in VRA to track what happens and see the errors/exceptions in real time.

Generating a Log bundle

The below command will create a log bundle in the location you currently in so i like to always go to the /tmp

 vracli log-bundle

This will create a file log-bundle-XXXXXXXXX.tar.xz file, this can then be exported using your favorite SCP/SFTP/FTP client like WinSCP and unpacked with 7-zip to view the log content

SYSLOG

To send logs to an external log server you will need to deploy the VMware vRealize Log Insight( vRLI), VRA uses a fluentd-based agent to forward logs to vRLI.

You can deploy vRLId via vRLCM and include it into the VRA environment
to check if vRLI is already configured run :

 vracli vrli

If not configured you will see the below

to add a instance to vra run :

vracli vrli set <FQDN of vRLI>
vracli vrli set <FQDN of vRLI>:9543 

Kubectl

you can also manually query the logs using the cat or tail command in linux, the VRA logs are mainly in the /var/log folders e.g.

/var/log/containers

you can also query these log files using the kubectl command as per the below screenshot find the container name you are trying to query using the kubectl get pods command and then run the below with the correct name where the xxxxx are :

kubectl logs identity-service-app-xxxxxxxxxxxx -n prelude

Upgrades

While running an upgrade from vRLCM you can check the staus of the upgrade by running the below.

vracli upgrade status --details

Start VRA

/opt/scripts/deploy.sh

Stop VRA

/opt/scripts/svc-stop.sh
sleep 120
/opt/scripts/deploy.sh --onlyClean