Something that a lot of people haven’t looked in to or just don’t think about is relocating the log files of vCenter, I wrote a short article 2 years ago and thought it was time to reiterate it. By default (Windows 2003) log files are stored in “C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\Logs”, and for Windows 2008 log files are stored in “C:\ProgramData\VMware\VMware VirtualCenter\Logs”.
As you can imagine the C:\ partition is not the ideal place for storing log files. I would personally recommend to use a separate drive for logfiles so avoid it from flooding any OS or Program related drives. You could pick a small size based on the expected log size and if needed increase the amount of logs that are stored and the size of the log file.
Changing this is pretty simple. Open “vpxd.cfg” and add the following line in between <log> and </log>
<directory>D:\VMware\Logs</directory>
Changing the amount of log files stored and the size is also pretty basic, in this example vCenter will store 10 logfiles which are max 10MB each:
<maxFileSize>10485760</maxFileSize> <maxFileNum>10</maxFileNum>
Keep in mind that you will need to restart the vCenter Service after these changes before they take effect!
Jason Miles says
Thanks Duncan….Good reminder!
Wonder who sparked this one!? 🙂
Seriously, thanks for giving back to the community.
Seva says
1. vCenter (v 4.+) zips log files
2. trivia sets the log level
3. The article contradicts itself: with maxFileSize and maxFileNum we always could compute, how much space log files will require, thus they will never flood the OS disk. The idea to put log files on separate volume is bad bacause it increases complexity of vCenter configuration.
Seva says
2 I mean the tag level ( hopefully it will work now: \ )
René van Balen says
Also, don’t forget to remove any html comment lines like <!– above and –> below . I am using vCenter Server 4 update 1 and those comment lines were present by default in vpxd.log.
Duncan says
I don’t agree Seva. what’s complicated about a relocation of your logfiles to a directory which might make more sense. For a lot of enterprise customers it is internal policy to redirect all log files to a given disk.
kyle says
The vCenter install should let you change this during install or atleast through the GUI. 🙁
Seva says
Well, Duncan,
previous argument was to “avoid it from flooding any OS or Program related drives”, now we see, that the size of vCenter log files is predictable and, let’s say, finite. And now we have a nebulous “internal policy to redirect all log files to a given disk.”
I still can not understood the reason for hacking around with the goal
1) Just to confuse support specialist or PSO guy making healthcheck
2) To disrupt the work of script which prepares log file bundle for support.
3) Just to repeat it again make the design of vCenter VM more complicated by adding the new disk.
And btw. there are a lot of other log and dump files in the same directory three, what about them?
Duncan, your article is really useful, because it will really make sense to increase the size and amount of vCenter log files if you’re making verbose and trivia logging. And I WOULD advise to turn on verbose logging BEFORE you got an outage, and not AFTER it – “Dear customer, due to too low level of logging we have to increase it to verbose and wait until the outage in your datacenter will be happened for the second time” – advice I often heard from support .
Conclusion – if you would change the title of your entry to “How to increase the number and size of vCenter” logs and would explain, how to do it and how to compute the expected size of log file with recommendations that verbose logging as standard would be a good choice, that if logs will require too much space they may be moved, but there are some risks connected to it. In that case it would be really helpful entry
best regards
=Seva
Duncan Epping says
I wouldn’t want to call a default setting in a config file hacking. Like I said, many enterprise customers have the REQUIREMENT to store log files on a separate drive for several reasons. (Hey there’s a reason /var/log is a separate partition in Linux / ESX!)
but let’s agree to disagree.
Rob says
You didn’t mention where to find vpxd.cfg! I’ve searched the whole server and nothing. Thanks for any help provided.
Bilal Hashmi says
vpxd.cfg is located in C:\ProgramData\VMware\VMware VirtualCenter on a 2008 box by default.
Ron says
Can anyone confirm with certainty the following if the default log location is changed?
1. Will this have a negative impact on the script which prepares log file bundle for support?
2. Will the core “dump files” get generated in the new location as well?
Reason I ask is because I’ve discovered the auto-generation of any core dump files has a much greater chance of flooding the OS partition than the actual vpxd logs.
Rachit Srivastava says
@Duncan,
Real nice article with detailed business requirement led reasoning. Thanks for heads up !!
However I am curious about what Ron has asked here and how far is Seva correct with his observations in production environments with vCenter servers running in linked mode.
ASID says
Very interesting information! From one designer to another great sitelayout. Just the inspiration I was searching for!
Jonathan says
this is not valid for vCenter 5.1, vpxd.cfg does not have the location of the log files
and no attribute/key in Administration/vCenter Server Settings
let us know please
Jonathan says
ok my mistake 🙂
5.1 works just fine
instructions say to ADD the line ….
🙂