- Documentation
Volcengine Kubernetes Engine
Volcengine Container Instance
User guide
O&M
Persistent storage of container core dump files
O&M
Persistent storage of container core dump files
Persistent storage of container core dump files
VCI allows you to obtain process core dump files, which enables you to analyze and locate container exceptions. This topic mainly describes how to achieve the persistent storage of container core dump files in VCI.
Background information
The core dump is the process in which the operating system saves the current memory state of a program into a core file when the program abnormally terminates due to a runtime exception. If a VCI container abnormally terminates and the application log does not provide enough information to locate the root cause, you need to use the core dump file for further analysis and troubleshooting. This topic describes how to enable containers to generate core dump files and save them to external storage.
Feature introduction
By default, core dumps are disabled for VCIs to prevent excessive disk usage that can lead to service unavailability. You can enable core dumps by using pod annotations when creating a VCI.
The complete path example for the final generated core dump file is as follows:
Prerequisites
Procedure
Core dump files are typically used for offline issue analysis. Therefore, when you configure a path for saving core dump files, we recommend that you use attached storage rather than built-in storage (local container paths). This prevents the loss of core dump files when the container exits.
The following example demonstrates how to enable the core dump capability for a VCI Deployment by using FileNAS as attached storage. This is achieved by mounting FileNAS to the VCI Deployment via the PV method. For detailed instructions and YAML field descriptions, see Using FileNAS as static PersistentVolumes. - Connect to the VPC-CNI cluster.
- Create a PV of the FileNAS type.
- Create a YAML file for the PV. The following vci-nas-pv.yaml file serves as an example:
- Run the following command to create the PV.
- Create a PersistentVolumeClaim (PVC).
- Create a YAML file for the PVC. The following vci-nas-pvc.yaml file serves as an example:
- Run the following command to create the PVC.
- Create a VCI, configure a path for storing core dump files, and enable core dumps for the VCI.
- The following content provides an example of how to create a VCI Deployment. For instructions on creating a VCI, see Creating instances.
- Create a YAML file for the VCI Deployment. The sample YAML file vci-nas-coredump-deployment.yaml is as follows:
- Run the following command to create the Deployment.
Validating results
You can trigger a core dump in a VCI for which a directory for saving core dump files is configured.
- Run the following command to obtain the name of the pod in the VCI Deployment.
- Run the following command to log in to the VCI pod.
- Run the sleep 100 command in the container and then press Ctrl+\ to trigger a core dump. The generated core dump file will be automatically saved to FileNAS.
- The expected response is as follows:
-
Last updated: 2026.03.16 14:55:25