VMware vSphere 7 is the major product release with lot of design and architectural changes. Among these changes, VMware also reviewed and changed the layout of ESXi 7 storage partitions on boot devices. Such change has some design implications which I'm trying to cover in this blog post.
Note: Please, be aware that almost all information in this blog post are sourced from external resources such as VMware Documentation, VMware KB, VMware blog posts, and also VMware community blog posts.
Let's start with ESXi 7 Storage Requirements
- Installing ESXi 7.0 requires a boot device that is a minimum of 8 GB for USB or SD devices, and 32 GB for other device types.
- Upgrading to ESXi 7.0 requires a boot device that is a minimum of 4 GB.
- When booting from a local disk, SAN or iSCSI LUN, a 32 GB disk is required to allow for the creation of system storage volumes, which include a boot partition, boot banks, and a VMFS-L based ESX-OSData volume.
- The ESX-OSData volume takes on the role of the legacy /scratch partition, locker partition for VMware Tools, and core dump destination.
Key changes between ESXi 6 and ESXi 7
- larger system boot partition
- larger boot banks
- introducing ESX OSData (ROM-data, RAM-data)
- consolidation of coredump, tools and scratch into a single VMFS-L based ESX-OSData volume
- coredumps default to a file in ESX-OSData
- variable partition sizes based on boot media capacity
The biggest change to the partition layout is the consolidation of VMware Tools Locker, Core Dump and Scratch partitions into a new ESX-OSData volume (based on VMFS-L). This new volume can vary in size (up to 138GB). [4]
Official support for specifying the size of ESX-OSData has been added to the release of ESXi 7.0 Update 1c with a new ESXi kernel boot option called systemMediaSize which takes one of four values [4]:
- min = 25GB
- small = 55GB
- default = 138GB (default behavior)
- max = Consumes all available space
What is ESX OS Data partition?
ESX-OSData is new partition to store ESXi configuration, system state, and system or agent virtual machines. The OSData partition is divided into two sections
- ROM-data
- RAM-data
ROM-data is not read/only as a name can implied, but it is a section for data written to the disk infrequently. Example of such data is VMtools ISOs, ESXi configurations, core dumps, etc.
RAM-data is for frequently written data like logs, VMFS global traces, vSAN EPD and traces, and live system state files.
How the partition layout changed?
Below is depicted partition Lay-out in vSphere 6.x and Consolidated Partition Lay-out in vSphere 7 [1]
Partition size variations
There are various partition sizes based on boot device size. The only fix size is for the system boot partition which is always 100 MB. All other variations are depicted on picture below [1].
Note: If you use USB or SD storage devices, the ESX-OSData partition is created on an additional storage device such as an HDD or SSD. When an additional storage device is not available, ESX-OSData is created on USB or SD devices, but the ESX-OSData partition is used only to store ROM data and RAM-data are stored on a RAM disk. [1]What design options do I have?
Design Option #1 - Changing ScratchPartition location
In ESXi 7.0, a VMFS-L based ESX-OSData volume (where logs, coredumps and configuration are stored) replaces the traditional scratch partition. During upgrade, the configured scratch partition is converted to ESX-OSData. The settings described in VMware KB 1033696 [7] are still applicable for cases where you want to point the scratch path to another location. It is about ESXi advanced setting ScratchConfig.ConfiguredScratchLocation. I wrote the blog post about changing Scratch Location here.
Design Option #2 - Create a core dump file on a datastore
Core dump location can be also changed. To create a core dump file on a datastore, see the KB article 2077516 [8].
Design Option #3 - Changing ProductLocker location
To change productLocker location form boot media to directory on a datastore, see the VMware KB article 2129825 [10].
Applying all three options above can significantly reduce I/O operations to boot media with less endurance such as USB Flash Disk or SD Card. However, hardware industry improved over the last years and nowadays we have new boot media options such as SATA-DOM, M.2 slots for SSD, or low-cost NVMe (PCI-e SSD).
Note: I have not tested above design options in my lab, therefore, I'm assuming it works as expected based on VMware KBs reffered in each option.
Other known problems you can observe when using USB or SD media
- ESXi hosts experiences All Paths Down events on USB based SD Cards while using the vmkusb driver [5] [15]
- Luciano Patrao blogged about this (or similar) issue at [14] and he has found the workaround until the final VMware fix which should be released in ESXi 7.0 U3. The Luciano's workaround is to
- login to ESXi console (SSH or DCUI)
- execute command "esxcfg-rescan -d vmhba32" several times until it finishes without an error.
- You need to give some minutes between each time you rerun the command. Be patient and try again in 2/5m.
- After all, errors are gone and the command finishes without any error, you should see in logs that “mpx.vmhba32:C0:T0:L0” was mounted in rw mode, and you should be able to do some work on the ESXi hosts again.
- If you still have some issues, restart the management agents
- /etc/init.d/hostd restart
- /etc/init.d/vpxa restart
- After this, you should be able to migrate your VMs to another ESXi host and reboot this one. Until it breaks again in case someone is trying to use VMtools.
- VMFS-L Locker partition corruption on SD cards in ESXi 7.0 U1 and U2 [6] (should be fixed in future ESXi patch)
- High frequency of read operations on VMware Tools image may cause SD card corruption [12]
- This issue has been addressed in ESXi 6.7 U3 - changes were made to reduce the number of read operations being sent to the SD card, an advanced parameter was introduced that allows you to migrate your VMware tools image to ramdisk on boot . This way, the information is read only once from the SD card per boot cycle.
- However, it seems that problem reoccurred in ESXi 7.x, because ToolsRamdisk option is not available with ESXi 7.0.x releases [13]
- The other vSphere design solution is IMHO the change of ProductLocker location mentioned above, because VMtools image is not located on boot media.
Conclusion
ESXi 7 is using ESX-OSData partition for various logging and debugging files. In addition, if vSAN and/or NSX is enabled in ESXi, there are additional trace files leading into even higher I/O. This ESXi system behavior requires higher endurance of boot media than in the past.
If you are defining the new hardware specification, it is highly recomended to use larger boot media (~150 GB or more) based on NAND flash technology and connected through modern buses like M.2 or PCI-e. When larger boot media is in use, ESXi 7 will do all the magic required for correct partitioning of ESX boot media.
In case of existing hardware and no budget for additional hardware upgrade, you can still use SD cards or USB drives, but you should carefully design boot media layout and consider relocation of Scratch, Core Dump, and ProductLocker to external locations to mitigate the risk of boot media failure.
Hope this write-up helps and if you will have some other finding or comment do not hesitate to let me know via comments bellow the post, twitter or email.
Sources:
- [1] Hagoort Niels. vSphere 7 – ESXi System Storage Changes. In: VMware Blog, URL: https://blogs.vmware.com/vsphere/2020/05/vsphere-7-esxi-system-storage-changes.html
- [2] VMware. ESXi Hardware Requirements. In VMware vSphere 7 Documentation, URL: https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.esxi.install.doc/GUID-DEB8086A-306B-4239-BF76-E354679202FC.html
- [3] VMware. New Kernel options available on ESXi 7.0. In: VMware KB, URL: https://kb.vmware.com/s/article/77009
- [4] Lam William. Changing the default size of the ESX-OSData volume in ESXi 7.0. In: WilliamLam.com Blog, URL: https://williamlam.com/2020/05/changing-the-default-size-of-the-esx-osdata-volume-in-esxi-7-0.html
- [5] VMware. ESXi hosts experiences All Paths Down events on USB based SD Cards while using the vmkusb driver. In: VMware KB, URL: https://kb.vmware.com/s/article/83450
- [6] VMware. VMFS-L Locker partition corruption on SD cards in ESXi 7.0. In: VMware KB, URL: https://kb.vmware.com/s/article/83376
- [7] VMware. Creating a persistent scratch location for ESXi 7.x/6.x/5.x/4.x. In: VMware KB, URL: https://kb.vmware.com/s/article/1033696
- [8] VMware. Configuring ESXi coredump to file instead of partition. In: VMware KB, URL: https://kb.vmware.com/s/article/2077516
- [9] Arora Amit. vSphere 7 – ESXi System Storage Changes. In: vmwarekb.wordpress.com, URL: https://vmwarekb.wordpress.com/category/vsphere/vsphere-7-x/
- [10] VMware. Installing and upgrading the latest version of VMware Tools on existing hosts. In: VMware KB, URL: https://kb.vmware.com/s/article/2129825
- [11] Radhakrishnan Rakesh. Virtual SAN Considerations When Booting from a Flash Device. In VMware Blog, URL: https://blogs.vmware.com/virtualblocks/2016/03/18/virtual-san-design-considerations-for-booting-from-a-flash-device/
- [12] VMware. High frequency of read operations on VMware Tools image may cause SD card corruption. In: VMware KB, URL: https://kb.vmware.com/s/article/2149257
- [13] VMware. ToolsRamdisk option is not available with ESXi 7.0.x releases. In VMware Blog, URL:https://kb.vmware.com/s/article/83782
- [14] Luciano PatrĂ£o. vSphere 7 Update 2 loses connection with SD Cards a Workaround. In: ProVirtualZone, URL: https://www.provirtualzone.com/vsphere-7-update-2-loses-connection-with-sd-cards-workaround/
- [15] VMware. Bootbank cannot be found at path '/bootbank' errors being seen after upgrading to ESXi 7.0 U2 In: VMware KB, URL: https://kb.vmware.com/s/article/83963
- [16] Hagoort Niels.vSphere 7 – System Storage When Upgrading. In: VMware Blog, URL: https://blogs.vmware.com/vsphere/2020/07/vsphere-7-system-storage-when-upgrading.html
- [17] VMware.SD card/USB boot device revised guidance. In: VMware KB, URL: https://knowledge.broadcom.com/external/article/317631/sd-cardusb-boot-device-revised-guidance.html
- [18] VMware.Creating a persistent scratch location for ESXi 8.x/7.x/6.x. In: VMware KB, URL: https://knowledge.broadcom.com/external/article?legacyId=1033696