How to Clean VMware vCenter Logs and Fix Storage Full Issues (Step-by-Step Guide)
Introduction
If your VMware vCenter Server is running out of disk space, especially under /storage/log or /storage/archive, it can impact performance and even stop critical services. In this guide, I’ll walk you through a real-time troubleshooting approach to identify large log files and safely clean them.
Step 1: Access vCenter Appliance Shell
Login using SSH:
login as: administrator@vsphere.local
Command> shell
Switch to root:
sudo -i
Step 2: Unlock or Reset Root Account (if needed)
/usr/sbin/faillock --user root --reset
passwd
Step 3: Identify Large Log Files
Navigate to log directory:
cd /storage/log
Find top large files:
find . -type f -print0 | xargs -0 du -h | sort -rh | head -n 10
👉 Example output from your system:
1.5G log bundle
Multiple 100MB threadmonitor logs
Step 4: Remove Unnecessary Large Files
Delete large old log bundle:
rm vc-localhost-*.tgz
Re-check:
du -xh -d 1 | sort -rh
Step 5: Identify Log Growth Directories
find ./ -type d -exec sh -c 'echo -n "{}: " && find "{}" -type f | wc -l' \; | awk '$2 > 100' | sort -k2,2nr
👉 High file count directories:
/vmware/eam/vmware/vpxd/vmware/vapi
These indicate log accumulation issues.
Step 6: Check Disk Usage
df -h
Key observation from your case:
/storage/log→ 63% used/storage/archive→ 95% used (critical)
Step 7: Clean Archive Logs (Major Fix)
Navigate:
cd /storage/archive/vpostgres
Delete logs older than 30 days:
find . -mtime +30 -name "*" | xargs rm -rf
Step 8: Verify Space Recovery
df -h
✔ Result from your system:
Archive reduced from 95% → 13% usage
Conclusion
Log buildup in VMware vCenter is a common issue, especially in production environments. By regularly monitoring and cleaning old logs, you can prevent outages and maintain system stability.
Comments
Post a Comment