A compilation of the most commonly used commands for managing vRealize Automation 8: сommands from various sources (vRA online help, VMware knowledge base, vracli help system, support correspondence) are collected and organized in one place.
- Checking vRA status
- Stop and start
- Working with logs
- Network settings
- Disks
- Installing updates
- Working with internal database
A description of the syntax of the vracli command and all its options can be found in the built-in help system. Help information is also available for each of the arguments:
vracli --help
vracli status --help
I also recommend that you read the official documentation: Administering vRealize Automation , and for automated configuration and monitoring, you can use the REST API .
Checking vRA status
# Show cluster status
vracli status
# Show current vRA version
vracli version
# Show installed patch version
vracli version patch
# Checking the status of services and applications
vracli service status
# Deploy operation status
vracli status deploy
# Check the status of vRA pods
kubectl -n prelude get pods
# Check the status of pods with filtering and extended data format
kubectl -n prelude get pods -o wide | grep postgres
Stop and start
# Stop vRA version 8.6 and older
/opt/scripts/deploy.sh --shutdown
# Stop vRA version 8.5 and earlier
/opt/scripts/svc-stop.sh
sleep 120
/opt/scripts/deploy.sh --onlyClean
# Launch vRA
/opt/scripts/deploy.sh
# View vRA deployment log
tail -f /var/log/deploy.log
Working with logs
# View logs by pod name
vracli logs postgres-0
# View service logs
vracli logs --service rabbitmq-ha
Create Log Bundle:
# Create a log-bundle and save to /home/root
vracli log-bundle
# Limit log-bundle creation time
vracli log-bundle --collector-timeout $CUSTOM_TIMEOUT_IN_SECONDS
# Collect logs for the last N days
vracli log-bundle --since-days 1
# Collect logs only from the specified services
vracli log-bundle --services ebs-app,vco-app,abx-service-app
Setting up the transfer of logs:
# Configuring the transfer of logs to vRealize Log Insight
vracli vrli
vracli vrli set https://vrli.zabedu.ru:9543
vracli vrli set --insecure https://vrli.zabedu.ru:9543
# Cancel transfer of logs to Log Insight
vracli vrli unset
# Setting up the transfer of logs to an external Syslog server
vracli remote-syslog set --help
# Cancel transfer of logs to Syslog
vracli remote-syslog unset
Network settings
# DNS setup
vracli network dns status
vracli network dns set --servers DNS1,DNS2
# Change IP
vracli network ip --address 192.168.3.10 --gateway 192.168.3.1 --dns 192.168.3.1
# vRA restart required after changing network settings
# NTP setup
vracli ntp status
vracli ntp esxi
vracli ntp systemd --set 'NTP1', 'NTP2'
Disks
# View disk information
vracli disk-mgr stats
# Resizing partitions after expanding disk
vracli disk-mgr resize
# результат работы в /var/log/disk_resize.log
Installing updates
# View current version
vracli version
# Mount the update disk
mount /dev/sr0 /mnt/cdrom
# Prepare vRA for upgrade, stop services, after this operation you need to take a snapshot of the VM
vracli upgrade exec --prepare --profile lcm --repo cdrom://
# Run update
vracli upgrade exec
# View current update status
vracli upgrade status --detail
Working with internal database
Attention! Modifying data directly in the vRA database is an undesirable and very risky operation. You must clearly understand what and why you are doing. Be sure to back up the vRA or database before making any changes.
# View the list of databases
vracli dev psql --list
# Connect to PostgreSQL database
vracli dev psql
\c identity-db
# Connect with database selection
vracli dev psql abx-db
# Exit PostgreSQL
\q
# Create a database backup
vracli db dump identity-db > identity-db-data.dump
# Restoring a database from a backup
vracli db restore -d identity-db identity-db-data.dump