Inside a VM running on ESXi? You would achieve this the same way as on a physical machine.
If you have vCenter Server managing ESXi, you could make use of a template - that’s like a VM that is made to be cloned in order to create lots of other VMs.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog