Author
Published
27 Feb 2024Form Number
LP1895PDF size
14 pages, 923 KBAbstract
VMware Technical Support routinely requests diagnostic information from you when a support request is handled. The diagnostic information contains product-specific logs, configuration files, and data appropriate to the situation. The information is gathered with specific scripts and tools and can include a host support bundle from the ESXi host and vCenter Server support bundle.
This paper provides procedures for obtaining diagnostic information for a VMware vCenter and ESXi host using the command line utility, vSphere Web client, and vSphere PowerCLI. The paper introduces the VMware Skyline Health Diagnostic tool to analyze log bundles and suggest the VMware KnowledgeBase entry to remediate the issue.
Introduction
This paper describes two scripts, vm-support and vc-support, and the VMware Skyline Diagnostic Tool.
The vm-support is a useful tool provided by VMware to gather diagnostics information, troubleshoot issues, and understand the setup from the support side. vm-support is a simple script which gathers required logs from various files, core-dump if present, and information on the state of the virtual machines. The vc-support is a tool to collect vCenter based OS logs.
The vm-support works using two steps:
- Collect the diagnostic logs from various locations. The support tool will collect logs from different components like vmkernel, host, CIM, virtual machines, security, vpxa, cronjobs, dmesg, update logs and many other diagnostic logs which are helpful to clarify the state of the system.
- Collect configuration information of the NICs, switches, storage adapters, NAS mounts, multi-path setup, and many other details. To obtain such data, the vm-support tool triggers a list of commands which obtain the required results and stores them in the respective file under the vm-support bundle.
VMware Skyline Health Diagnostics for vSphere is a self-service tool to detect issues using log bundles and suggest the KB remediating the issue in the vSphere and vSAN product line. vSphere administrators can use this tool for troubleshooting issue before contacting VMware Support.
Collecting logs from the command line
To collect vm-support logs from a command line interface, do the following:
- Connect and login to VMware Host via ssh or open shell console from DCUI.
- To gather logs using vm-support, and export the log bundle to a shared vmfs datastore, use the following command
vm-support -w /vmfs/volumes/DATASTORE_NAME
The output from the command is shown in the following figure:
- Confirm that log bundle is created with tgz extension.
- Copy the result file using scp or sftp. Send the logs to Lenovo Support if they're handing a support case.
To collect vc-support logs from a command line interface, do the following:
- Login to SSH to vCenter Server Appliance as root.
- Enter the following commands to export the logs to /storage/log/:
shell.set --enabled true shell vc-support -l
- Confirm that log bundle is created with tgz extension.
- Copy the result file using scp or sftp. Send the logs to Lenovo Support if they're handing a support case.
Collecting logs using the vSphere Web Client
To gather vm-support and vc-support using vSphere Web Client, do the following:
- In a browser, enter the URL or IP address of the web client and logon into a web client.
- In the Hosts and Clusters view, Select the ESXi hosts which you want to export logs.
- Perform one of the followings:
- Right-click the vCenter Server object and click Export System Logs.
- Click Actions and click Export System Logs.
- Select the ESXi hosts for which you want to export logs.
- Optionally, to collect diagnostic data for the vCenter Server itself, select the Include vCenter Server and vSphere UI Client logs option.
- Click Next.
- Optionally, select Gather performance data to include performance data information in the log files. This is optional and should only be selected if performance data is needed.
- Click the Export Logs button to save the bundle to your local computer.
Collecting logs using vSphere PowerCLI
To gather vc-support logs using vSphere PowerCLI, do the following:
- Launch Windows PowerShell.
- Install vSphere PowerCLI with command:
Install-Module VMware.PowerCLI -Scope CurrentUser
- Connect to vCenter with the following command
Connect-VIServer -Server HostnameOrIPAddress
You will see an output similar to the image below:
- Download log with command
Get-Log -Bundle -DestinationPath c:\temp\
You see output similar to:
To gather vm-support logs using vSphere PowerCLI, do the following:
- Launch Windows PowerShell
- Install vSphere PowerCLI with command
Install-Module VMware.PowerCLI -Scope CurrentUser
- Connect to VMware host with command
Connect-VIServer -Server HostnameOrIPAddress
You see output similar to:
- Download log with command
Get-VMHost HostNameOrIP | Get-Log -Bundle -DestinationPath c:\tmp\
You see output similar to:
VMware Skyline Health Diagnostic tool
To deploy VMware Skyline Health Diagnostics using the OVA image, follow these steps:
- Download the ova image for VMware Skyline Health Diagnostic from the following VMware web page:
https://customerconnect.vmware.com/downloads/get-download?downloadGroup=SKYLINE_HD_VSPHERE - Deploy the ova on ESXi and on the following Additional Settings page, configuring the following settings. This additional settings page is the customize setting items in the OVA deploy for Skyline Health Diagnostic tool to configure passwords for root of VM and SHD-admin web portal and configure network settings. It depends on the network infrastructure of user’s environment. The table below describes the required settings.
Figure 12. Additional Settings page - On the Ready to complete page, click Finish, and wait for the completion of the task.
- Power on the new VM. The OS boots up and login as root with your password that you set in previous step.
- If you can’t start the nginx service because you get a crt file missing error, use following commands to create crt:
cd /opt/vmware-shd/vmware-shd/conf/ssl/ openssl req -new -x509 -nodes -sha256 -days 365 -key rui.key -out rui.cert
Using VMware Skyline
There are two ways to analyze diagnostic logs using the VMware Skyline Health Diagnostic tool:
- Direct connection
- Offline bundle
Direct connection:
- Login SHD web.
- Click Analyze
- Click New Analysis
- Select the Product and select diagnostics item.
- Input the target FQDN or IP address, and the password, and click Connect.
- Click Run to collect the download the log.
Offline bundle log:
- Login SHD web.
- Click Analyze
- Click Log bundle analysis
- Select the local file or remote file.
- Click Next for Profile page.
- Click Run to upload log and validation log.
- After the task is completed, click Show Reports on the top menu. The issues and suggested KB show on the Detail list. You can then click the link to check the details on the VMware website.
Log files
The following table lists the important log files in VMware ESXi, along with location of the log and its purpose. These files are logs which are collected by vm-support.
Resources
For additional information, see these resources:
- Collecting diagnostic information for VMware vCenter Server 4.x, 5.x, 6.x and 7.0
https://kb.vmware.com/s/article/2032892 - How to collect the diagnostic Information from ESXi hosts using the vm-support command.
https://support.lenovo.com/us/en/solutions/ht509801-how-to-collect-the-diagnostic-information-from-esxi-hosts-using-the-vm-support-command - VMware Skyline Health Diagnostics Guide and OVA download page
https://customerconnect.vmware.com/downloads/get-download?downloadGroup=SKYLINE_HD_VSPHERE - VMware Document for VMware Skyline Health Diagnostics Tool
https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-monitoring-performance/GUID-D9DDF7B6-1F44-4F0F-BFE7-0DBCAF2F8CA5.html
Author
David Hsia is an OS Engineer in the Lenovo Infrastructure Solutions Group, based in Taipei, Taiwan. As a specialist in Linux and VMware technical support, he is interested in operating system and focuses on VMware vSphere and ESXi.
Thanks to the following specialists for their contributions and suggestions:
- Chengcheng Peng, Lenovo VMware Engineer
- Alpus Chen, Lenovo VMware Engineer
- Chia-Yu Chu, Lenovo VMware Engineer
- Gary Cudak, Lenovo OS Architect
- David Watts, Lenovo Press
Trademarks
Lenovo and the Lenovo logo are trademarks or registered trademarks of Lenovo in the United States, other countries, or both. A current list of Lenovo trademarks is available on the Web at https://www.lenovo.com/us/en/legal/copytrade/.
The following terms are trademarks of Lenovo in the United States, other countries, or both:
Lenovo®
The following terms are trademarks of other companies:
PowerShell, Windows PowerShell®, and Windows® are trademarks of Microsoft Corporation in the United States, other countries, or both.
Other company, product, or service names may be trademarks or service marks of others.
Configure and Buy
Full Change History
Course Detail
Employees Only Content
The content in this document with a is only visible to employees who are logged in. Logon using your Lenovo ITcode and password via Lenovo single-signon (SSO).
The author of the document has determined that this content is classified as Lenovo Internal and should not be normally be made available to people who are not employees or contractors. This includes partners, customers, and competitors. The reasons may vary and you should reach out to the authors of the document for clarification, if needed. Be cautious about sharing this content with others as it may contain sensitive information.
Any visitor to the Lenovo Press web site who is not logged on will not be able to see this employee-only content. This content is excluded from search engine indexes and will not appear in any search results.
For all users, including logged-in employees, this employee-only content does not appear in the PDF version of this document.
This functionality is cookie based. The web site will normally remember your login state between browser sessions, however, if you clear cookies at the end of a session or work in an Incognito/Private browser window, then you will need to log in each time.
If you have any questions about this feature of the Lenovo Press web, please email David Watts at dwatts@lenovo.com.