5 Different ways to check ESXi or vCenter logs

Share

5 Different ways to check ESXi or vCenter logs

When anything happens to your vsphere the first thing you check is logs or even if you raise the ticket with a vendor they ask for logs.

So in this article, I will show you different ways to check or fetch the logs.

via the ESXi HTML 5 Host Client

You can look at log files in a web browser using the ESXi HTML5 Host Client. This is a good way to do it for small setups that don’t have a special server for logs.

To do this, open your web browser and go to this address:

https://ip_of_esxi/ui

Then, click on “Monitor,” and then the “Logs” tab. You can choose the logs you want to see. You’ll get a window where you can pick a log file and see what’s in it in the lower part. You can also create a support bundle for VMware to help with troubleshooting.

You can also make a new window to see the log files in a bigger view, not just the lower part. And there’s a search feature to find specific log entries easily.

Or you can simply follow the below steps :

  • ┬áLogin to Host
  • Right-click on Host
  • Click on Generate Support Bundle

Login Host

via Web Browser

You can also see the logs using a web browser without using the HTML5 client. Here’s how: Go to this web address:

https://ip_of_esxi/host

A webpage will open with links to your log files. You can click on a log file to view it in your web browser and use the browser’s search tool. Or you can download the log file to look at it in a different program.

Logs through Web browser.

via Putty

Connect to your ESXi host using SSH. You can use an SSH client like PuTTY to do this.

Once connected, run the following command to create a support bundle, which includes the logs:

vm-support

Putty Console.

This command will generate a support bundle file, typically with a .tgz or .tar.gz extension. The file will contain various logs and diagnostic information.

Putty Console

You can download this support bundle file to your local computer using an SCP (Secure Copy Protocol) client or an SFTP (SSH File Transfer Protocol) client. For example, you can use a tool like WinSCP or FileZilla if you are on a Windows machine.

Locate the downloaded support bundle file on your computer, and you can analyze its contents to troubleshoot any issues.

Remember to handle support bundle files securely as they may contain sensitive information about your ESXi host and virtual machines.

via WinSCP

Through WinSCP we can also copy the desired logs and to achieve this we have to follow below process :

Install WinSCP: Start by downloading and installing WinSCP on your local computer. You can obtain the software from the official WinSCP website and follow the installation instructions.

Enable SSH on ESXi: Ensure that SSH (Secure Shell) is enabled on your ESXi host. You can enable it through the ESXi host’s web interface or the ESXi Shell directly on the host.

Launch WinSCP: Open WinSCP on your local computer.

Configure WinSCP: When the WinSCP login window appears, set up your connection:

Hostname: Enter the IP address or hostname of your ESXi host.
Port Number: Use the default SSH port, which is 22.
Username: Input the username for your ESXi host, typically “root.”
Password: Provide the password for the ESXi host’s root user.
File Protocol: Select “SFTP” (SSH File Transfer Protocol).
Click the “Login” button to proceed.

Connect to ESXi: WinSCP will establish a connection to your ESXi host using the SSH protocol. You might encounter a security alert during the initial connection; accept it to proceed.

Navigate to Logs: Once connected, you’ll see your local file system on the left side and the ESXi host’s file system on the right side. Navigate to the folder on the ESXi host where the log files are located, which can often be found at /var/log or /scratch/log.

Copy Logs: Select the log files you wish to transfer from the ESXi host’s file system. Then, drag and drop them into the location on your local computer where you want to store them. Alternatively, you can use WinSCP’s built-in copy-and-paste functions for the transfer.

Wait for Transfer: The log files will be copied from the ESXi host to your local computer. The time it takes to complete the transfer may vary depending on the file sizes and your network speed.

Analyze Logs: Once the files are successfully copied, you can open and analyze them using log analysis tools or text editors on your local computer.

Disconnect: After you have finished, ensure you disconnect from the ESXi host by closing the WinSCP session.

These are the steps for copying logs from an ESXi host to your local computer using WinSCP.

via DCUI

To view logs from the ESXi DCUI (Direct Console User Interface), follow these steps:

Accessing and Reviewing Logs Using ESXi DCUI:

  1. Access the ESXi DCUI: To begin, log in to your ESXi host using the DCUI interface. You can access the DCUI if you have physical access to the server, or you can enable SSH for remote access if required.
  2. Navigate to ‘View System Logs’: Within the DCUI main menu, look for an option like “View System Logs” or a similar choice for accessing logs. The exact wording may vary depending on your ESXi version.DCUI console
  3. Select the Type of Logs: In the “View System Logs” menu, you’ll typically find various log types, such as “VMkernel,” “Host,” and “VirtualCenter.” Choose the log type that matches your specific needs. For general system logs and troubleshooting, “VMkernel” logs are usually the most informative.
  4. Scroll Through the Logs: Once you’ve chosen a log type, you can scroll through the log entries for examination. Keep in mind that the DCUI interface may display only a limited number of entries at a time, so you might need to navigate through multiple pages if there are numerous log entries.
  5. Exit the Log Viewer: When you’ve completed your log review, you can exit the log viewer or return to the main DCUI menu.
  6. Analysis and Troubleshooting: Utilize the information contained in the logs for analyzing issues, troubleshooting problems, and monitoring the overall performance and health of your ESXi host.

It’s worth noting that the DCUI is a fundamental tool for local ESXi host management. However, there are so many other methods that help you to configure or download logs but we cover very easy methods. For more advanced log analysis and long-term log storage, consider implementing remote logging and log management solutions. These tools can centralize logs, make them easily searchable, and provide additional features for log analysis and troubleshooting.

By following these steps, you can effectively access and review logs using the ESXi DCUI interface on your ESXi host.

I think this article could be useful for beginners and interviews. If you find it helpful, please share it with your friends on social media. Also, if you have any ideas or thoughts, feel free to leave a comment for us. Your feedback is valuable to us.

VMware Mastery

Hi, I've been working with Windows, VMware and Cloud technologies for more than 12 years. I love delving into the exciting realm of technology and enjoy sharing my knowledge with others. I write about IT and Technology, covering both technical and non-technical topics.

Leave a Reply