When a vCenter Server Appliance runs low on disk space, its logs may be one of the causes. Clearing them can help, but deleting the wrong file—or removing logs needed for troubleshooting or compliance—can create bigger problems. The safest approach is to identify which partition is filling up, preserve useful diagnostic data, and remove only old, rotated logs that your retention policy allows you to delete.
This guide explains how to check vCenter log usage, clean up eligible files on the vCenter Server Appliance (VCSA), and avoid common mistakes. It also covers what to do if you need more space than log cleanup can provide.
Before You Clear vCenter Logs
First, confirm that logs are actually responsible for the storage problem. VCSA uses separate filesystems for different types of data, and a full partition may instead be caused by database files, core dumps, backups, or another service. Deleting logs will not solve a problem on an unrelated partition.
Before making changes, consider these precautions:
- Check your organization’s log-retention and audit requirements. Logs may be needed for investigations or compliance.
- If you are troubleshooting an incident, export a support bundle or copy relevant logs before removing anything.
- Use a recent, verified file-based backup of vCenter before making significant storage changes.
- Do not delete files from database, application, or system directories just because they are large.
- Where possible, use VMware’s supported management tools and procedures for your vCenter version.
In particular, do not remove files from directories such as /storage/db or delete core dumps without understanding what they contain. Core dumps are not ordinary log files; they may be important for diagnosing a crash.
Check Which vCenter Partition Is Full
For a VCSA, open the vCenter Server Appliance Management Interface (VAMI) in a browser at https://<vcenter-hostname-or-IP>:5480. Sign in with an account that has appliance administration privileges, then review the storage information under the monitoring section. The exact labels can vary by vCenter version.
You can also check usage through the appliance shell. If SSH access is disabled, enable it through VAMI’s access settings, connect to the appliance, and enter the shell if you are presented with the appliance prompt. Then run:
df -h
Review the output for filesystems that are close to 100% usage. Common VCSA mount points include /storage/log and /storage/core, although the layout can vary by deployment and version. The /var/log/vmware path is also commonly used for VMware service logs and may reside on a separate mounted filesystem.
To find which top-level directories are using space on the log partition, try:
du -h --max-depth=1 /storage/log 2>/dev/null | sort -h
If the output points to a particular service directory, inspect that directory before changing anything. For example, vCenter Server service logs may be found under /var/log/vmware/vpxd. Treat paths as examples, not a complete list: confirm the actual mount point and file locations on your appliance.
Identify Rotated Logs You Can Review
Log rotation is the process of moving older log content into numbered or compressed files so that a service can continue writing to a fresh log. Depending on the service and configuration, rotated files may have names ending in .1, .2, or .gz. The current log file is often the one without a number or compression suffix.
List older compressed files for review without deleting them. For example, this command searches a specific log directory for compressed files older than 30 days:
find /storage/log -type f -name '*.gz' -mtime +30 -print
Change the directory and age to suit your environment and retention policy. Review the results carefully. A file being old or compressed does not automatically mean it is safe to remove; it may still be needed for support, auditing, or an active investigation. Avoid broad searches across the entire appliance when you are not certain what the results include.
Remove Old Logs Carefully
If you have verified that particular archived logs are no longer required, remove only those files. One cautious method is to run the listing command first, then use a narrowly targeted deletion command after checking the output. For example, to delete compressed logs older than 30 days from a confirmed log directory:
find /storage/log/example-service -type f -name '*.gz' -mtime +30 -print
After reviewing the list and confirming that the files meet your retention policy, you could use:
find /storage/log/example-service -type f -name '*.gz' -mtime +30 -delete
Replace /storage/log/example-service with the specific directory you inspected. Do not run this command against a broad path unless you understand exactly what it will match. If you are unsure about a file’s purpose, leave it in place and consult your VMware administrator or support team.
Avoid deleting the active log file that a service is currently writing to. Removing an open file may not immediately free the expected space, and manually clearing a live log can interfere with troubleshooting. Do not use a wildcard such as rm -rf /var/log/vmware/*; it can erase logs needed by multiple services and make diagnosis harder.
Use Log Rotation Rather Than Repeated Manual Deletion
If the same log directory fills repeatedly, investigate why the logs are growing. A service may be producing an unusually high volume of messages because of an ongoing error, or log rotation may not be working as expected. Check the relevant service’s health and recent events, and review the configured rotation and retention settings using procedures supported for your vCenter release.
Avoid applying generic Linux log-rotation changes across the appliance. VCSA services have appliance-specific configurations, and changing system rotation settings can have unintended effects. If logs grow rapidly or rotation appears broken, collect diagnostic information and contact VMware support rather than disabling logging or changing service settings at random.
What If the Logs Are Needed for Troubleshooting?
If you are investigating a service failure, first preserve the relevant logs. You can create a support bundle using the available VAMI or vSphere Client support-bundle workflow for your version. Store the bundle somewhere with adequate free space, such as an approved administrative workstation or support repository, rather than on the already-full vCenter partition.
For a focused investigation, note the time of the problem and the affected service, then retain the matching logs. Avoid restarting services or clearing files before collecting evidence unless required to restore service. If vCenter is in production and a partition is critically full, follow your incident-response process and involve the team responsible for the appliance.
If a Different Partition Is Full
Logs are only one possible cause of low storage. If /storage/core is full, inspect the core dumps and preserve them if a crash is being investigated. Do not treat core dumps as disposable logs. If a database-related partition is full, do not delete database files or attempt ad hoc database cleanup; use VMware documentation or support guidance specific to your version.
If the log partition is healthy but another filesystem is full, focus your investigation on that filesystem. A support bundle, backup, or application data may be consuming space. Use VAMI’s storage monitoring and appropriate VMware procedures to identify the cause before removing files.
When to Add Storage or Get Support
Cleaning eligible old logs may provide temporary relief, but it is not a substitute for adequate storage or fixing a source of excessive logging. If the appliance remains low on space after a careful cleanup, or the same partition fills again quickly, check the sizing requirements for your vCenter version and deployment. Use the supported process to increase appliance storage where appropriate, and confirm that you have a valid backup before making storage changes.
Contact VMware support if you cannot identify what is consuming space, if an important filesystem is full, if services are failing, or if you are unsure whether a file can be removed. Share the vCenter version, the affected mount point, relevant timestamps, and a support bundle if available.
Clearing Logs on Older Windows-Based vCenter Servers
Some older vCenter deployments run on Windows rather than the VCSA. Their log paths and service-management procedures differ from those of the Linux-based appliance. Do not run VCSA shell commands on a Windows server. Locate the log directories for the installed vCenter version, check the associated service documentation, and preserve required diagnostic and audit records before removing eligible archived logs.
Conclusion
To clear vCenter logs safely, start by checking which filesystem is full, then identify the specific service directory using the space. Preserve logs needed for troubleshooting or compliance, and remove only verified, rotated files that are outside your retention period. Avoid deleting active logs, database files, or core dumps, and do not use broad cleanup commands. If the space problem returns or you cannot identify its cause, investigate log growth, review appliance storage needs, or ask VMware support for guidance.
Disclaimer: Articles are written by Humans, AI or Both. Verify Important information.