Deploying custom vpxa.cfg on new ESX hosts
search cancel

Deploying custom vpxa.cfg on new ESX hosts

book

Article ID: 305607

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

When adding new ESX hosts to vCenter Server, especially if using a syslog server, you might want to reduce the log verbosity of the vCenter Server Agent on your hosts.

To change the log verbosity after adding the host to vCenter Server, you have to connect to the host through SSH and modify the existing vpxa.cfg file. When connecting a new host to vCenter Server, the default vpxa.cfg is used. However, it might not suit your needs in terms of log verbosity or path.
This article provides steps to connect an ESX host to vCenter Server with a custom vpxa.log file.


Symptoms:



Environment

VMware vCenter Server 4.1.x

Resolution

The upgrade folder in your vCenter Server server installation folder contains the vpxa bundles for each version of supported ESX host. It contains also a file called bundleversion.xml, which links the ESX version to the correct bundle name.

To provide new ESX host a custom vpxa.cfg file:
  1. Build a valid vpxa.cfg file. To do so, you can use an existing host file. If http is enabled on the host, you can get it from http://HOST-IP-OR-FQDN/host.

    Alternatively, you can use SSH to copy the file from /opt/vmware/vpxa/vpxa.cfg. For more information, see Connecting to an ESX host using a SSH client (1019852).

    Note: If the vpxa.cfg file is not valid, you may not be able to connect new hosts.

  2. The file is modified by the host, most notably with a <vpxa></vpxa> block towards the end of the file. You need to remove this block.

    Here is an example that reduces the logging level to error only:

    <config>
    <httpNfc>
    <accessMode>proxyAuto</accessMode>
    <enabled>true</enabled>
    </httpNfc>
    <level id="PropertyCollector">
    <logLevel>error</logLevel>
    <logName>PropertyCollector</logName>
    </level>
    <level id="PropertyProvider">
    <logLevel>error</logLevel>
    <logName>PropertyProvider</logName>
    </level>
    <log>
    <level>error</level>
    <maxFileNum>10</maxFileNum>
    <memoryLevel>error</memoryLevel>
    <outputToConsole>false</outputToConsole>
    </log>
    <nfc>
    <loglevel>error</loglevel>
    </nfc>
    <trace>
    <mutex>
    <profiledMutexes>InvtLock</profiledMutexes>
    </mutex>
    </trace>
    <vmacore>
    <soap>
    <sessionTimeout>1440</sessionTimeout>
    </soap>
    <ssl>
    <doVersionCheck>false</doVersionCheck>
    </ssl>
    <threadPool>
    <TaskMax>10</TaskMax>
    <ThreadCheckTimeSecs>10</ThreadCheckTimeSecs>
    </threadPool>
    </vmacore>
    <vmdb>
    <enableSvc>true</enableSvc>
    </vmdb>
    <workingDir>/var/log/vmware/vpx</workingDir>
    </config>

  3. When the file is customized, place the vpxa.cfg file in the C:\Program Files\VMware\Infrastructure\vCenter Server Server\upgrade folder.

  4. The file bundleversion.xml needs to be updated so each section contains <config>vpxa.cfg</config>. Here is an example:

    <ConfigRoot> <esx>
    <vmnix-x86>
    <bundle id="6">
    <version>3.0.0+</version>
    <install>vpx-upgrade-esx-6-linux-*</install>
    <uninstall>vpx-uninstall-esx-6-linux-*</uninstall>
    <config>vpxa.cfg</config>
    </bundle>
    <bundle id="7">
    <version>3.5.0+</version>
    <install>vpx-upgrade-esx-7-linux-*</install>
    <uninstall>vpx-uninstall-esx-7-linux-*</uninstall>
    <config>vpxa.cfg</config>
    </bundle>
    <bundle id="15">
    <version>4.0+</version>
    <install>vpx-upgrade-esx-7-linux-*</install>
    <uninstall>vpx-uninstall-esx-7-linux-*</uninstall>
    <config>vpxa.cfg</config>
    </bundle>
    <bundle id="8">
    <version>e.x.p</version>
    <install>vpx-upgrade-esx-7-linux-*</install>
    <uninstall>vpx-uninstall-esx-7-linux-*</uninstall>
    <config>vpxa.cfg</config>
    </bundle>
    </vmnix-x86>
    </esx>
    <embeddedEsx>
    <vmnix-x86>
    <bundle id="13">
    <version>3.5.0+</version>
    <install>vpx-upgrade-eesx-1-linux-*</install>
    <uninstall>vpx-uninstall-eesx-1-linux-*</uninstall>
    <config>vpxa.cfg</config>
    </bundle>
    <bundle id="16">
    <version>4.0+</version>
    <install>vpx-upgrade-eesx-1-linux-*</install>
    <uninstall>vpx-uninstall-eesx-1-linux-*</uninstall>
    <config>vpxa.cfg</config>
    </bundle>
    <bundle id="14">
    <version>e.x.p</version>
    <install>vpx-upgrade-eesx-1-linux-*</install>
    <uninstall>vpx-uninstall-eesx-1-linux-*</uninstall>
    <config>vpxa.cfg</config>
    </bundle>
    </vmnix-x86>
    </embeddedEsx>
    </ConfigRoot>

  5. As the xml code is loaded on startup, restart the VMware VirtualCenter Server service . For more information, see Stopping, starting, or restarting vCenter services (1003895).

    Now any host added to vCenter Server will use the customized vpxa.cfg file.


Additional Information

How to stop, start, or restart vCenter Server services
Connecting to an ESX host using an SSH client