I continue to be amazed everyday at all the awesome features and challenges being tackled by our VMware Engineering organization and yesterday was another example of that. There was a question that was posed internally about emulating an SSD device for a Nested ESXi environment running in VMware Fusion. I figure this would be an easy answer and pointed the user to a blog article I had written a few years ago on how to fake an SSD device in ESXi using SATP claim rules via ESXCLI. It turns out, one of the engineers knew of a better way of emulating an SSD Virtual Disk that can be consumed beyond just Nested ESXi VMs but also for any other guestOSes that supports SSD devices.

So why would you want to emulate an SSD device? Well for a vSphere environment, you may want to try out the new Swap to Host Cache feature from a functional perspective to see how it would work. You might be developing a script to enable this feature and having a "fake" SSD device would allow you to create such a script and test it. For other guestOSes, maybe you want to see how the system would react to an SSD device, perhaps drivers or configurations maybe needed and you would like to run through those processes before installing a real SSD device.

So the solution is actually quite simple and it is just an advanced setting in the Virtual Machine's configuration file (VMX) which can also be appended to using either the vSphere Web Client, vSphere C# Client or the vSphere API. This setting is only supported on Virtual Machines that is running virtual hardware 8 or greater. To configure a specific virtual disk to appear as an SSD, you just need to add the following:

scsiX:Y.virtualSSD = 1

where X is the controller ID and the Y is the disk ID of the Virtual Disk.

This configuration presents to the guestOS the mediumRotationRate field of the SCSI inquiry pages 0xB1 and sets the value to 1 and the guests will then report it as a solid-state device. As you can see, this can benefit more than just running Nested ESXi, you can also do various testing on other guestOSes that you require a "fake" SSD device.

Note: Though you can emulate an SSD device, it is no substitute for an actual SSD device and any development or performance tests done in a simulated environment should also be vetted n a real SSD device, especially when it comes to performance.

It is also important to note that reporting of an SSD device will highly depend on the guestOS, here is a high level table on how some of the common guestOSes recognize SSD devices.

GuestOS SSD Reporting
Windows 8 IDE, SCSI and SATA disks can be recognized as SSDs
Windows 7 IDE and SATA disks can be recognized SSD, but SCSI as mechanical
Linux (Ubuntu & RHEL) IDE, SCSI and SATA disks can be recognized as SSDs
Mac OS X SATA can be recognized as SSDs, but IDE and SCSI as mechnical

Here is a screenshot of a Nested ESXi host with an emulated SSD device:

Here is a screenshot of the new Windows 8.1 Preview with an emulated SSD device:

Note: Though I demonstrated this using vSphere, this also works for VMware Fusion (tested this personally), Workstation and Player. The only requirement is that you are running virtual hardware 8 or greater and that your guestOS supports reporting SSD device.

From a Nested ESXi perspective, I will definitely be using this method instead of using ESXCLI to go through the SATP claim rules, this is much easier to remember. I would also like to thank Regis Duchesne for sharing this tip and Srinivas Singavarapu and the virtual devices team for developing this awesome feature. You guys ROCK!

27 thoughts on “Emulating an SSD Virtual Disk in a VMware Environment

    • Yes, that’s the default behavior (it’ll auto-detect). However, if you want to forcefully disable or enable it, then the above advanced setting will allow you to do so

  1. Hello Willam ! I have SSD(460gb) of PCI Express slot. such as having to connect an additional SSD storage. Advanced i see it it passthrough mode.

  2. What about using Fusion on an SSD Macbook Pro and wanting to test VSAN, which requires an SSD and a spinning disk? I believe I need to fake the SSD into looking like a spinning disk, right?

      • Thanks for the reply, William. Let me restate my question – I have a 2013 Macbook Pro Retina with a 1TB SSD drive (and 16GB RAM). I have Fusion 6.0.3 installed, and I installed 3 x ESXi 5.5 VM’s, as well as a Windows 2012 R2 system with vCenter on it. Now I’m ready to get VSAN up and running for testing. I created one 4GB and one 8GB VMDK for each ESXI host. However, when I go to create Disk Groups for VSAN, it shows only two SSDs per host, and does not allow for VSAN on that configuration.

        I need to force it to use an SSD as a hard drive. I was able to get it to work by using the longer ESXCLI command with “disable_ssd”, but was hoping for a simple method like you have posted here to make a hard drive look like an SSD. Is that possible?

  3. Hi,

    thanks for the information!

    I am trying to achieve the same for rhel6u5 guest OS Vms, on ESX5.1. HW level 8.

    I edited the VMX file and then loaded it, but I still see the Vdisk

    Host: scsi2 Channel: 00 Id: 01 Lun: 00
    Vendor: VMware Model: Virtual disk Rev: 1.0
    Type: Direct-Access ANSI SCSI revision: 02

    Please suggest if I am missing something.

  4. When I follow all these instructions and set up the hosts, networks and invoke the commands required to emulate SSD on a drive in my host, I do see the SSD drive available in STORAGE view, but the vSAN “Create Disk Group” page doesn’t see the SSD.

    It sees the other non-ssd.

    Why does everything else show the SSD, and the vSAN “Disk Group” screen not see it?

  5. I configured a VMware Workstation 10 Virtual Machine with 8.1×32. I chose to add 2 SCSI HDDs, one was 250 GB and the other was 100 GB. Both were set up the same way. After the VM was powered on, C:\ properties tool tab optimize indicated that C: could not be optimized since it was an SSD, while D: was not SSD and could be optimized. The System Reserved was also SSD. The VMs I set up are for QA testing. I need them to not be SSD. I do not know what is going on and how to correct it. Help would be greatly appreciated. Ted Shinn, novice virtualization worker

  6. Hi, William!
    Do you have any updates on this feature, when the guest we deploy on ESX is not another ESX, but some sort of Linux? I have tried myself – the feature doesn’t work neither on RHEL6, nor on CentOS 7.

  7. Thanks for the parameter which worked as expected. While setting this parameter allows “fake” ssd, my application require that a certain IOPS threshold be met. Is there a parameter to set the IOPS for the “fake” ssd?

  8. All of my disks are reporting as flash now. After your fix.
    I even tried specifying specifically after each other disk, the other option, to indicate it’s not an ssd, to no avail.

  9. But if you go into the individual host, there’s an option to mark individual storage devices as flash for hdd.
    Problem solved. I would avoid following the above steps, because I tried them every which way and it’s not working on esxi 6.

Thanks for the comment!

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