When you want performance in your server you use SSDs. A lot of (shared)hosting/VPS providers use SSDs to speed up their servers (and put more users on one shared host). You might want to add SSD storage to your (home)server. But if you are not using the right (supported) SSDs when running VMware ESXi the disks won’t be recognized an SSD. Luckily this is easy to fix with a few commands.
SSDs can be used in ESXi in several ways:
With host swap cache you are able to use (a part of) the SSDs to store the machine swap files. If you over allocate the ram on your machines the memory swap file will be automatically stored on SSDs.
With Virtual Read Flash you can use your SSD as a drive cache for the virtual machine hard drives. This can improve the performance of your machine dramatically. This function is only available when using vSphere and can only be configured through the web client.
With the prices of SSDs dropping rapidly you might want to add a few large SSDs in your server and use it as a datastore. Even then it is recommended configuring your SSD as an SSD in ESXi.
Please note that ESXi does not support TRIM but supports the UNMAP command which will basically do the same on SSDs.
How to set a disk type to SSD in VMware ESXi.
1. Identify the storage device to be set to SSD
Run the following command to get a list of devices available to the ESXi host.
|esxcli storage nmp device list|
Please note the naa.XXXXXX name and Storage Array Type of your SSD.
If you are having trouble identifying your SSD, you could also use this command to get a more detailed list including the drive size.
|esxcli storage core device list|
2. Using a PSA claim rule, mark the device as SSD
By using a PSA claim rule we can set the device type to SSD. Use the following command changing the marked values to your own.
esxcli storage nmp satp rule add --satp=<strong>VMW_SATP_LOCAL</strong> --device <strong>naa.12387135423423vc323j3238</strong> --option "enable_local enable_ssd"
After rebooting the host the system will mark the storage as SSD storage. If you already had a datastore you might need to recreate the datastore if it’s not detected as a SSD.