Changing VMware vCenter Logging on Windows Server 2008

I’ve had occasion, over the last 24 hours, to change the logging level of my vCenter server. It’s been a little more crashy than usual, and I’ve discovered that a number of KB articles are not updated for vSphere 4.0 Update 2 or Windows Server 2008.

If you want to change the log retention policies, you can follow most of the instructions in KB 1004795 but there are two things I think you should know if you’re running on Windows 2008:

1. Your vpxd.cfg file and your logs are actually in:

C:ProgramDataVMwareVMware VirtualCenter

2. The XML stanza for the logging is commented out in 4.0 Update 2, so remove the <!– and –> lines to make it work. For example, make:

...
  <logName>CpuFeatures</logName>
 </level>
 <!--
 <log>
   <maxFileNum>10</maxFileNum>
   <compressOnRoll>false</compressOnRoll>
   <level>info</level>
 </log>
 -->
 <vpxd>
    <das>
...

into:

...
   <logName>CpuFeatures</logName>
 </level>
 <log>
   <maxFileNum>100</maxFileNum>
   <compressOnRoll>true</compressOnRoll>
   <level>info</level>
 </log>
 <vpxd>
    <das>
...

You may also want to change the compressOnRoll to ‘true’ as I did above if you are concerned about disk space usage.

This may seem obvious to a lot of people, but for those that only occasionally make changes to vpxd.cfg it helps to have been pre-warned about the differences. At least you’ll vaguely remember that something’s changed… 🙂