Skip to main content

KBA1123 How to determine VMDK - SCSI controller and target mapping in ESXCLI for Delphix VMs (Masking, Reporting, or Virtualization)



Applicable Delphix Versions


Major Release

All Sub Releases

All All


The majority of VMware administrative tasks are completed through vSphere desktop or web client. However it is sometimes required to determine current device configuration via ESXCLI. This document reviews the methodology for determining disk mapping using ESXCLI, for the purposes of Delphix troubleshooting.  For example, determining the SCSI virtual controller and target ID configured for a given storage device, to correlate with what the VM has detected or configured.

This document is not intended to replace VMware references, and a VMware admin or VMware Support should be consulted if the output collected does not match the formats discussed here.

The examples below will be referencing a Delphix Reporting VM (formerly known as Mission Control), but the process is identical for all Delphix platforms and versions released.


In this example, we will examine a virtual machine with the following configuration:

- 1x Delphix Reporting VM, with default OVA deployment (1 root disk).

- 2x additional SCSI disks added, 2GB and 3GB.


1. Determine the VM world ID using vim-cmd vmsvc/getallvms | grep <VM name>.  The left-most column provides the world ID.  For this example, we are looking for VM named "seanmc", which is indicated by world ID 33778.

[root@delong:~] vim-cmd vmsvc/getallvms | grep sean
Skipping invalid VM '28866'
Skipping invalid VM '32605'
33544   sean5220                         [zfs_sean5220] dlpx-                                         solaris10_64Guest       vmx-08    Delphix Engine Version, VM Hardware Version 8
33778   seanmc                           [zfs_seanmc] delphix-reporting-                                           centos64Guest           vmx-07              

2. With the relevant world ID, list all configured devices with vim-cmd vmsvc/device.getdevices <world id>.  The resulting output will be multiple pages long depending on the configuration and the sections of concern have the following headings:


As the titles suggest these sections of output provide the detail for each virtual SCSI controller and virtual disk respectively.  The relevant information can be obtained from the output of vim-cmd for a more concise display using grep. The following command details this (assuming world ID retrieved in step 1):

vim-cmd vmsvc/device.getdevices 33778 | egrep '(vim.vm.device.VirtualLsiLogicController|key|label|vim.vm.device.VirtualDisk|fileName|datastore|controllerKey|unitNumber|capacityInKB|uuid)'

Although additional device output beyond the SCSI controller and disk(s) will be returned, this will provide a summarized view of the current device mappings, extracted below:   

      (vim.vm.device.VirtualLsiLogicController) {
         key = 1000, 
            label = "SCSI controller 0", 
         controllerKey = 100, 
         unitNumber = 3, 
      (vim.vm.device.VirtualLsiLogicController) {
         key = 1001, 
            label = "SCSI controller 1", 
         controllerKey = 100, 
         unitNumber = 4, 
         key = 3002, 
            label = "CD/DVD drive 1", 
         controllerKey = 201, 
         unitNumber = 0
      (vim.vm.device.VirtualDisk) {
         key = 2000, 
            label = "Hard disk 1", 
         backing = (vim.vm.device.VirtualDisk.FlatVer2BackingInfo) {
            fileName = "[zfs_seanmc] delphix-reporting-", 
            datastore = 'vim.Datastore:', 
            uuid = "6000C298-0c98-ea0a-0c86-565befc31fcd", 
            parent = (vim.vm.device.VirtualDisk.FlatVer2BackingInfo) null, 
         controllerKey = 1000, 
         unitNumber = 0, 
         capacityInKB = 52428800, 
         vFlashCacheConfigInfo = (vim.vm.device.VirtualDisk.VFlashCacheConfigInfo) null, 
      (vim.vm.device.VirtualDisk) {
         key = 2016, 
            label = "Hard disk 2", 
         backing = (vim.vm.device.VirtualDisk.FlatVer2BackingInfo) {
            fileName = "[zfs_seanmc] delphix-reporting-", 
            datastore = 'vim.Datastore:', 
            uuid = "6000C295-e11e-25b0-9add-590b91edad26", 
            parent = (vim.vm.device.VirtualDisk.FlatVer2BackingInfo) null, 
         controllerKey = 1001, 
         unitNumber = 0, 
         capacityInKB = 2097152, 
         vFlashCacheConfigInfo = (vim.vm.device.VirtualDisk.VFlashCacheConfigInfo) null, 
      (vim.vm.device.VirtualDisk) {
         key = 2017, 
            label = "Hard disk 3", 
         backing = (vim.vm.device.VirtualDisk.FlatVer2BackingInfo) {
            fileName = "[zfs_seanmc] delphix-reporting-", 
            datastore = 'vim.Datastore:', 
            uuid = "6000C295-5a4b-8904-2724-9fc58a011cbb", 
            parent = (vim.vm.device.VirtualDisk.FlatVer2BackingInfo) null, 
         controllerKey = 1001, 
         unitNumber = 1, 
         capacityInKB = 3145728,    

From the output above, the following can be determined:

- There are two configured SCSI controllers.

- SCSI controller 0, with key 1000

- SCSI controller 1, with key 1001

- There are three virtual disk devices configured.  

- Virtual Disk "Hard disk 1", ~50GB in size, provisioned to SCSI controller 0 (key 1000), and unitNumber (target) 0

- Virtual Disk "Hard disk 2", ~2GB in size, provisioned to SCSI controller 1 (key 1001), and unitNumber (target) 0

- Virtual Disk "Hard disk 3", ~3GB in size, provisioned to SCSI controller 1 (key 1001), and unitNumber (target) 1

Certainly, additional information can be determined if needed from the complete command output, but we have reduced the output captured here to focus on controller and target numbers.  The fileName parameter also provides the relevant VMDK file location, if needed for reference.

External Links

Instruction from VMware for mapping a new disk device to a VM using CLI: