What's wrong with my VM?
I recently gave a few talks at Delphix about tools to help debug common problems in virtual machines running on VMware ESX. A coworker thought that some of the content would be generally useful and encouraged (nagged) me to write a blog post. This is my attempt to capture some of the common questions that seem to come up and provide some insight into a few useful tools.
Disclaimer 1: "What's a UI?"
The bulk of the logs and tools I will describe can only be accessed by logging into the ESX host directly. While some of the information may be available via the vSphere Client I'm not going to cover it.
Disclaimer 2: "Compatibility?"
VMware does not claim to maintain compatibility for a number of these tools; the syntax and behavior changes from version to version. I have tested all of the following examples on vSphere 5.1.0 (build-799733). The bulk of these commands and logs (modulo vprobes) have existed in some form since ESX 4.0, but your mileage may vary. Disclaimer 3: "Highway to the danger zone!" The information presented here is in no way condoned by VMware, use at your own risk! Enabling ssh to the ESX host: Before you can do anything you first need to configure your ESX host to accept ssh connections. On console this can be done by pressing F2 and selecting Trouble Shooting and enabling ESXi Shell and SSH access. There is a knowledge base article that goes into more detail. Now that you can login to your ESX host you're ready to start debugging! Questions and Answers My plan is to (eventually) is to cover all of the following topics How can I see the mapping between datastores and devices? How can I figure out the set of LUNs that a given VM is using? How can I see all of the devices available on my ESX host? How can I check to see if ESX is having issues accessing the back-end storage? How can I take a packet trace of data flowing in and out of the ESX host? How can I take a packet trace for a specific VM? How can I take a packet trace for a virtual disk? How I do send my VM an NMI? What do I do if my VM isn't responding to an NMI? Is there an easy way to see what code the VM is executing? but I figured I'd start with the most common question I hear: Why is my VM so slow?