The VMware Cloud Director (VCD) service may fail to start or crash shortly after initialization.
cell.log file located in /opt/vmware/vcloud-director/logs/ reveals that the service encounters a java.lang.OutOfMemoryError, followed by a failed heap dump due to insufficient disk space. The cell-runtime.log also includes the error message:log4j:ERROR Failed to flush writer, java.io.IOException: No space left on deviceVMware Cloud Director 10.6.0.1
The root cause was identified as storage exhaustion due to uncontrolled growth of the audit_trail table in the Cloud Director database. This table records all user and system activities, which can grow significantly in environments with integrations such as Container Service Extension (CSE) or Aria Operations.
It is mandatory to take snapshots of all VCD cells and perform a database backup before proceeding.
Reduce the current size of audit_trail table :
*************************************************************
Note: This action requires downtime on all Cloud Director cells.
Warning: A backup of the Cloud Director database must be taken before attempting to make any changes to it directly.
Take a backup of the Cloud Director database before making any changes.
Now carry out the workaround using the below steps:
Stop services on all cells:/opt/vmware/vcloud-director/bin/cell-management-tool cell -i $(service vmware-vcd pid cell) -s
Connect to the database:sudo -i -u postgres psql vcloud
Clear the audit_trail table:truncate table audit_trail;
Reclaim space and optimize the database:vacuum full;vacuum analyze;
Start the VCD service on the first cell:systemctl start vmware-vcd
Start VCD on remaining cells after the first cell is online.
*************************************************************
Configure automatic audit event cleanup: To avoid future uncontrolled growth, configure Cloud Director to retain audit logs for a limited time (e.g., 10 days):
/opt/vmware/vcloud-director/bin/cell-management-tool manage-config -n com.vmware.vcloud.audittrail.history.days -v 10