Fault: Internal error
Failed to set global syslog configuration : The audit record storage directory '/vmfs/volumes/<UUID>/systemlogs/Audit' is invalid.
vmodl.fault.SystemError(reason = "Internal error")
VMware vSphere ESXi
By default, Audit Logging stores files in the /scratch/auditLog directory.
If Audit Logging is enabled without explicitly defining a datastore path, /scratch/auditLog is automatically used.
Changing the directory directly from the vCenter Server UI fails because:
The /scratch/auditLog directory is actively in use.
A new directory path cannot be applied while Audit Logging is enabled.
The target folder must not exist before enabling Audit Logging, as the ESXi system auto-creates it.
esxcli system auditrecords local disable
rm -rf /scratch/auditLog/
esxcli system auditrecords local set --directory /vmfs/volumes/<Datastore-UUID>/systemlogs/Audit
esxcli system auditrecords local enable
esxcli system auditrecords get
[root@esxi01:~] esxcli system auditrecords get
Audit Record Storage Active: true
Audit Record Storage Directory: /vmfs/volumes/<Datastore-UUID>/systemlogs/Audit