WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Uncategorized / Exploring the vSphere Flash Read Cache (vFRC) APIs Part 1

Exploring the vSphere Flash Read Cache (vFRC) APIs Part 1

10.01.2013 by William Lam // 2 Comments

I am sure by now you have all probably heard about some of the new storage features introduced in vSphere 5.5 such as Virtual SAN (VSAN) and vSphere Flash Read Cache. In the coming weeks, I will be working on a series of articles that will be looking at these new features from an Automation perspective and demonstrate how you can automate and manage these configurations using the vSphere APIs. This of course will then allow you to automate using your favorite scripting/programming language such as PowerShell, Perl, Java, .NET, Ruby, etc.

In this first article, I will be exploring the new vSphere Flash Read Cache APIs and I will be primarily focusing on consuming vSphere Flash Read Cache for your virtual machines and not on the actual ESXi host configurations. In a subsequent articles, I will look at the necessary APIs to configure vSphere Flash Read Cache for your ESXi 5.5 host. For those of you who are not familiar with this feature I would recommend you check out Duncan Epping's introduction article to vSphere Flash Read Cache also known as vFRC as well as the new What's News vSphere Flash Read Cache whitepaper by Rawlinson Rivera.

To enable vFRC for a particular virtual machine, you will need to use the virtual machine ReconfigVM_Task() method and specify the particular virtual disk you wish to enable vFRC on. There is new property in the vSphere 5.5 API called vFlashCacheConfigInfo under the VirtualDisk object which you will need to configure.

These are the 5 properties:

  • reservationInMB
  • blockSizeInKB
  • cacheConsistencyType
  • cacheMode
  • vFlashModule

Technically speaking, you only need to specify the reservationInMB property as the rest of the properties have system defaults. However, at a minimum you will probably want to configure reservationInMB and blockSizeInKB where the valid values are 4-1024 and the system default is 4KB.

For cacheConsistencyType, even though the vSphere API mentions both "strong" and "weak" type, only "strong" is supported/configurable and this means that the cache data will be consistent upon a crash. If you try to configure it to "weak", you will get a not supported error.

For cacheMode, even though the vSphere API mentions both "write_thru" and "write_back", only "write_thru" is supported/configurable and this means that when writes are written to the cache, they are then de-staged to the underlying storage sub-system. If you try to configure it to "write_back", you will get a not supported error.

The last property vFlashModulespecifies the specific vFRC module to be used and at this current time, only "vfc" is valid and this is also a system default and does not need to be specified.

To demonstrate these new vFRC VM APIs, I created a sample vSphere SDK for Perl script called vflashVMMgmt.pl which can run against a vCenter Server or a standalone ESXi 5.5 host.


The script supports three operations: query, enable and disable.

To enable vFRC for a particular VM, you will need to use the "enable" operation and specify two required options (--disk and --reservation) and --blocksize is optional with default being 4KB. Here is an example configuring vFRC with 8KB blocksize & 1GB reservation:

./vflashVMMgmt.pl --config .vcenter55-1 --vmname TestVM --disk "Hard disk 1" --operation enable --blocksize 8 --reservation 1024

You can query whether a VM has vFRC enabled by using the "query" operation and specify --disk option for a particular VMDK. Here is an example:

./vflashVMMgmt.pl --config .vcenter55-1 --vmname TestVM --disk "Hard disk 1" --operation query

To disable vFRC for a particular VM, you can use the "disable" operation which disables vFRC by setting the reservationInMB property to 0. Here is an example:

./vflashVMMgmt.pl --config .vcenter55-1 --vmname TestVM --disk "Hard disk 1" --operation disable

Hopefully this has given you a good overview of the new vSphere Flash Read Cache APIs from a virtual machine perspective and the necessary information to enable or disable this feature. In the next part of the series, I will take a look at the new vSphere APIs that are required to setup and configure vFRC for your ESXi host, so stay tuned!

More from my site

  • Exploring the vSphere Flash Read Cache (vFRC) APIs Part 3
  • Exploring the vSphere Flash Read Cache (vFRC) APIs Part 2
  • How to automate vFRC configurations using the command-line in ESXi
  • How to quickly setup and test VMware VSAN (Virtual SAN) using Nested ESXi
  • A killer custom Apple Mac Mini setup running VSAN

Categories // Uncategorized Tags // ESXi 5.5, vflash, vFRC, vSphere 5.5, vSphere Flash Read Cache

Comments

  1. *protectedTejas Polakam says

    04/25/2020 at 6:30 pm

    Just a note that VFRC is discontinued in ESXi 7.
    Here is a link on how our VirtuCache software compares with VFRC
    https://virtunetsystems.com/vmware-vfrc-vflash-read-cache-competitor-virtunet-virtucache/
    Thus far we (Virtunet Systems) are the only host side caching software that supports (1) caching reads and writes (2) all ESXi releases till ESXi 7 (3) VDI and server VMs

    Disclosure - I am a SE for Virtunet

    Reply

Trackbacks

  1. Exploring the vSphere Flash Read Cache (vFRC) APIs Part 2 | virtuallyGhetto says:
    02/28/2014 at 4:11 pm

    […] from Part 1 of Exploring the vSphere Flash Read Cache (vFRC) APIs, we will now explore the necessary vSphere APIs to setup and configure vFRC on your ESXi host. […]

    Reply

Leave a Reply to Exploring the vSphere Flash Read Cache (vFRC) APIs Part 2 | virtuallyGhettoCancel 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