Skip to content

VMware ESXi SCSI Sense Code Decoder

SCSI errors or warnings in ESXi are displayed with 6 status codes. This page converts these sense codes from ESXi Hosts to human readable status information. In the vmkernel.log system log file from an ESXi 5.x or 6.0 hosts, you see entries similar to the following. Enter the colored numbers to the form and press Submit:

ScsiDeviceIO: [...] Cmd 0x1a [...] to dev "naa.x" failed H:0x0 D:0x2 P:0x0 Valid sense data: 0x5 0x24 0x0.

H:0x   D:0x   P:0x    Sense data: 0x   0x   0x
(Optional: Cmd 0x )
      


TypeCodeNameDescription
Host Status[0x0]OKThis status is returned when there is no error on the host side. This is when you will see if there is a status for a Device or Plugin. It is also when you will see Valid sense data instead of Possible sense Data.
Device Status[0x2]CHECK_CONDITIONThis status is returned when a command fails for a specific reason. When a CHECK CONDITION is received, the ESX storage stack will send out a SCSI command 0x3 (REQUEST SENSE) in order to get the SCSI sense data (Sense Key, Additional Sense Code, ASC Qualifier, and other bits). The sense data is listed after Valid sense data in the order of Sense Key, Additional Sense Code, and ASC Qualifier.
Plugin Status[0x0]GOODNo error. (ESXi 5.x / 6.x only)
Sense Key[0x5]ILLEGAL REQUEST
Additional Sense Data24/00INVALID FIELD IN CDB


58 thoughts on “VMware ESXi SCSI Sense Code Decoder”

  1. Pingback: New Tool: Decoder for ESXi SCSI Sense Codes | Virten.net

  2. Excellent Tool, if we can get some information about how communication happens from ESXi host to Storage from logs that would be great, what command ESXi sends to Storage first and then what commands will be running on ESXi host when I/O is happening would be great.

    1. Do you have Logs that you want to understand? If yes, feel free to provide.
      You do not see each SCSI command in the log. This would be way to much. There are physical appliances in the market that you can put between your server and the storage array to capture all traffic. But these appliances are very rare and require very deep protocol knowledge.

      From the ESXi log you usually only see datastore heartbeat and failed commands.

  3. Love this tool! I use the heck out of it, If you ever get the chance to add a 'clear all fields' button that would be great, it would allow batch work to be done quicker, Thanks for the great tool!

      1. Thank you! Very nice! Is there a way to enter the CMD into the virten2 strings? I love the full line entry but still flip between the two for the Command output.

        1. Sure. You should be able to add full vmkernel.log lines now. Example:

          2018-02-27T11:51:31.001Z cpu3:65559)ScsiDeviceIO: 2948: Cmd(0x439500ac0f80) 0x1a, CmdSN 0x197347 from world 0 to dev "mpx.vmhba32:C0:T0:L0" failed H:0x0 D:0x2 P:0x0 Valid sense data: 0x5 0x24 0x0.

          http://www.virten.net/vmware/vmware-esxi-scsi-sense-code-decoder-v2/?scsiCode=2018-02-27T11%3A51%3A31.001Z+cpu3%3A65559%29ScsiDeviceIO%3A+2948%3A+Cmd%280x439500ac0f80%29+0x1a%2C+CmdSN+0x197347+from+world+0+to+dev+%22mpx.vmhba32%3AC0%3AT0%3AL0%22+failed+H%3A0x0+D%3A0x2+P%3A0x0+Valid+sense+data%3A+0x5+0x24+0x0.

          Please let me know if there are any issues.

    1. I ignore all sense code messages by default but watch them when I know that there is an issue. It's usually specific to a single platform, so not generally speaking. When you have storage issues, the sense code might help you when looking for the root cause. When you have a storage issue (for example a disconnected datastore) you will be noticed anyway.

      1. Actually you can get all the SCSI Spec (more or less) Op codes from the 'source'

        SCSI Common Codes & Values
        https://www.t10.org/lists/1spc-lst.htm
        The following are listed in either txt of html format:

        Status Codes
        Sense Keys
        Additional Sense Data Information
        Op Codes - Command Operation Codes Information
        Vendor IDs - Vendor ID Strings

        I use these references all the time in my day-to-day work (I work with software defined SCSI Block Storage). Also if you want iSCSI related code this won't hurt

        https://www.iana.org/assignments/iscsi-parameters/iscsi-parameters.xhtml#iscsi-parameters-5

        Hope this is useful

Leave a Reply

Your email address will not be published. Required fields are marked *