WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Uncategorized / Emulating an SSD Virtual Disk in a VMware Environment

Emulating an SSD Virtual Disk in a VMware Environment

07.03.2013 by William Lam // 32 Comments

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!

More from my site

  • Programmatically accessing the Broadcom Compatibility Guide (BCG)
  • Intel NUC 9 Pro & Extreme - First "Modular" NUC
  • Supermicro E300-9D (SYS-E300-9D-8CN8TP) is a nice ESXi & vSAN kit
  • New VMware Configuration Maximum Tool
  • PowerCLI script to help correlate vCenter, ESXi & vSAN build/versions w/o manual VMware KB lookup

Categories // Uncategorized Tags // ESXi, solid state drive, ssd, virtual disk, vmdk, vSphere

Comments

  1. *protectedNiTRo says

    07/04/2013 at 5:27 pm

    "ESXi allows operating systems to auto-detect VMDKs residing on SSD datastores as SSD devices."

    http://pubs.vmware.com/vsphere-50/topic/com.vmware.vsphere.storage.doc_50/GUID-E9E146C9-E99C-4468-B70C-770B83788433.html

    Reply
    • *protectedWilliam Lam says

      07/05/2013 at 3:20 pm

      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

      Reply
  2. *protectedAnonymous says

    07/09/2013 at 5:00 am

    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.

    Reply
  3. *protectedJesus Escolar says

    11/18/2013 at 11:03 am

    Does it works when editing the .vmx / .vmxf of a virtualized ESXi in VMware Workstation?

    Reply
    • *protectedTom Hale says

      10/30/2016 at 10:51 pm

      I raised a question on this: http://superuser.com/questions/1139128/emulate-ssd-drive-in-vmware-workstation-12

      Reply
  4. *protectedJason Burroughs says

    04/22/2014 at 3:26 pm

    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?

    Reply
    • William Lam says

      04/23/2014 at 2:16 am

      Yes, you can use this same parameter on other VMware products and toggle a disk to either make it look like an SSD or MD

      Reply
      • *protectedJason Burroughs says

        04/24/2014 at 4:10 am

        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?

        Reply
        • William Lam says

          04/24/2014 at 4:16 am

          As I mentioned already, the adv setting works both ways regardless of the underlying disk. scsiX:Y.virtualSSD = 0 means no SSD and scsiX:Y.virtualSSD = 1 means SSD

          So if you want the VMDK to not show up as an SSD, just set it to 0 🙂

          You may also want to take a look at this article http://www.virtuallyghetto.com/2014/04/ovf-template-for-creating-nested-esxi-3-or-32-node-vsan-cluster.html which includes an OVF that you can download & use which contains the minimal setup for a Nested VSAN setup

          Reply
  5. *protectedashwani says

    06/04/2014 at 7:12 am

    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.

    Reply
  6. *protectedLB@SDS says

    06/17/2014 at 10:29 pm

    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?

    Reply
  7. *protectedTed Shinn says

    11/14/2014 at 10:26 pm

    I configured a VMware Workstation 10 Virtual Machine with 8.1x32. 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

    Reply
  8. *protecteddinero says

    11/23/2014 at 1:04 am

    Awesome..it worked..Thankyou !!!

    Reply
  9. *protectedSergei says

    04/07/2015 at 3:26 pm

    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.

    Reply
  10. *protectedMDru2000 says

    10/26/2015 at 8:50 am

    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?

    Reply
    • William Lam says

      10/26/2015 at 8:59 am

      There is not

      Reply
  11. *protectedAndrew Zimmerman says

    04/06/2016 at 11:23 am

    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.

    Reply
  12. *protectedAndrew Zimmerman says

    04/06/2016 at 11:30 am

    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.

    Reply
  13. *protectedgigel says

    04/17/2024 at 8:26 am

    is there any way to make Fusion on arm M1 do the same? It defaults to NVME disk type, but windows 11 arm inside sees it as HDD. Tried nvme0:0 and creating sata and scsi disks... sata is seen as HDD while the scsi emulation does not have a driver yet for vmware tools for windows 11 arm.

    nvme0:0.virtualSSD = "1"
    scsi0:0.virtualSSD = "1"
    sata0:0.virtualSSD = "1"

    Reply
    • William Lam says

      04/19/2024 at 5:17 pm

      How are you checking in Windows that it is detecting the driver as HDD?

      I noticed that if you use Defrag tool, it may show up as HDD but if you use PowerShell Get-PhysicalDisk cmdlet, it does properly return "SSD", which is what I see on my M1 w/Win11 installed

      Reply
      • *protectedgigel says

        04/21/2024 at 12:52 pm

        yes, using defrag tool, it shows it as hdd (and shows Defragment instead of Optimize). Also trimcheck.exe shows that trim is not available, both to nvme and sata drivers (as scsi driver is not available for windows arm guest)

        https://i.imgur.com/j20izIr.png

        also, Optimize-Volume -Verbose -ReTrim -DriveLetter C VERBOSE: Invoking retrim on (C:)... VERBOSE: Retrim: 100% complete. Optimize-Volume : The volume optimization operation requested is not supported by the hardware backing the volume. Activity ID: {b1c70956-9423-0002-75f3-c7b12394da01} At line:1 char:1 + Optimize-Volume -Verbose -ReTrim -DriveLetter C
        + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo : NotSpecified: (StorageWMI:ROOT/Microsoft/...age/MSFT_Volume) [Optimize-Volume], CimExcep
        tion
        + FullyQualifiedErrorId : StorageWMI 43022,Optimize-Volume

        so vmware still does not offer live guest block discarding in 2024? sheeesh. that's why I ran away from it 10 years ago.

        Reply

Trackbacks

  1. How to quickly setup and test VMware VSAN (Virtual SAN) using Nested ESXi | virtuallyGhetto says:
    03/12/2014 at 1:45 am

    […] 4GB Disk for an "Emulated" SSD […]

    Reply
  2. Testing vSphere Virtual SAN in your virtual lab with vSphere 5.5 says:
    03/18/2014 at 2:43 pm

    […] although it isn't using an SSD. There is another option which might even be better, you can simply add a VMX setting to specify the disks are SSDs. Check William's awesome blog post for the how […]

    Reply
  3. Virtual SSDs in VMware | NerdKnobs says:
    07/03/2014 at 3:00 pm

    […] http://www.virtuallyghetto.com/2013/07/emulating-ssd-virtual-disk-in-vmware.html […]

    Reply
  4. penguinpunk.net » VMware – VMworld 2014 – STO1424 – Massively Scaling Virtual SAN Implementations says:
    08/28/2014 at 7:37 pm

    […] William Lam’s post on virtuallyghetto for SSD emulation on existing […]

    Reply
  5. How to configure vSAN on nested ESXi hosts with SSD hard disk | Wu's Blog says:
    10/30/2014 at 6:55 am

    […] set scsix:y.virtualssd = 0 in vmx file to mark the disk as non-SSD. Please refer to William's article for […]

    Reply
  6. Click This. | Big Virtual Me says:
    04/10/2015 at 1:10 pm

    […] http://www.virtuallyghetto.com/2013/07/emulating-ssd-virtual-disk-in-vmware.html […]

    Reply
  7. #Nutanix Community Edition 4 Node Cluster Nested on ESXi 6.0 | Long White Virtual Clouds says:
    07/10/2015 at 1:08 pm

    […] William Lam - Emulating an SSD Virtual Disk in a VMware Environment […]

    Reply
  8. How to run a nested ESXi 6 on top of your vSphere 5.5 environment | Virtual Kim says:
    10/21/2015 at 6:00 am

    […] The full article again is written by William Lam: Emulating SSD […]

    Reply
  9. NESTED Nutanix auf VMWARE – Ein deutschsprachiger IT Blog says:
    04/08/2017 at 10:20 am

    […] 2. Lösung: http://www.virtuallyghetto.com/2013/07/emulating-ssd-virtual-disk-in-vmware.html […]

    Reply
  10. Vanvalkinburgh.org The SSD should be a SSD in VMware Player now says:
    04/09/2019 at 8:06 pm

    […] that to your .vmx file. Stolen from here. 0 might be different though, the first zero is the controller ID and the second the disk […]

    Reply
  11. Quick Tip - New method to mark HDD to SSD in ESXi 7.x and 8.x using ESXCLI says:
    01/04/2024 at 8:52 am

    […] Note: If you are configuring this for a Nested ESXi VM, another method is to emulate a virtual SSD as shown in this blog post. […]

    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