This article explains the best practice for gathering system logs from BOSH virtual machine (VM) while troubleshooting.
A "bosh recreate" or "bosh cck" and selecting recreate will destroy the affected VMs and then create a new VM. This process makes existing logs unrecoverable. If you have not configured syslog to deliver your logs to external storage, it is important to extract the logs from a VM before recreating the VM. It is especially important when conducting a root cause analysis.
A "bosh recreate" is executed automatically if the VM resurrection state is ON. This is the default configuration and is set during the Tanzu Platform for Cloud Foundry install. It can be changed on demand using bosh -e my-env update-resurrection on/off.
To prevent losing the VM logs, Pivotal strongly recommends that you configure syslog (BOSH Director and Tanzu Platform for Cloud Foundry) to send your logs to external storage (like Splunk or ELK).
Review the following steps/guidelines before executing "bosh recreate" or "bosh cck" on any of your VMs: