WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Uncategorized / How to Trick ESXi 5 in seeing an SSD Datastore

How to Trick ESXi 5 in seeing an SSD Datastore

07.22.2011 by William Lam // 38 Comments

In vSphere 5, there is a new feature called Host Cache which allows a user to offload the virtual machine's swap onto a dedicated SSD device for better performance. This is done by creating a VMFS volume on an SSD device which is then detected by SATP (Storage Adapter Type Plugin) and allows a user to add and configure a VMFS datastore for host caching.

During the vSphere 5 beta, I was testing out various new features including Host Caching but did not have access to a system with an SSD device while updating and creating a few new scripts. After some research I found that if a default SATP rule is not available to identify a particular SSD device, that a new rule could be created containing a special metadata field specifying that it is an SSD device.

In the following example, I will take a local virtual disk (mpx.vmhba1:C0:T2:L0) in a vESXi 5.0 host and trick ESXi into thinking that it is an SSD device.

We will need to use esxcli whether that is directly on the ESXi Shell or using vMA and/or PowerCLI esxcli's remote version.

Note: The following assumes there is already a VMFS volume created on the device you want to present as an SSD device, if you have not done so, please create a VMFS volume before continuing

First you will 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 -s VMW_SATP_LOCAL -d mpx.vmhba1:C0:T2:L0 -o enable_ssd

You can verify that your rule was created property by performing a list operation on the SATP rules:

~ #  esxcli storage nmp satp rule list | grep enable_ssd
VMW_SATP_LOCAL       mpx.vmhba1:C0:T2:L0                                                enable_ssd                  user

Next you will need to reclaim your device so that the new rule is applied:

~ # esxcli storage core claiming reclaim -d mpx.vmhba1:C0:T2:L0

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 -d mpx.vmhba1:C0:T2:L0
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

As you can see the "Is SSD" field is not being populated as true where as before if you ran this command, it would display false

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

Now if you go back to the vSphere Client under "Host Cache Configuration" you should see the new fake SSD device for selection and you just need to configure it and Host Cache is enabled for this device.

This of course is probably not officially supported unless directed by VMware nor is there a real good reason for this. I personally had to go down this route for scripting purposes but if you wanted to see how Host Cache works, this is a neat trick to allow you to do so.

More from my site

  • How to Automate Host Cache Configuration in ESXi 5
  • Running ESXi 5.0 & 5.1 on 2012 Mac Mini 6,2
  • Nested Virtualization Resources
  • That's so cool! Running ESXi 5.0 & 5.1 on Apple Mac Mini
  • vSphere Security Hardening Report Script for vSphere 5

Categories // Uncategorized Tags // ESXi 5.0, host cache, ssd, vSphere 5.0

Comments

  1. *protectedNiTRo says

    08/17/2011 at 10:45 pm

    very useful trick William, thanks a lot 🙂

    Reply
  2. *protectedmarco says

    10/10/2011 at 7:53 pm

    great!

    Reply
  3. *protectedmgiammarco says

    11/17/2011 at 7:26 pm

    I get this error:

    esxcli storage core claiming reclaim -d naa.6a4badb03468b200154b0c860cb167ff
    Unable to unclaim path vmhba3:C2:T2:L0 on device naa.6a4badb03468b200154b0c860cb167ff. Some paths may be left in an unclaimed state. You will need to claim them manually using the appropriate commands or wait for periodic path claiming to reclaim them automatically.

    Reply
  4. *protected1538Moss says

    11/19/2011 at 10:42 pm

    mgiammarco: Did you shutdown all your guest machines ?

    Reply
  5. *protectedrsb says

    11/24/2011 at 8:03 am

    I get the same error message as mgiammarco, and I haven't created any guest machines yet. I have tried setting the host in maintenance mode, and even rebooting the host, but I still get the same error message.

    Any ideas what I'm doing wrong?

    Reply
  6. *protectedrsb says

    11/24/2011 at 9:19 am

    I still get the error message, but I now noticed in vSphere that the Drive Type have changed from Non-SSD to SSD. Hooray! 🙂

    Reply
  7. *protectedgopikrishnan says

    01/29/2012 at 8:27 am

    Hi All,

    I could understand that, if we try to unclaim a local hardisk or a device in which dump partition/scratch partiton is present, then the mentioned error will come.

    Any ideas on how to fix it?

    Reply
  8. *protectedChris Horn says

    03/01/2012 at 4:11 am

    Have you ever seen a issue were the above commands work without error but the properties button is grayed out in the Host Cache Configuration? Since its greyed out I'm not able to slide and set the host cache.

    Reply
    • *protectedDatto says

      09/22/2013 at 9:23 pm

      Also, please note that you may have to highlight the SSD in the Host Cache screen before the Properties choice will ungrey -- it appears that, by default, the SSD drive isn't automatically highlighted so the Properties choices is greyed.

      Datto

      Reply
    • *protectedJohn Doe says

      05/12/2014 at 4:40 am

      You need to reboot the host.

      Reply
  9. *protectedWilliam says

    03/01/2012 at 3:01 pm

    @Chris Horn,

    To be honest, I don't recall if I had any issues with the button.

    Reply
  10. *protectedeuro says

    05/07/2012 at 9:50 am

    Hello William,
    thank you four your Post.
    Helped a lot with some HP Blades and SSD drives installed ..

    is there any tip how the exclude the "Datastore usage on disk" Alarm for the Host cache Store?

    br
    Stefan

    Reply
  11. *protectedpaulgrevink says

    05/26/2012 at 10:56 am

    Hello William,

    Great post, thank you very much for this.

    Regards,

    Paul

    Reply
  12. *protectedAnonymous says

    08/28/2012 at 4:45 pm

    Thanks you so much !
    Now I can take the benefit of my SSD drive.

    Reply
  13. *protecteddailyvmtech says

    11/12/2012 at 9:24 am

    Hi, will this be configurable on Nested vESXi5? I'm preparing for my VCAP5 and I want to test it.

    Thanks,

    Reply
  14. *protectedFanta says

    04/19/2013 at 7:15 am

    Hi all!
    I am trying take the benefit of my SSD drive but ....

    comand "esxcli storage nmp satp rule add --satp VMW_SATP_LOCAL --device mpx.vmhba1:C1:T1:L0 --option=enable_ssd" says:
    Unable to find device with the name mpx.vmhba1:C1:T1:L0

    🙁

    WTF ??

    Reply
    • *protectedJohn Doe says

      05/12/2014 at 4:43 am

      Just use the identifier (eg. naa.123456789...) instead of the runtime name (eg. mpx.vmhbal:C1:T1:L0).

      Reply
  15. *protectedAnonymous says

    05/13/2013 at 10:03 am

    @Fanta:
    First of all login with ssh (Putty?) to host and use this command for identify SSD display name:

    # esxcli storage nmp device list

    Replace mpx.vmhba1:C1:T1:L0 with your ssd display name.

    Sorry for my bad english.
    Bye,
    Fabio

    Reply
  16. *protectedPaul Kroon says

    06/06/2013 at 1:41 pm

    @Chris Horn,

    I know this is over a year old, but I had the same problem with Properties being disabled after tagging my device as SSD (even though it showed up in the Host Cache section properly). I "fixed" this by Unmounting the datastore, and then Mounting it again.

    Reply
  17. *protectedSertec says

    11/20/2013 at 3:08 pm

    Would this trick works for USB EXternal HDDs?

    Reply
  18. *protectedCormac Hogan says

    03/21/2014 at 2:00 pm

    Will, could be unique to 5.5U1, but it appears that many of the arguments now require a double-minus, e.g. --satp, --device and --option (fyi)

    Reply
    • William Lam says

      03/21/2014 at 4:08 pm

      Cormac,

      It looks like my blog is changing double-dash to single-dash. The short option should be single dash and the full option is double dash, nothing has changed

      ~ # vmware -vl
      VMware ESXi 5.5.0 build-1623387
      VMware ESXi 5.5.0 Update 1
      ~ #
      ~ # esxcli storage nmp satp rule add
      Error: Missing required parameter -s|--satp

      Usage: esxcli storage nmp satp rule add [cmd options]

      Description:
      add Add a rule to the list of claim rules for the given SATP.

      Cmd options:
      -b|--boot This is a system default rule added at boot time. Do not modify esx.conf or add to host profile.
      -c|--claim-option=
      Set the claim option string when adding a SATP claim rule.
      -e|--description=

      Set the claim rule description when adding a SATP claim rule.
      -d|--device=
      Set the device when adding SATP claim rules. Device rules are mutually exclusive with vendor/model and driver rules.
      -D|--driver=
      Set the driver string when adding a SATP claim rule. Driver rules are mutually exclusive with vendor/model rules.
      -f|--force Force claim rules to ignore validity checks and install the rule anyway.
      -M|--model=
      Set the model string when adding SATP a claim rule. Vendor/Model rules are mutually exclusive with driver rules.
      -o|--option=
      Set the option string when adding a SATP claim rule.
      -P|--psp=
      Set the default PSP for the SATP claim rule.
      -O|--psp-option=
      Set the PSP options for the SATP claim rule.
      -s|--satp=
      The SATP for which a new rule will be added. (required)
      -R|--transport=
      Set the claim transport type string when adding a SATP claim rule.
      -t|--type=
      Set the claim type when adding a SATP claim rule.
      -V|--vendor=
      Set the vendor string when adding SATP claim rules. Vendor/Model rules are mutually exclusive with driver rules.

      Reply
  19. *protectedShawn Eustis says

    06/27/2014 at 12:24 am

    Do you have the command to reverse this, convert an SSD drive back to non-SSD?

    Reply
    • *protectedShawn Eustis says

      06/27/2014 at 1:21 am

      Got it, just change the to in the command

      Reply
      • *protectedShawn Eustis says

        06/27/2014 at 1:23 am

        Got it, just change the "add" to "remove" in the command. If we could create multiple datastores from the same local disks, this would be a great way to turn on VSAN in a non-SSD environment.

        Reply
  20. *protectedSDGrey says

    06/03/2015 at 7:44 pm

    Great article - our test ESXi 6.0 cluster wouldn't see the SSDs as such - worked like a charm

    Reply
  21. *protectedCarlos Boyd says

    04/20/2018 at 11:41 am

    Hey William... I've done this dozens of times with success. However, I just tried it on some HP Synergy lab hardware... and the device disappears after applying the claim rule. Any ideas?

    I've gone thru and ran the reverse to get the device available.

    Reply

Trackbacks

  1. Quick Tip – Marking an HDD as SSD or SSD as HDD in ESXi | virtuallyGhetto says:
    03/16/2014 at 6:11 pm

    […] I thought was quite interesting. Some of you may recall an article I wrote a few years back on how to trick ESXi 5 in seeing an SSD device which relied on adding an SATP rule for a particular storage device. The actual use case for this […]

    Reply
  2. NSX Home LAB Part 1 | says:
    04/17/2014 at 12:59 pm

    […] http://www.virtuallyghetto.com/2011/07/how-to-trick-esxi-5-in-seeing-ssd.html […]

    Reply
  3. Host level Swap to SSD says:
    06/28/2014 at 3:19 pm

    […] not recognized as SSD's, you should be able to tag any Disk as SSD. William Lam posted a blog How to Trick ESXi 5 in seeing an SSD Datastore. After the disks are tagged as SSD, logon to the ESXi and then navigate to the configuration tab, […]

    Reply
  4. How to manage PSA claimrules and SATP rules with esxcli - VMwaremine - Mine of knowledge about virtualization says:
    07/07/2014 at 7:17 am

    […] can probably hear about at every VMware training, also "tier-1" bloggers like Duncan or William have posted about it like ages […]

    Reply
  5. best way to present storage to nested guests on one SSD? says:
    08/24/2014 at 3:14 pm

    […] PM #4 To force ESXi to see a datastore as an SSD (for VSAN for instance) check this site: How to Trick ESXi 5 in seeing an SSD Datastore | virtuallyGhetto A wise man can learn more from a foolish question than a fool can learn from a wise answer. - […]

    Reply
  6. Create Virual SSD | myVirtuaLlearning says:
    08/28/2014 at 6:36 am

    […] http://www.virtuallyghetto.com/2011/07/how-to-trick-esxi-5-in-seeing-ssd.html […]

    Reply
  7. .pQd's log » Blog Archive » convincing vmware that lun presented by hardware raid is based on ssd says:
    11/22/2014 at 2:11 pm

    […] i've found a solution here and here: […]

    Reply
  8. NSX Home LAB Part 1 | VMware Professional Services says:
    12/12/2014 at 1:28 pm

    […] http://www.virtuallyghetto.com/2011/07/how-to-trick-esxi-5-in-seeing-ssd.html […]

    Reply
  9. Как заставить ESXi5 видеть диск как SSD datastore — ITG says:
    05/16/2015 at 3:03 pm

    […] Оригинал: http://www.virtuallyghetto.com/ […]

    Reply
  10. Как заставить ESXi5 видеть диск как SSD datastore | says:
    08/24/2015 at 12:57 pm

    […] Оригинал: http://www.virtuallyghetto.com/ […]

    Reply
  11. Routing between nested and non-nested workloads in vCloud Air | CloudAssassin – Cloud Architecture Simplified says:
    10/02/2015 at 11:57 am

    […] The proposed architecture had 3 vApp's within vCloud Air, all with specific org vDC networks routed via the vCloud Edge Services Gateway (spine if you will). The Resource cluster has 3 virtual ESXi hosts and the Edge cluster has the same. Each vmnic presented to the vESXi hosts has it's own dvSwitch as they are connected to separate vCloud Director networks. I was planning on leveraging vSAN for the shared storage solution, which I had to create emulated SSD's. For that I leveraged William Lam's post: How to Trick ESXi 5 in seeing an SSD Datastore. […]

    Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025