Reading Time: 4 minutes

Build a VMware lab is usually tricky because you have to find the proper balance between the physical and the virtual infrastructure.

Most people does not have huge or powerful physical servers, or does not have the proper environment (considering the power consumption, the generated heat, the noise, or also the needed space), and they opt for small and cheap systems.

Several years ago I’ve wrote a post on how tuning vSphere 6 for lab environment, but with recent version of VMware vSphere most of the information are no more valuable.

Considering that now NVMe or generic SSD are cheap enough, the biggest contraint is usually on the RAM of the physical systems.

In cause you are building nested environment using ESXi on the physical systems, there are some possibile optmization that you can apply.

Give me back TPS

TPS is a VMware unique technology to deduple the main memory of an ESXi hosts: more memory pages from different VMs (or also from a single VM) on one host could be identical and, after that TPS has run, deduple as a single physical memory page.

VMware-TPS

Note that this is not a real-time process, but is an time frame process: ESXi hosts periodically scans the content of guest physical memory for pages that could be shared. 

Several years ago it has been “deprecated” (see Bye bye Transparent Page Sharing) and no more enabled by default (it’s only enabled intra-VM, but no more cross-VM).

But for a lab could be still useful as explainded in this post: Enhance your #homelab by re-enabling transparent page sharing

To enable TPS cross-VM and disable the large page usage (in order to increas the success of TPS), on each ESXi host change the following advanced system settings:

Mem.AllocGuestLargePage=0

advancedsetting1

Mem.ShareForceSalting = 0

advancedsetting2

and wait a couple of minutes until TSP kicks in.

Swap to SSD

Your ESXi hosts can use a portion of a flash-backed storage entity as a swap cache shared by all VMs.

The host-level cache is made up of files on a low-latency disk that ESXi uses as a write-back cache for virtual machine swap files. All VMs running on the host share the cache. Host-level swapping of virtual machine pages makes the best use of potentially limited flash device space.

Depending on your environment and licensing package, the following methods of configuring the host-level swap cache are available. Both methods provide similar results.

  • You can create a VMFS datastore on a flash device, and then use the datastore to allocate space for the host cache. The host reserves a certain amount of space for swapping to the host cache.
  • If you have a vSphere license to set up a virtual flash resource, you can use the resource to configure the swap cache on the host. The host swap cache is allocated from a portion of the virtual flash resource.

For more information see this document page.

Probably not the best solution, but reasonable if you have spare space on SSD and few space on RAM.

Use Instant Clone

Instant clones are usually used on a VDI environment (see Instant clones vs. linked clones), but using API you can manually create them.

It’s quite tricky, but you can find several information on Leveraging Instant Clone in vSphere 6.7 for extremely fast Nested ESXi provisioning.

Share

Virtualization, Cloud and Storage Architect. Tech Field delegate. VMUG IT Co-Founder and board member. VMware VMTN Moderator and vExpert 2010-24. Dell TechCenter Rockstar 2014-15. Microsoft MVP 2014-16. Veeam Vanguard 2015-23. Nutanix NTC 2014-20. Several certifications including: VCDX-DCV, VCP-DCV/DT/Cloud, VCAP-DCA/DCD/CIA/CID/DTA/DTD, MCSA, MCSE, MCITP, CCA, NPP.