Wednesday, January 19, 2011

VMWARE Log Control 2/2

Last post I talked about ESX’s log retention and how to configure it using logrotate.conf
Today I want to mention that you can also control the log of your guests.

I’m not talking about the guest’s log location, which is by default on the same directory of your guest’s configuration (vmx file). You can change that when you add a host to Virtual Center, lets say you want to consolidate all log’s on the same location (LUN), but this post is not about it.
It’s about having the control of you guest’s log, just like on the host you can control the maximum size of your log and the rotation of them.

Let’s see how it works.

- First you need to power off your guest
- Right click your guest and choose “Edit Settings”
- Go to the “options” tab and under Advanced / General settings
- Click on the button “Configuration Parameters”

There will be a list of configuration parameters, if the ones you need are not listed just click “Add Row” and add them.

- On the new row, click under the Name column and specify the configuration option
- On the new row, click under the Value column and specify the configuration value




log.rotateSize is the maximum size allowed for the log file before a new one gets created. (it’s kilobytes, so 1000000 means 100kb)
log.keepOld is the amount of logs you will have before you start rewriting the olds one.

So on my example I will have a maximum of 10 logs of 100kb each.

When you are done, just power on the guest again.

Also, you can do change the vmx file directly.
Just add the following lines to the end of file
log.rotateSize = "100000"
log.keepOld = "10"

On more tip before we wrap up.
By default guest’s log name is vmware.log, if you want to change it’s name just add on more Row called log.fileName and then the name you wish for the log file.

Easy , right ?!?!?
See you

No comments:

Post a Comment

Who am I

My photo
I’m and IT specialist with over 15 years of experience, working from IT infraestructure to management products, troubleshooting and project management skills from medium to large environments. Nowadays I'm working for VMware as a Senior Consultant, helping customers to embrace the Cloud Era and make them succefully on this journay. Despite the fact I'm a VMware employee these postings reflect my own opnion and do not represents VMware's position, strategies or opinios.

Most Viewed Posts

Blog Archive