Use PowerCLI to mark disk as as SSD

I’ve recently been working with a few new ESXi hosts. These systems have a pair of solid state disks that I planned to use for host cache. However, ESXi 5.0 did not detect these disks as an SSD type. I found a couple articles describing how to trick ESXi into thinking a data store was SSD:

Yellow-Bricks: Swap to host cache aka swap to SSD
VirtuallyGhetto: How to Trick ESXi 5 in seeing an SSD Datastore

After confirming with my third party vendors that this was a supported configuration, I tested and confirmed that using the enable_ssd option would resolve my issues. Since my host build script is written in PowerCLI, I wanted to re-write the vMA commands using Get-EsxCli.

$localDisk = Get-ScsiLun | where {$_.ExtensionData.DisplayName -match "Local LSI Disk"}
$canName = $localDisk.CanonicalName
$esxcli = Get-EsxCli
$satp = ($ | where {$_.Device -eq $canName }).StorageArrayType

The local VMFS data store needs to be created first. I encountered some errors when running the commands against an unformatted/RAW device.

One comment

  1. [...] Brian Wuchner article on how to do this through PowerCLI - Joe Keegan has developed a couple of nice PowerCLI scripts to make using this with Host Caching [...]

Leave a Reply

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


Notify me of followup comments via e-mail. You can also subscribe without commenting.