WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Hardware Options
    • Hardware Reviews
    • Lab Deployment Scripts
    • Nested Virtualization
    • Homelab Podcasts
  • VMware Nostalgia
  • Apple

Log filtering capability in ESXi 6.0

05.20.2015 by William Lam // 5 Comments

When it comes to troubleshooting, something that you can never have too much of are logs! However, you can have excessive logs in the form of repeated log entries for a particular event which not only adds to the amount of logs you must sift through but it also adds unnecessary load and processing to the network. This is especially problematic if you these repeated entries also being forwarded from multiple sources to a centralized syslog server.

With earlier release of ESX (yes, classic ESX), it was possible to filter out specific log entries from the host side and prevent them from showing up in the local logs stored on the filesystem after N-occurrences and would also prevent them from being forwarded to a syslog server. However, when ESXi was first introduced, this particular capability wast not ported over which I can only assume was based on usage from our customer base. In speaking with GSS, this is usually something they require for troubleshooting purposes, although I have also seen a few customers ask about this capability on several occasions in the past.

Having said that, I was pleasantly surprised to learn from Alan Castonguay (former GSS Engineer, now working over in our MBU) that ESXi 6.0 actually now includes a new log filtering capability or rather I should say, it has re-introduced the log filtering capability 🙂

To enable log filtering, you will need to add the following parameter to /etc/vmsyslog.conf

enable_logfilters = true

To add a specific log filter, you will need to add an entry to /etc/vmware/logfilters using the following format: numLogs | ident | logRegexp

  • numLogs - Number of times the log entry can appear in the log before it is then filtered and ignored
  • ident - The ident source of the log, you can find all ident by looking in /etc/vmsyslog.conf.d/*.conf
  • logRegexp - regular expression confirming to the Python regular expression syntax

Below is an example where I only want the log entry "SOCKET connect failed, error 2: No such file or directory.*" to show up only two times in the logs before it is filter and ignored and the source of this log entry is from the hostd logs.

2| Hostd | SOCKET connect failed, error 2: No such file or directory.*

UPDATE (03/18/16): I just got a heads up from GSS that the "hostd" logs is actually case sensitive when creating the filter. You will need to use a capital "H" in case you are not seeing results from your regexp.

Once you have created all your log filters, you will need to reload the syslog service by running the following ESXCLI command:

esxcli system syslog reload

One thing to be aware of is that once a log entry has been filtered out and the local logs have been rotated out, that particular entry will no longer show up in future logs. It is definitely recommended that you use the log filtering feature sparingly and ensure that you are also forwarding your logs to a centralized syslog server like Log Insight for example so that you have all log entries at your disposal for both troubleshooting and auditing purposes. There is already a request to add this to our official VMware documentation so that it customers can easily find this in the syslog configuration section of the ESXi documentation, but for now I have documented it here so others can benefit from this capability if needed.

Categories // ESXi, vSphere 6.0 Tags // ESXi 6.0, logfilter, syslog, vSphere 6.0

Configuring per-VMDK IOPS reservations in vSphere 6.0

05.20.2015 by William Lam // 1 Comment

One of the new features in vSphere 6.0 that was quickly mentioned at the end of Duncan Epping's What's New Storage DRS blog post is the ability to configure an IOPS reservation on a per-VMDK basis which is now integrated with both Storage IO Control (SIOC) and Storage DRS. As Duncan mentioned at the end of his article, this feature is only consumable through the vSphere API and given that, it may not be a feature that is widely known or used. This topic had recently surfaced in an internal thread on how to set the IOPS reservations and below are the details if you wish to leverage this new vSphere 6.0 storage platform capability.

To be able to use this new feature, there are two requirements:

  1. You need to set the IOPS reservation value on an individual VMDK which is under the StorageIOAllocationInfo property of a VMDK called, not surprisingly, reservation.
  2. All ESXi hosts mounting the Datastore must be running vSphere 6.0

To be clear, this reservation property has been around since vSphere 5.5, but had only had support for local datastores. In vSphere 6.0, shared datastores are now supported along with both SIOC and Storage DRS being aware.

To exercise the use of this vSphere API, I have created a simple PowerCLI script called configurePerVMDKIOPS.ps1 (works with both vSphere 5.x & 6.0) which you will need to edit to include your vCenter Server, the name of the VM you wish to set the IOPS reservation along with the VMDK label and IOPS value.

Here is an example output for configuring a VM named Photon with IOPS reservations of 2000 on Hard Disk 1:

configure-per-vmdk-iops-reservations
I have been told that in the future, the plan is to make this configurable available in the vSphere Web Client. Though, honestly why would anyone want to perform this change across multiple VMs by hand, when you can quickly and efficiently automate this across your environment with a simple script? 😉

Categories // Automation, vSphere 6.0 Tags // iops reservation, PowerCLI, sioc, storage drs, storage io control, StorageIOAllocationInfo, vSphere 6.0, vSphere API

Cloud Native Apps, Containers & Docker sessions at VMworld

05.19.2015 by William Lam // Leave a Comment

I just saw a nice list of VMworld sessions that was shared internally by Ben Corrie, an Engineer working in our Cloud Native Apps team at VMware on some of the VMworld sessions related to Cloud Native Apps, Containers & Docker. I figure I would share his list with a wider audience for those interested and I have also included session proposals by both VMware Employees as well as from our partners which you can find below.

I am personally excited for session 5229 - Docker and Fargo: Exploding the Linux Container Host which will be presented by both Ben & George Hicken if it gets accepted. I was fortunate enough to catch a demo of this internal project at our R&D Innovation Offsite (RADIO) last week and I think folks will be blown away with some of the work that has been done in this area. I can not say anymore other than to vote for this session and any others that you might be interested in! If there are other sessions, please let me know and I will update the list.

I had to also thrown in a shameless plug at the very bottom of this post on three of the sessions that I have submitted for VMworld this year. Hope you find them interesting to vote for and hope to see you all at VMworld!

VMware Submitted Sessions (14)

Session # Session Title
4590 Hypervisors vs. Containers - Wait That's the Wrong Question!
4600 An Interesting Application Software Based on Docker
4725 Scalable On-Demand Cloud Native Apps with Docker and Mesos
4767 Seven Things vSphere Admins Need to Know About Photon Lightwave and Containers
4853 Docker Containers on vSphere: Performance Deep Dive
4940 CIS Benchmark Compliance for Docker - Automated with VMware
5006 Monitoring Software Containers with vRealize Operations
5121 Containers as a Service with vRealize Automation and VMware Project Photon
5229 Docker and Fargo: Exploding the Linux Container Host
5266 Docker in the Real World: Tales Round the Campfire
5343 Rapid and Continuous Delivery Through Docker Container and VMware Cloud Technologies
5409 Migration of Docker Based Applications across Clouds
5627 How Do You Manage and Monetize the Docker Deployments as Containers Not VMs to Groups in Your Organization Using Your Existing vRealize Suite?
5860 Containers without Compromise: Providing Persistent Storage for Docker Containers using vSphere

Partner Submitted Sessions (8)

Session # Session Title
4742 Understanding Databases for Distributed Containerized Applications
5078 Back to the Future: What Current Container Trends Mean for the Future of Application Deployment
5321 Building Container Infrastructure for Enterprise Applications with Docker VMware Photon and vSphere
5494 TOSCA: Containers Microservices OpenStack and Orchestrating the Whole Symphony
5520 Containers on VMware Infrastructure
5907 Taming Containerized Workloads with Photon and Tectonic
6081 Are You Prepared to Contain the Container? Understand the Security and Compliance Considerations for Application Containers
6126 Containers VMs and Microservices Walk into a Bar.....

William Lam Submitted Sessions (3)

Session # Session Title
4528 vCenter Server Appliance (VCSA) Best Practices & Tips/Tricks
5106 Content Library
5278 VC Windows to VCSA Migration Fling Deep Dive

Categories // Automation, Cloud Native, vRealize Suite, vSphere Tags // cloud native apps, container, Docker, LightWave, Photon

  • « Previous Page
  • 1
  • …
  • 354
  • 355
  • 356
  • 357
  • 358
  • …
  • 561
  • Next Page »

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Automating the vSAN Data Migration Pre-check using vSAN API 06/04/2025
  • VCF 9.0 Hardware Considerations 05/30/2025
  • VMware Flings is now available in Free Downloads of Broadcom Support Portal (BSP) 05/19/2025
  • VMUG Connect 2025 - Minimal VMware Cloud Foundation (VCF) 5.x in a Box  05/15/2025
  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...