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 R2C:\ProgramData\VMware\VMware VirtualCenter\

Change procedure:

  1. Stop vCenter server service
  2. backup vpxd.cfg configuration file – just in case of problems you can quickly recover from
  3. Edit vpxd.cfg and find log section <log>
  4. provide path to new log location between<directory>log_location</directory>
  5. 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]

vCener logging options

vCener logging options

Description of  <log> section parameters in vpxd.cfg config file.

  1. <CompressOnRoll> – default is true – specifies if log files will be compressed after roll out
  2. <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.
  3. <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
  4. <maxFileSize> – maximum single log file size – default is 512MB – after that log file is rolled out and compressed
  5. <memoryLevel> – debugging memory level – default is verbose – change it if you need to know what is happening in memory space when vpxd service run