Access and Configure Appliance Logs
You access the logs for vSphere Integrated Containers by using SSH to connect to the appliance. You can also access logs and configure log retention for each of the different vSphere Integrated Containers components. In most cases, it is sufficient to generate the support bundle, but advanced users can access individual logs if required.
Prerequisites
Make sure that SSH access to the appliance is enabled. To enable SSH access to the appliance, see Reconfigure the vSphere Integrated Containers Appliance.
Procedure
Use SSH to connect to the appliance as root user.
$ ssh root@vic_appliance_address
When prompted for the password, enter the appliance password that you specified when you deployed the appliance.To create a complete log bundle for the appliance, run the
appliance-support.sh
script./etc/vmware/support/appliance-support.sh --include-private --outdir <directory> --ignore-disk-space
The script includes the following options:
--include-private
: Includes files containing private values in the log bundle--outdir <directory>
: Directory to store the resulting log bundle--ignore-disk-space
: Ignore low disk space warnings for log bundle output`
Running this script creates a log bundle,
/storage/log/vic_appliance_logs_YYYY-MM-DD-00-01-00.tar.gz
, that you can supply to VMware support. This bundle includes the installation logs.To see the startup logs for each of the vSphere Integrated Containers components, run the
journalctl
command.- vSphere Integrated Containers Registry:
journalctl -u harbor
vic-machine-server
service:journalctl -u vic-machine-server
- vSphere Integrated Containers Management Portal:
journalctl -u admiral
- vSphere Integrated Containers Registry:
Configuring Log Retention
To configure log retention for the registry services, edit the
/storage/data/harbor/harbor.cfg
file.$ vi /storage/data/harbor/harbor.cfg
The default configuration allows 50 files, up to 200MB each per service.- To set the maximum number of files used for storing logs per service, change the
log_rotate_count
property value to the desired number. - To set the maximum size in MB per file, change the
log_rotate_size
property value to the desired number.
- To set the maximum number of files used for storing logs per service, change the
To configure log retention for the
vic-machine-server
service, edit the/etc/logrotate.d/vic-machine-server
file.The default configuration allows 10 files, up to 1GB each.
$ vi /etc/logrotate.d/vic-machine-server
- To set the maximum number of files used for storing logs, change the
rotate
property value to the desired number. - To set the maximum size in GB per file, change the
size
property value to the desired number.
- To set the maximum number of files used for storing logs, change the
To configure log retention for the management portal, edit the
/etc/vmware/admiral/logging-vic.properties
file.The default configuration allows 5 files, up to 1GB each.
$ vi /etc/vmware/admiral/logging-vic.properties
- To set the maximum number of files used for storing logs, change the
java.util.logging.FileHandler.count
property value to the desired number. - To set the maximum size in bytes per file, change the
java.util.logging.FileHandler.limit
property value to the desired number.
- To set the maximum number of files used for storing logs, change the
Log File Location
Depending on the component, navigate to the following locations to access the log files:
Component | Location | Log Files |
---|---|---|
Applliance | /var/log/vmware |
/upgrade.log |
vSphere Integrated Containers Registry | /storage/log/harbor |
|
vic-machine-server service |
/storage/log/vic-machine-server |
vic-machine-server.log |
vSphere Integrated Containers Management Portal | storage/log/admiral |
xenonHost.0.log |