Recently I had to create VMware vSphere VMs with a whole bunch of virtual disks. The application running inside of the virtual machines required a special disk layout and placement of the disks to guarantee optimal performance. To make sure everything is fine, I created a PowerCLI VM Disk Report to verify the configuration of the vSphere VMs.
A simple example of an application that benefits of a special disk layout and placement of the disks is a basic Microsoft SQL Server. Placing “User DB” and “User LOG” on separate drives allows the I/O activity to occur at the same time for both the data and log files.
Workload | SCSI ID | Datastore |
---|---|---|
OS | 0:0 | Datastore 01 |
SQL System Root | 0:1 | Datastore 01 |
SQL Temp | 1:0 | Datastore 02 |
SQL User DB | 2:0 | Datastore 03 |
SQL User LOG | 3:0 | Datastore 04 |
The VM Disk Report enables you to verify the location of each disk and the configured SCSI ID of the virtual machine.
PowerCLI VM Disk Report
Actually, the Get-VMDisk function is very simple, it is more or less an optimized representation of disk properties. But since I need this report very often, a PowerShell function that is stored inside of my profile makes absolute sense to me.
|
|
Note:
The function will not work for IDE disks. There may be other disk types in future vSphere versions (e.g. NVMe) that will not work with this.
Robert van den Nieuwendijk wrote a great PowerShell script to get a report covering which SCSI ID maps to the Windows drive letters. For Linux based operating systems I typically use the command “lsscsi -v” to map the SCSI ID to the disks.
You can also find the latest version of the Get-VMDisk function in my vSphere Modules Github Repository.