VMware vSphere

 View Only

Emulate a SSD drive in ESX  

Jan 14, 2014 12:07 PM

Emulate a SSD drive in ESX :


The standard hard drive (HDD) has been the predominant storage device for a very long time. But now HDDs are getting replaced with SSD drives.SSD drives outshine HDD especially due to its speed and reliability. But the price of a solid state drive is much more than a HDD.

In this era of virtualization, we can actually emulate a SSD drive in an ESX machine  using few steps.


How to emulate a SSD drive:


You require a device with sufficient storage space and of course an ESX box.

To verify whether SSD option is already enabled or not, execute

~ # esxcli storage core device list --device=<device name>

The output will be having a field “Is SSD” which denotes whether it’s enabled or not.

You need to create a new SATP rule specifying your device and specifying the "enable_ssd" string as part of the --option parameter:

esxcli storage nmp satp rule add –satp VMW_SATP_LOCAL –device <device name> --option=enable_ssd

esxcli storage nmp satp rule list|grep enable_ssd

VMW_SATP_LOCAL   

  1. mpx.vmhba1:C0:T2:L0                                              

enable_ssd                  user   

You now can verify from the command line that your new device is being seen as an SSD device, by displaying the details for this particular device:

~ # esxcli storage core device list --device=<device name>

mpx.vmhba1:C0:T2:L0   

Display Name: Local VMware Disk (mpx.vmhba1:C0:T2:L0)

Has Settable Display Name: false    Size: 5120  

Device Type: Direct-Access    Multipath Plugin: NMP   

Devfs Path: /vmfs/devices/disks/mpx.vmhba1:C0:T2:L0

Vendor: VMware    Model: Virtual disk    Revision: 1.0    SCSI Level: 2    Is Pseudo: false  

Status: on

Is RDM Capable: false    Is Local: true  

Is Removable: false  

Is SSD: true 

Is Offline: false    Is Perennially Reserved: false 

  Thin Provisioning Status: unknown

   Attached Filters:    VAAI Status: unsupported

   Other UIDs: vml.0000000000766d686261313a323a30

Now you can refresh the Storage view on the vSphere Client or you can do so from the command line by running the following command:

~ #vim-cmd hostsvc/storage/refresh

To remove the settings :


~#esxcli storage nmp satp rule remove --satp VMW_SATP_LOCAL --device naa.6001e4f01d872f001769bdcb4f02a105 --option=enable_ssd

~ # esxcli storage nmp satp list |grep ssd

~ # esxcli storage core claiming reclaim -d naa.6001e4f01d872f001769bdcb4f02a105

~ # esxcli storage core device list --device=naa.6001e4f01d872f001769bdcb4f02a105

 

  naa.6001e4f01d872f001769bdcb4f02a105

   Display Name: Local DELL Disk (naa.6001e4f01d872f001769bdcb4f02a105)

   Has Settable Display Name: true

   Size: 139392

   Device Type: Direct-Access

   Multipath Plugin: NMP

   Devfs Path: /vmfs/devices/disks/naa.6001e4f01d872f001769bdcb4f02a105

   Vendor: DELL

   Model: PERC 5/i

   Revision: 1.03

   SCSI Level: 5

   Is Pseudo: false

   Status: on

   Is RDM Capable: false

   Is Local: true

   Is Removable: false

   Is SSD: false

   Is Offline: false

   Is Perennially Reserved: false

   Thin Provisioning Status: unknown

   Attached Filters:

   VAAI Status: unsupported

   Other UIDs: vml.02000000006001e4f01d872f001769bdcb4f02a105504552432035

~ # vim-cmd hostsvc/storage/refresh

Statistics
0 Favorited
1 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Nov 23, 2015 06:23 AM

In vSphere 6.0, we have some cool APIs available around this

Refer my blog post on API sample script : Mark local HDD as SSD and SSD as HDD : http://vthinkbeyondvm.com/vsphere-6-0-cool-apis-to-mark-local-host-hdd-to-ssd-ssd-to-hdd-sample-api-script/

Feb 01, 2015 09:39 AM

Researching for an SSD simulation I came across http://www.virtuallyghetto.com/2013/07/emulating-ssd-virtual-disk-in-vmware.html

by William Lam

Basically you add the following entry to the VMX or the advanced settings:

scsiX:Y.virtualSSD = 1

Related Entries and Links

No Related Resource entered.