Downloading Logs from VMs
Page last updated:
Warning: VMware Enterprise PKS v1.7 is no longer supported because it has reached the End of General Support (EOGS) phase as defined by the Support Lifecycle Policy. To stay up to date with the latest software and security updates, upgrade to a supported version.
This topic explains how to download logs from BOSH-deployed VMs in your VMware Enterprise PKS environment using the BOSH Command Line Interface (CLI).
Overview
In Enterprise PKS, you can download logs from any BOSH-deployed VM, such as the PKS API VM or Kubernetes cluster VMs.
You might need to download these logs when troubleshooting or auditing your PKS environment.
Download Logs
To download logs from a BOSH-deployed VM:
- Gather credential and IP address information for your BOSH Director, SSH into the Ops Manager VM, and use the BOSH CLI to log in to the BOSH Director from the Ops Manager VM. For more information, see Advanced Troubleshooting with the BOSH CLI.
After logging in to the BOSH Director, list the names of your BOSH deployments by running:
bosh -e ENVIRONMENT deployments
Where
ENVIRONMENT
is your BOSH environment alias. For example:$ bosh -e pks deployments
Identify the names of the VMs that you want to retrieve logs from by listing the VMs in your target BOSH deployment:
bosh -e ENVIRONMENT -d DEPLOYMENT vms
Where:
ENVIRONMENT
is the BOSH environment alias.DEPLOYMENT
is your target BOSH deployment name.
For example, the following command lists the VMs in a Kubernetes cluster:
$ bosh -e pks -d service-instance_ae681cd1-7ff4-4661-b12c-49a5b543f16f vms
Kubernetes cluster deployment names begin withservice-instance_
and include a unique identifier.Download logs from a VM:
bosh -e ENVIRONMENT -d DEPLOYMENT logs VM-NAME
For example:
$ bosh -e pks \ -d service-instance_ae681cd1-7ff4-4661-b12c-49a5b543f16f \ logs master/000a1111-222b-3333-4cc5-de66f7a8899b
For more information about log files, see View Log Files in Using BOSH Diagnostic Commands in Enterprise PKS.
Please send any feedback you have to pks-feedback@pivotal.io.