• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • Unexplored Territory Podcast
  • HA Deepdive
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

Changing the directory of your vSphere vCenter log files

Duncan Epping · Mar 10, 2010 ·

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!

Related

Server Lessons Learned, log, tips, vcenter, VMware, vSphere

Reader Interactions

Comments

  1. Jason Miles says

    10 March, 2010 at 16:29

    Thanks Duncan….Good reminder!

    Wonder who sparked this one!? 🙂

    Seriously, thanks for giving back to the community.

  2. Seva says

    11 March, 2010 at 10:08

    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.

  3. Seva says

    11 March, 2010 at 10:10

    2 I mean the tag level ( hopefully it will work now: \ )

  4. René van Balen says

    11 March, 2010 at 10:21

    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.

  5. Duncan says

    11 March, 2010 at 12:49

    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.

  6. kyle says

    13 March, 2010 at 00:36

    The vCenter install should let you change this during install or atleast through the GUI. 🙁

  7. Seva says

    13 March, 2010 at 11:35

    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

  8. Duncan Epping says

    15 March, 2010 at 15:59

    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.

  9. Rob says

    21 June, 2010 at 11:13

    You didn’t mention where to find vpxd.cfg! I’ve searched the whole server and nothing. Thanks for any help provided.

  10. Bilal Hashmi says

    10 December, 2010 at 16:54

    vpxd.cfg is located in C:\ProgramData\VMware\VMware VirtualCenter on a 2008 box by default.

  11. Ron says

    12 December, 2011 at 20:26

    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.

  12. Rachit Srivastava says

    22 December, 2011 at 18:06

    @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.

  13. ASID says

    17 January, 2012 at 01:50

    Very interesting information! From one designer to another great sitelayout. Just the inspiration I was searching for!

  14. Jonathan says

    7 February, 2013 at 21:07

    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

  15. Jonathan says

    7 February, 2013 at 23:17

    ok my mistake 🙂
    5.1 works just fine
    instructions say to ADD the line ….

    🙂

Primary Sidebar

About the Author

Duncan Epping is a Chief Technologist and Distinguished Engineering Architect at Broadcom. Besides writing on Yellow-Bricks, Duncan is the co-author of the vSAN Deep Dive and the vSphere Clustering Deep Dive book series. Duncan is also the host of the Unexplored Territory Podcast.

Follow Us

  • X
  • Spotify
  • RSS Feed
  • LinkedIn

Recommended Book(s)

Advertisements




Copyright Yellow-Bricks.com © 2025 · Log in