Change vCenter server logs location
In vCenter server installed on Windows 2008 default location for its logs is in:
C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\Logs
However you can easily change it to different location. Reason for change might differ per case however I use to change it in order to avoid C drive being filled out by vCenter logs – it had happened several times on different customers or forced by security policy where logs must be stored outside vCenter server on syslog server.
vpxd.cfg configuration file default locations
- Windows Server 2003 – C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\
- Windows Server 2008/Windows Server 2008 R2 – C:\ProgramData\VMware\VMware VirtualCenter\
- Stop vCenter server service
- backup vpxd.cfg configuration file – just in case of problems you can quickly recover from
- Edit vpxd.cfg and find log section <log>
- provide path to new log location between<directory>log_location</directory>
- Start vCenter services
In <log> section there are few more parameters which can be used to change default vCenter server log settings.
[box type=”info”] NOTE: vCenter logging level parameter can be change by vSphere client or vSphere Web client and does not require vCenter services restart[/box]
Description of <log> section parameters in vpxd.cfg config file.
- <CompressOnRoll> – default is true – specifies if log files will be compressed after roll out
- <Level> – logging level – default is Information – specifies what is logged into log files. You might want to change it to trivia for specific reason such as vCenter server or third party application troubleshooting.
In trivia mode everything is gets logged into logs files and files are growing very fast, depends on size of the infrastructure it might be even 1GB of data per hour or more. when you increasing logging level (to get more granular information) make sure you set correctly <maxFileNum> and <MaxFileSize> to avoid situation when after few hours already logged information in logs will be overwritten by new file logs.
- <maxFileNum> – maximum number of files – default is 30 – specifies max number of log files (called log rotation in Linux systems), when is reached – the oldest log file is deleted and replaced by newer rolled out file
- <maxFileSize> – maximum single log file size – default is 512MB – after that log file is rolled out and compressed
- <memoryLevel> – debugging memory level – default is verbose – change it if you need to know what is happening in memory space when vpxd service run