Loading

×Sorry to interrupt
CSS Error

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

Collecting diagnostic information for VMware vCenter Server and ESX/ESXi using the vSphere PowerCLI (1027932)

Last Updated: 3/20/2024Categories: How toTotal Views: 127606Language:
Chinese (Simplified)JapaneseSpanishEnglish

9 like this article

Subscribe to get an email
newsletter with new updates

9 people found this helpful Please provide article feedback:

Purpose

VMware Technical Support routinely requests diagnostic information from you when a support request is handled. This diagnostic information contains product specific logs, configuration files, and data appropriate to the situation. The information is gathered using a specific script or tool for each product and can include a host support bundle from the ESXi host and vCenter Server support bundle. Data collected in a host support bundle may be considered sensitive. Additionally, as of vSphere 6.5, support bundles can include encrypted information from an ESXi host.
For more information on what information is included in the support bundles, see Data collected when gathering diagnostic information from vSphere products (2147388).

This article provides the procedures for obtaining this diagnostic information for VMware vSphere vCenter Server and/or ESX/ESXi hosts using VMware vSphere PowerCLI.
For other methods of collecting the same information, see

Collecting diagnostic information for VMware ESX/ESXi (653) or

Collecting diagnostic information for VMware ESX/ESXi using the vm-support command (1010705).

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.

For instructions for opening a support request, see How to File a Support Request.

For instructions for uploading your support files, see Uploading diagnostic information to VMware (1008525).

For instructions for obtaining diagnostic information for other VMware products, see Collecting diagnostic information for VMware products (1008524).

Note: vSphere 6.5, support bundles can include encrypted information from an ESXi host. For more information on what information is included in the support bundles, see Data collected when gathering diagnostic information from vSphere products (2147388)

Resolution

VMware vSphere PowerCLI can be used to download a vc-support or vm-support log bundle from VMware vSphere vCenter Server and/or ESX/ESXi hosts, or to view or search the individual log files stored on the host. For more information on VMware PowerCLI, see the VMware vSphere PowerCLI Documentation.

Connecting to vCenter Server or an ESX/ESXi host with PowerCLI

To run specific vSphere PowerCLI cmdlets and perform administration or monitoring tasks, you must connect to vCenter Server or an ESX/ESXi host.

Launch the vSphere PowerCLI.

In the vSphere PowerCLI console window, establish a connection to an ESX/ESXi host or a vCenter Server using the command:

Connect-VIServer -Server HostnameOrIPAddress

You see output similar to:

Name Port User
---- ---- ----
HostnameOrIPAddress 443 Username

Note: If the certificate is not trusted, a warnings displays. Depending on your security policy, these warnings can be ignored.

Downloading a diagnostic log bundle from vCenter Server

To download a vc-support diagnostic log bundle from vCenter Server:

Enter the command:

Get-Log -Bundle -DestinationPath c:\Storage\Location\

You see output similar to:

Data
----
C:\Storage\Location\vc-support-nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn.tgz

No progress bar is provided for the command. When completed, upload the logs to the FTP site. For more information, see Uploading diagnostic information to VMware (1008525).

Download a diagnostic log bundle from an ESX/ESXi host

To download a vm-support diagnostic log bundle from an ESX/ESXi host managed by vCenter Server:

Enter the command:

Get-VMHost HostNameOrIP | Get-Log -Bundle -DestinationPath c:\Storage\Location\

You see output similar to:

Data
----
C:\Storage\Location\vm-support-nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn.tgz

No progress bar is provided for the command. When completed, upload the logs to the FTP Site. For more information, see Uploading diagnostic information to VMware (1008525).

Displaying the content of specific log files on an ESX/ESXi host

To review a specific log file on an ESX/ESXi host, use the Get-LogType and Get-Log commandlets:

Determine what log files are exposed by a given vCenter Server or ESX/ESXi host using the Get-LogType commandlet. Logs are identified by a Key name.

For the connected vCenter Server: Get-LogType

For a specific ESX/ESXi host: Get-VMHost HostNameOrIP | Get-LogType

You see output similar to:

Key Summary
---- -------
hostd Server log in 'plain' format
messages Server log in 'plain' format
vmkernel Server log in 'plain' format
vmksummary Server log in 'plain' format
vmkwarning Server log in 'plain' format
vpxa vCenter agent log in 'plain' format

View a specific log on the the given vCenter Server or ESX/ESXi host, specifying a Key from Get-LogType:

For the connected vCenter Server: Get-Log VCLogKey | Select -expand Entries | More

For a specific ESX/ESXi host: Get-VMHost HostNameOrIP | Get-Log HostLogKey | Select -expand Entries | More

For example:

Get-VMHost 10.11.12.13 | Get-Log hostd | Select -expand Entries | More

Section for VMware ESXi, pid 4993, version=4.1.0, build=build-260247, option=Release
[2009-09-17 10:41:07.886 2EB82B90 verbose 'Cimsvc'] Ticket issued for CIMOM version 1.0, user root
[2009-09-17 10:41:09.340 2EB82B90 verbose 'DvsManager'] PersistAllDvsInfo called
[2009-09-17 10:41:09.340 2E1F2B90 verbose 'DvsTracker'] FetchSwitches: added 1 items

Note: In this example, you are reviewing the hostd management agent logs. The output is displayed one page at a time. The same command can be used for other log files (for example, hostd, vpxa, vmkernel, vmksummary, and vmkwarning). The logs available may differ between versions of vCenter Server and ESX/ESXi.

To search the logs for a specific string, use the Select-String commandlet:

Get-VMHost HostNameOrIP | Get-Log LogName | Select -expand Entries | Select-String SearchTerm | More

Related Information

To simplify and expedite the log upload process, we recommend using the Log Assist feature of VMware Skyline, which (with your permission) automatically uploads log files. Skyline is available to all Production Support and Premier Services customers. To get started with Skyline, visit:  http://vmware.com/go/skyline/download.

For information about collecting and exporting logs, see:

Using vSphere Management Assistant (vMA) to collect ESX and ESXi logs (1024122)

Gathering ESX/ESXi or vCenter Server logs stored on a vSphere Management Assistant (vMA) appliance (1035911)

Collecting diagnostic information for VMware products

Uploading diagnostic information for VMware

“vm-support” command in ESX/ESXi to collect diagnostic information

Using vSphere Management Assistant (vMA) to collect ESX and ESXi logs

Gathering ESX/ESXi or vCenter Server logs stored on a vSphere Management Assistant (vMA) appliance

Data collected when gathering diagnostic information from vSphere products

Collecting diagnostic information for VMware ESX/ESXi

For Translated Versions of this Article, see:

Recopilación de información de diagnóstico para VMware vCenter Server y ESX/ESXi mediante vSphere PowerCLI

vSphere PowerCLI を使用して VMware vCenter Server および ESX/ESXi の診断情報を収集する

使用 vSphere PowerCLI 为 VMware vCenter Server 和 ESX/ESXi 收集诊断信息

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
Chinese (Simplified)JapaneseSpanishEnglish

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

Result 1 of 1

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSphere PowerCLI

VMware vSphere ESXi

VMware vSphere

VMware VirtualCenter

VMware vCenter Server

VMware ESX Server

VI Toolkit (for Windows)

Related Versions:

VMware vSphere PowerCLI 5.5

VMware vSphere PowerCLI 5.0

VMware vSphere PowerCLI 4.1

VMware vSphere PowerCLI 4.0

VMware vSphere ESXi 7.0.0

VMware vSphere ESXi 6.5

VMware vSphere ESXi 6.0

VMware vSphere ESXi 5.5

VMware vSphere ESXi 5.1

VMware vSphere ESXi 5.0

VMware VirtualCenter 2.5.x

VMware vCenter Server 6.5.x

VMware vCenter Server 6.0.x

VMware vCenter Server 5.5.x

VMware vCenter Server 5.1.x

VMware vCenter Server 5.0.x

VMware vCenter Server 4.1.x

VMware vCenter Server 4.0.x

VMware ESXi 4.1.x Installable

VMware ESXi 4.1.x Embedded

VMware ESXi 4.0.x Installable

VMware ESXi 4.0.x Embedded

VMware ESXi 3.5.x Installable

VMware ESXi 3.5.x Embedded

VMware ESX Server 3.5.x

VMware ESX 4.1.x

VMware ESX 4.0.x

VI Toolkit (for Windows) 1.5

VI Toolkit (for Windows) 1.0

view all

Take Our Survey

Support Assistant