This Blog is to share our knowledge and expertise on Linux System Administration and VMware Administration

Wednesday, February 17, 2016

Collecting diagnostic information using the vm-support command in VMware ESX/ESXi

Purpose

VMware Technical Support routinely requests the diagnostic information from you when a support request is addressed. This diagnostic information contains product specific logs and configuration files from the host on which the product is running. This information is gathered using a specific script or tool within the product.

This article provides procedures for obtaining diagnostic information for a VMware ESXi/ESX host using the vm-support command line utility.
The diagnostic information obtained by using this article is uploaded to VMware Technical Support. To uniquely identify your information, use the Support Request (SR) number you receive when you create the new SR.

Resolution

The command-line vm-support utility is present on all versions of VMware ESXi/ESX, though some of the options available with the utility differ among versions.

Running vm-support in a console session on ESXi/ESX hosts

The traditional way of using the vm-support command-line utility produces a gzipped tarball (.tgz file) locally on the host. The resulting file can be copied off the host using FTP, SCP, or another method.

    Open a console to the ESX or ESXi host.
    Run the command:

    vm-support

    Note: Additional options can be specified to customize the log bundle collection. Use the vm-support -h command for a list of options available on a given version of ESXi/ESX.
    A compressed bundle of logs is produced and stored in a file with a .tgz extension in one of these locations:


        /var/tmp/
        /var/log/
        The current working directory
        To export the log bundle to a shared vmfs datastore, use this command:

        vm-support -f -w /vmfs/volumes/DATASTORE_NAME

    Note: The -f option is not available in ESXi 5.x, ESXi/ESX 4.1 Update 3, and later.
    The log bundle is collected and downloaded to a client, upload the logs to the SFTP/FTP site.

Streaming vm-support output from an ESXi 5.x and 6.0 host

Starting with ESXi 5.0, the vm-support command-line utility supports streaming content to the standard output. This allows to send the content over an SSH connection without saving anything locally on the ESXi host.

    Enable SSH access to the ESXi shell.
    Using a Linux or Posix client, such as the vSphere Management Assistant appliance, log in to the ESXi host and run the vm-support command with the streaming option enabled, specifying a new local file. A compressed bundle of logs is produced on the client at the specified location. For example:

    ssh root@ESXHostnameOrIPAddress vm-support -s > vm-support-Hostname.tgz

    Note: This requires you to enter a password for the root account, and cannot be used with lockdown mode.
    You can also direct the support log bundle to a desired datastore location using the same command (mentioning the destination path). For example:

    ssh root@ESXHostnameOrIPAddress 'vm-support -s > /vmfs/volumes/datastorexxx/vm-support-Hostname.tgz'
    After the log bundle has been collected and downloaded to a client, upload the logs to the SFTP/FTP site.

HTTP-based download of vm-support output from an ESXi 5.x and 6.0 host

Starting with ESXi 5.0, the vm-support command-line utility can be invoked via HTTP. This allows you to download content using a web browser or a command line tool like wget or curl.

 Using any HTTP client, download the resource from:

 https://ESXHostnameOrIPAddress/cgi-bin/vm-support.cgi
 For example, download the resource using the wget utility on a Linux or other Posix client, such as the vSphere Management Assistant appliance. A compressed bundle of logs is produced on the client at the specified location:

    wget https://10.11.12.13/cgi-bin/vm-support.cgi
    After the log bundle is collected and downloaded to a client, upload the logs to the SFTP/FTP site.

No comments:

Post a Comment