SCSI disk enumeration order for virtual machines in the vSphere Client
search cancel

SCSI disk enumeration order for virtual machines in the vSphere Client

book

Article ID: 321390

calendar_today

Updated On: 06-19-2024

Products

VMware vSphere ESXi

Issue/Introduction

This article clarifies how the vSphere Client enumerates disks for a virtual machine.

Symptoms:
When you add multiple SCSI virtual disks on multiple SCSI controllers to a virtual machine, the hard disks are not listed in the order you added them.

Environment

VMware vSphere ESXi 7.0.0
VMware vSphere ESXi 8.0
VMware vSphere ESXi 6.0
VMware vSphere ESXi 6.7
VMware vSphere ESXi 6.5

Resolution

Virtual machine disks are enumerated based on SCSI bus location, starting with the first controller and moving along the bus.

For example: The VM below has 4 disks : 

grep vmdk *.vmx

scsi0:0.fileName = "VM1.vmdk"
scsi0:1.fileName = "VM1_1.vmdk"
scsi1:0.fileName = "VM1_2.vmdk"
scsi2:0.fileName = "VM1_3.vmdk"


Within the Guest OS, these disks would be located on different bus locations basis the SCSI controller they are associated with. 

For example: The below 2 disks are part of the same SCSI controller - scsi0:

scsi0:0 -> VM1.vmdk 
scsi0:1 -> VM1_1.vmdk 

and both of these have the same locations inside the Guest OS - Location 160.

which disks are registered as scsi disks?


Similarly, the other 2 disks located on SCSI controllers 1 and 2 have different locations inside the Guest OS.

scsi1:0 -> VM1_2.vmdk > Location 224 
scsi2:0 -> VM1_3.vmdk > Location 256 

scsi id vmware virtual disk

Also, its important to understand that, in the vSphere Client, the disk enumeration is not based on order of addition. If a disk is added to a virtual machine at a higher SCSI bus location, the disks below will be renumbered to reflect this.

For example, a VM has three disks as mentioned below:

Hard Disk 1 - SCSI 0:0
Hard Disk 2 - SCSI 1:0
Hard Disk 3 - SCSI 2:0


If a fourth disk, Hard Disk 4 is added to SCSI controller 1, at address 1:1, the vSphere Client will display the disks in this order:

Hard Disk 1 - SCSI 0:0
Hard Disk 2 - SCSI 1:0
Hard Disk 4 - SCSI 1:1
Hard Disk 3 - SCSI 2:0


Additional Information