WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Uncategorized / How to Create an SE Sparse (Space-Efficient) Disk in vSphere 5.1

How to Create an SE Sparse (Space-Efficient) Disk in vSphere 5.1

09.05.2012 by William Lam // 8 Comments

You probably may have heard, that with the upcoming release of vSphere 5.1, a new virtual machine disk format will be introduced called called SE Sparse (Space-Efficient). One of it's features is to provide the ability to reclaim unused blocks from within the guestOS. I would highly recommend you check out a recent blog post vSphere 5.1 Storage Enhancements – Part 2: SE Sparse Disks by Cormac Hogan for more details about the new SE Sparse disk format as well as other storage improvements in vSphere 5.1.

As Cormac points out, this new disk format will initially be leveraged by VMware View (in a future release from my understanding), as there are additional integrations required to use this feature than just using the new SE Sparse disk format. Having said that, the SE Sparse disk format is a feature of the vSphere 5.1 platform and with that, you do have the ability to create an SE Sparse disk.

Disclaimer: This is for educational purposes only, this is not officially supported by VMware. Please test this in a development environment before using it on actual systems.

There are two methods in which you can create an SE Sparse disk, directly on the ESXi Shell of an ESXi 5.1 host or remotely connecting to an ESXi 5.1 host.

Option 1 - Using vmkfstools on ESXi Shell 

Though it may not be documented, you can easily create a new VMDK with the new SE Sparse disk format by running the following command (10GB disk in this example):

vmkfstools -c 10g -d sesparse WindowsXP.vmdk

Here is a screenshot of new SE Sparse disk descriptor file to prove we have successfully created a new VMDK using the new format:

Option 2 - Using vSphere 5.1 API w/modified remote version of vmkfstools

As mentioned, the SE Sparse disk format is a feature of the vSphere 5.1 platform and as so, you can also leverage the vSphere 5.1 API to create a new VMDK using the virtualDiskManager and specifying the new SeSparseVirtualDiskSpec.

Note: Even though the vSphere API reference mentions the ability to set grain size via grainSizeKb property, I have found that it is not possible and just leaving it blank will automatically default to 1024K (1MB) which might be a system default for now.

You can download the modified version of the remote vmkfstools called vmkfstools-lamw which requires the the installation of vCLI 5.1 or vMA 5.1.

Here is an example of creating the same 10GB VMDK using the new SE Sparse disk format:

./vmkfstools-lamw --server 172.30.0.187 --username root -c 10G -d sesparse "[datastore1] WindowsXP.vmdk"

After you have created your new SE Sparse disk, the next logical step is assign it to a virtual machine. Since this is a new feature in vSphere 5.1, you will need to use the new vSphere Web Client to perform the operation as the legacy vSphere C# Client is not aware of this new disk type. You will also need to ensure that the virtual machine is running the latest ESXi 5.1 compatibility and later (virtual hardware version 9).

Once you have added our newly created disk from the datastore, it should now show up in the vSphere Web Client as Flex-SE for the disk type.

Additional Resources:

  • What's New In vSphere 5.1 Storage Whitepaper
  • Space-Efficient Sparse Virtual Disks and VMware View

 

More from my site

  • Creating SE Sparse Linked Clones Using the vSphere 5.1 API
  • Retrieving vscsiStats Using the vSphere 5.1 API
  • Retrieving ESXTOP Performance Data Using the vSphere 5.1 API
  • How To Initiate a Wipe & Shrink Operation On an SE Sparse Based Disk
  • Nested Virtualization APIs For vSphere & vCloud Director 5.1

Categories // Uncategorized Tags // api, ESXi 5.1, sesparse, vmdk, vmkfstools, vSphere 5.1, vsphere sdk for perl

Comments

  1. *protectedAnonymous says

    01/04/2013 at 8:56 pm

    Is there any way to assign an sesparse .vmdk to a virtual machine without using the vSphere Web Client?

    Reply
    • *protectedWilliam says

      01/04/2013 at 9:15 pm

      You'll probably be able to do so using the vSphere API

      Reply
  2. *protectedAnonymous says

    06/29/2013 at 4:14 pm

    I tried to use the SE Sparse disk and it works, but after I wipe & shrink the disk becomes unreliable and crashes the VM during write operations on the disk with a "redo log corrupt" error.

    Reply
  3. *protectedAnonymous says

    09/04/2013 at 7:46 pm

    Guys please don't use these in production... they have limitations (snapshots for example) and are not supported yet.

    Reply

Trackbacks

  1. Creating SE Sparse Linked Clones Using the vSphere 5.1 API | virtuallyGhetto says:
    03/01/2014 at 4:45 pm

    […] my previous article, I showed you how you can easily create your own SE Sparse (Space-Efficient) disks for you virtual machines running on vSphere 5.1. In addition to just creating new virtual disks […]

    Reply
  2. Reclaiming in-guest capacity with VMware and Pure Storage | Cody Hosterman says:
    11/12/2014 at 6:23 pm

    […] you need to use the CLI–the trusty vmkfstools. Thanks to @lamw for the information on that here. In short though SSH into an ESXi hosts that has access to the target VMFS that you would like to […]

    Reply
  3. Reclaiming in-guest capacity with VMware and Pure Storage | Pure Storage Blog says:
    01/30/2015 at 3:29 am

    […] you need to use the CLI–the trusty vmkfstools. Thanks to @lamw for the information on that here. In short though SSH into an ESXi hosts that has access to the target VMFS that you would like to […]

    Reply
  4. How To Initiate a Wipe & Shrink Operation On an SE Sparse Based Disk | virtuallyGhetto says:
    07/10/2016 at 6:48 am

    […] my previous two articles, I showed you how to create your own SE Sparse disks as well as creating new virtual machine Linked Clones leveraging the new SE Sparse disk format. If […]

    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