Associating an NAA ID with Physical Drive Bay Location on HPE Servers Running ESXi 6.7

While deploying vSAN clusters on HPE servers, I came across a problem. The vSAN wizard did not display the physical bay number of the drive, so I had to figure out another way to associate the displayed NAA ID of the drive with the physical drive location. 

Disks as they appear in the vSAN configuration wizard
Disks as they appear in the vSAN configuration wizard

In my situation, I want drives in bay 1, 3, and 5 to be in disk group 1, drives in bays 2, 4, and 6 to be in disk group 2. To visualize this end goal, check out the image below.

Desired disk group layout
Desired disk group layout

In order for this solution to work, it is required to have installed ESXi with the HPE ESXi image. The HPE custom image includes the Smart Storage Administrator CLI (SSACLI) utility, which is the secret sauce for identifying drive location programmatically in HPE servers. For ESXi 6.5 and forward, the following command will return physical drive information:

/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 pd all show detail

The output will look something like this, with an entry for each drive.

physicaldrive 1I:1:4
Port: 1I
Box: 1
Bay: 4
Status: OK
Drive Type: Unassigned Drive
Interface Type: Solid State SAS
Size: 1.9 TB
Drive exposed to OS: True
Logical/Physical Block Size: 512/4096
Firmware Revision: HPD2
Serial Number: –
WWID: 58CE38EE2057D3C6
Model: HP MO001920JWFWU
Current Temperature (C): 29
Maximum Temperature (C): 30
Usage remaining: 100.00%
Power On Hours: 592
SSD Smart Trip Wearout: False
PHY Count: 2
PHY Transfer Rate: 12.0Gbps, Unknown
Drive Authentication Status: OK
Carrier Application Version: 11
Carrier Bootloader Version: 6
Sanitize Erase Supported: True
Sanitize Estimated Max Erase Time: 1 minute(s), 10 second(s)
Unrestricted Sanitize Supported: True
Shingled Magnetic Recording Support: None
Drive Unique ID: 58CE38EE2057D3C56193000858CE38EE

Pay attention to the highlighted WWID value. I have intentionally left off the last character. The highlighted string is the same as the NAA ID that appears in the vSphere wizard, minus the last character. We now know that the drive in this example belongs in bay 4, and is a capacity drive in disk group 2. Similar to this example, you can now use the output for the other drives to identify their physical location of each NAA value, and assign it to the proper disk group for your design.

Alternatively, you can use the serial number (removed from this example) to match up with what you can find in the iLO interface. 

However, logging into every host and running the command can be a bit tedious. Instead, I threw together a quick powershell script that leverages Plink to pull that information from specified hosts. You could easily modify the script to process multiple hosts at once or process the output however you like.

########## Define the below values ##########
$vmhost = "esx1"
$user = "root"
$Passwd = "password"
$PathToPlink = "C:\plink.exe"
######## DO NOT EDIT BELOW THIS LINE ########

$cmd = "/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 pd all show detail"

$plink = "echo y | " + $PathToPlink + " " + "-ssh" + " " + "$user" + "@" + $vmhost + " " + "-pw" + " " + $Passwd + " " + '"' + $cmd + '"'

Connect-VIServer $vmhost -User $user -Password $Passwd
#Starts the ssh service on the host if it is not running
$sshstatus = Get-VMHostService  -VMHost $vmhost| Where-Object {$psitem.key -eq "tsm-ssh"}
if ($sshstatus.Running -eq $False) {
    Get-VMHostService | Where-Object {$psitem.key -eq "tsm-ssh"} | Start-VMHostService
Write-Verbose -Message "Executing $cmd on $vmhost"

$cmdOutput = Invoke-Expression -command $plink

#If SSH was stopped on the host before running this script, this will put it back to a stopped state
if ($sshstatus.Running -eq $False) {
    Get-VMHostService | Where-Object {$psitem.key -eq "tsm-ssh"} | Stop-VMHostService -Confirm:$False

Continue Reading

VMworld 2018: Lessons Learned

VMworld 2018 came and went in a flash. Not only was it my first time attending VMworld, but it was my first time at a tech conference, as well as my first time in Las Vegas.

There were a lot of lessons learned during VMworld 2018 for me, so I’ll try to summarize my experience and advice in a few quick lists.


  • Meet new people. For a conference full of nerds, these people are remarkably social and willing to talk to complete strangers. They collectively hold an ocean of insight that will go untapped if you don’t make those connections.
  • Participate in the hackathon. You may miss out on a party, but what you’ll get in return is time working on a project in small groups with some of the sharpest minds the conference has to offer. Simply choose a team doing a project related to something of interest to you; the learning will follow.
  • Wear comfortable shoes. I was putting in a couple of miles per day, and although I was doing alright, I heard plenty of complaints of hurting feet at the end of day 1.
  • Drink lots of water. Whether you choose to imbibe at any of the parties or not, you are still likely to be much more active during the conference then you would be on a typical day. Stay hydrated.
  • Try to get the playlist that runs in the hands-on labs area, before sessions, and in the village. That playlist is amazing but I can’t find it anywhere, and my phone was having a hard time detecting what was playing.


  • Try to do it all. Take some time for yourself, and relax. Your brain can only take so much information at once. Pace yourself.
  • Stay in your comfort zone. I would argue that the connections I made at the conference are more valuable than the content of the sessions. Talk to the experts. Talk to other customers. Talk about problems you’re facing, recent victories, hobbies, whatever. Do the hackathon. Attend roundtables. Attending sessions is great, but if that’s all you do, you’re missing a large part of what the conference offers.
  • Attend 100 level sessions. These are largely geared towards managers or entry level administrators. If you’ve been working in vSphere for any amount of time, focus on 200 and 300 level sessions.
  • Go back to work on Friday. VMworld is incredible, but at the end of it, you’ll likely want to crash for a few days.


My first VMworld experience was overwhelming, but incredible. That’s largely in part to my TAM. He put in a lot of work making sure I was getting into valuable sessions and attending events I wouldn’t have otherwise known about, or chose to participate in on my own. I credit him for helping me out of my comfort zone.  Attending VMworld has been something I’ve always wanted to do, and it did not disappoint. It has inspired a drive for improvement not only in the technical aspects of my day job, but also in my own contributions back to the community.

Cheers to moving forward.

Continue Reading