, , ,

Datastores and storage basics: where your VMs actually live (VMware for Beginners, Part 6)

A plain-English guide to VMware datastores: what VMFS, NFS and vSAN are, how a VM lives as files on disk, and why thin provisioning is the storage choice most likely to page a junior engineer.

VMware for Beginners · Part 6 of 18
TL;DR: A datastore is the storage shelf where VMware keeps every file that makes up a virtual machine. Three kinds turn up again and again: VMFS (a disk that ESXi formats and many hosts share), NFS (a shared folder reached over the network), and vSAN (the hosts pool their own drives into one). A VM is really a folder of files on that shelf, and the big one is the VMDK virtual disk. For most disks pick thin provisioning, keep 10 to 15 percent of the datastore free, and never let it hit 100 percent or your VMs stop where they stand.
Who this is for: Freshers and new IT staff who already know what ESXi and a VM are, but have never thought about where a VM actually lives on disk, or what VMFS, NFS and thin provisioning mean. No storage background needed.

A VM you built last week freezes at two in the afternoon. Not a crash, not a blue screen. The screen simply stops, the clock inside the guest stalls, and nothing you click responds. You open vCenter and there it is: a small question mark on the VM, asking you to choose Retry or Cancel. The message underneath says there is no more space for the virtual disk. The datastore is full. Until somebody frees space, that VM is going to sit there, alive but paused, and so might every other VM sharing the same shelf.

This is the day storage stops being a box you ticked in a wizard and becomes the thing your whole job rests on. So let us slow down and look at where a VM actually lives. Picture a large shared warehouse with numbered shelves. Each shelf holds boxes that belong to different teams, and several delivery vans (your ESXi hosts) can back up to the same shelf and grab or drop boxes at the same time. In VMware that shelf is a datastore. The boxes are the files that make up your VMs. Learn what is on the shelf, how the shelf is built, and how full you are allowed to fill it, and the frozen-VM afternoon never happens to you.

What a datastore actually is

A datastore is a named container for files that ESXi and vCenter treat as one place to store things. That is the whole idea: it hides the messy details of the storage underneath (which physical disks, which network path, which LUN) and gives you one tidy name like datastore-prod-01 with a capacity and an amount free. A LUN, by the way, is just a slice of storage that a storage array hands out to a host, like cutting one numbered ticket from a big roll. You format that slice once, and from then on you think in datastores, not in LUNs.

The reason this matters so much in VMware is the word shared. The same datastore can be mounted by many hosts at once. That single fact is what makes the clever features later in this series possible. Moving a running VM from one host to another (vMotion, Part 9) works because the VM files never move; both hosts already see the same shelf. Restarting VMs automatically when a host dies (HA, Part 10) works for the same reason. If you remember one thing from this part, make it this: in a real VMware setup, storage is shared on purpose.

ESXi host Aruns some VMsESXi host Bruns other VMsShared datastoreVM-A folder · VM-B folder · VM-C folder
One shelf, many hosts. Shared storage is what makes vMotion and HA possible later.

A VM is a folder of files

Here is the part that surprises new engineers. A virtual machine is not a mysterious object locked inside ESXi. It is a folder of ordinary files on the datastore, named after the VM. Browse the datastore and you can see them. Knowing the cast of files turns vague problems (the VM is broken) into specific ones (the disk descriptor points at the wrong file).

The files you will actually see

WebApp01/ (the VM folder)WebApp01.vmx  — the config: how many vCPUs, how much RAM, which networkWebApp01.vmdk  — the small descriptor that points at the real disk dataWebApp01-flat.vmdk  — the actual disk contents (usually the biggest file)WebApp01.nvram  — the VM BIOS/firmware settingsvmware.log  — what the VM did, where you look when it misbehaves
A VM is a folder. The -flat.vmdk holds your data; the small .vmdk just describes it.

The two you will talk about most are the pair that make up the disk. The small .vmdk is a text descriptor, a few kilobytes, that records how big the disk is and what kind it is. The large -flat.vmdk (or for thin disks a sparse file) holds the actual bytes of the guest operating system and its data. When someone says a VM has a 100 GB disk, they mean that data file. Snapshots, backups and clones (Part 8 and Part 14) are all really operations on these files.

The three kinds of datastore you will meet

The shelf can be built in different ways. As a fresher you mostly need to recognise three and know when each shows up.

VMFS, NFS and vSAN in plain terms

VMFS (Virtual Machine File System) is a file system that ESXi puts on block storage, the kind delivered over Fibre Channel, iSCSI, NVMe or a local disk. It is built so several hosts can read and write the same volume safely at once, which a normal Windows or Linux file system cannot do. The current version is VMFS-6. NFS is simpler to picture: a storage box (a NAS) shares a folder over the network, and ESXi mounts that folder the way you map a shared drive at home. vSphere supports NFS v3 and v4.1. vSAN flips the model: instead of a separate array, each ESXi host contributes its own internal drives, and vSAN pools them into one datastore that every host in the cluster sees. No external storage box at all.

VMFSblock storage (SAN)ESXi formats itFC / iSCSI / NVMeshared by many hostsNFSa shared folder (NAS)mounted over the LANv3 or v4.1no VMFS neededvSANhosts pool theirown internal disksno separate arrayone cluster datastore
Same idea, three builds: format a SAN, mount a folder, or pool the hosts own disks.
 VMFSNFSvSAN
What sits under itBlock storage (FC, iSCSI, NVMe, local)A NAS sharing a folderThe hosts own disks
Who formats itESXi, with VMFS-6The NAS already has a file systemvSAN manages it for you
Where you meet it firstMost traditional setupsSmaller shops, some labsHyper-converged clusters
One-line ideaA formatted shared diskA mounted shared folderStorage built from the servers

Thin vs thick: the one to really understand

If you go deep on one thing in this part, make it this, because it is the setting behind that frozen VM. When you create a virtual disk, you choose how its space is handed out. Thick provisioned reserves the full size on the datastore right away. Ask for a 100 GB thick disk and 100 GB leaves the free pool immediately, whether the guest writes one byte or ninety gigabytes. Thick comes in two flavours: lazy zeroed (space reserved now, each block wiped clean the first time it is written) and eager zeroed (the whole thing wiped up front, which takes longer to create but is required for a few features).

Thin provisioned is the opposite. The disk shows the guest its full size, say 100 GB, but on the datastore it only takes up what is actually written. Copy 10 GB of data into a 100 GB thin disk and the file on the shelf is about 10 GB. It grows as the guest writes. This is wonderful for using space well, and it is exactly where new engineers get burned, because the numbers stop adding up in your head.

Thick: 100 GB disk100 GB reserved noweven if mostly emptyThin: 100 GB disk10 GB usedgrows as data is written
Same size to the guest. Very different footprint on the shelf.

Thick has two flavours: lazy zeroed and eager zeroed

Thick provisioning splits into two options, and the whole difference comes down to zeroing. Before a guest can safely use a block of disk, any leftover data sitting in that physical spot has to be overwritten with zeros, so one VM can never read scraps left behind by another VM that used the space before it. Both thick types reserve the full size the moment you create the disk. What changes is when that zeroing happens.

Thick provision lazy zeroed is the usual default. The full space is set aside straight away, so a 100 GB disk takes 100 GB on the shelf at once, but each block is only wiped clean the first time the guest actually writes to it. Creating the disk is quick, because nothing is zeroed yet. The only cost is a very small, one-time pause on the first write to each fresh block, brief enough that most workloads never feel it.

Thick provision eager zeroed does all the cleaning up front. When you create the disk, the host writes zeros across every block before the VM is allowed to touch it, so creation is noticeably slower and a large disk can take a while to appear. In return there is no first-write delay later, because the work is already finished. It gives the steadiest, most predictable performance for the heaviest, latency-sensitive workloads, and a few older features such as legacy Fault Tolerance used to require it.

Thick lazy zeroedquick to createBlocks cleaned only as data is writtenfirst write to a block = tiny one-time pauseThick eager zeroedslower to createEvery block zeroed when the disk is createdno first-write pause for the VM laterzeroed (clean)reserved, not yet zeroed
Lazy zeros each block just in time; eager zeros everything up front. Same final size, different create cost.
Disk typeSpace reserved up frontBlocks zeroedCreate speedFirst-write delay
ThinNo, grows on demandOn first writeFastSmall
Thick lazy zeroedYes, full sizeOn first writeFastSmall
Thick eager zeroedYes, full sizeAll at creationSlowerNone

You choose between all three from the same dropdown when you create or migrate a disk: Thin Provision, Thick Provision Lazy Zeroed, or Thick Provision Eager Zeroed. One modern wrinkle is worth carrying with you: on all-flash arrays that support VAAI, the storage hardware can offload the zeroing work, which narrows the real-world gap between lazy and eager so far that eager zeroed earns its place only in the specific cases that genuinely need it.

Here is the real-world specific that no tidy explanation gives you. With thin disks you can hand out more space than the datastore physically has, which is called overcommitment, and it works fine right up until the guests fill in their blanks. When the total written data reaches the real capacity, the next write has nowhere to go. ESXi does not corrupt the VM; it does something stranger. It pauses the VM and raises a question with the literal message There is no more space for virtual disk (in the logs, msg.hbacommon.outofspace), offering Retry or Cancel. Free up space on that datastore, click Retry, and the VM carries on from the exact instruction it stopped on. Miss it, and every thin-disk VM on that datastore can stall together. The fix is rarely heroic: delete an old snapshot, storage vMotion a VM elsewhere, or grow the datastore. The lesson is to watch free space before it ever gets there.

My honest opinion: The common advice is thin provision everything and move on. I half agree. Thin is the right default for most VMs, but the move on part is how datastores fill and production VMs freeze. Thin provisioning does not remove the space risk, it trades a known cost today (wasted reserved space) for a worse surprise later (an outage) unless somebody actually watches the free space. So thin, yes, but only with an alert on the datastore. And I will push back on one more habit: insisting on eager-zeroed thick for every database VM. On modern all-flash storage with VAAI offload, a thin or lazy-zeroed disk performs close enough that the extra rigidity is rarely worth it. Reserve eager-zeroed for the specific cases that genuinely require it.

Worked example: the overcommit math

You have one 2 TB datastore (2048 GB usable). Ten new VMs are each requested with a 200 GB disk. Thick provisioned, that is 10 × 200 = 2000 GB reserved on day one. You fit, just, with 48 GB to spare and no room to grow.

Thin provisioned, those same ten VMs only write what they use. Say each really holds about 60 GB at first: 10 × 60 = 600 GB actually consumed, even though you have promised 2000 GB. Lovely, until the apps grow. If every VM creeps toward its full 200 GB, written data climbs past 2048 GB and the datastore hits the wall.

The sane setup: thin provision, but set an alarm at roughly 80 percent (about 1638 GB used) so you get warned with around 410 GB of runway left, well before any VM pauses. That 10 to 15 percent free buffer is not superstition, it is your reaction time.

Why this matters in your first job: A full datastore is one of the most common Sev-2 tickets a junior gets handed, and it is also one of the easiest to prevent and to fix once you understand thin provisioning. If you can explain why a VM paused, free space the safe way, and then add the alert that stops it recurring, you will look senior far earlier than your job title says you are.

How big can these things get

Two numbers worth carrying in your head. A single VMFS datastore can be up to 64 TB, and a single virtual disk (VMDK) can be up to 62 TB. The gap between them is not a typo. The datastore also has to hold the VM config files, swap, snapshots and a little file-system overhead, so you can never quite fill one 64 TB datastore with one 62 TB disk and nothing else. In daily life you will work with datastores far smaller than this, but it is the kind of limit an interviewer likes to poke at, so it is handy to know.

Real interview question

What happens when a datastore runs out of space?

Strong answer: VMs with thin or snapshot-backed disks cannot grow their files, so ESXi pauses them and raises a question (There is no more space for virtual disk) rather than crashing them. Powered-off VMs simply will not start. The fix is to free space safely (delete or consolidate old snapshots, storage vMotion a VM to another datastore, or extend the datastore), then click Retry so the paused VMs resume. Then add a free-space alarm so it does not happen again. Mentioning thin provisioning and overcommitment as the usual root cause is what turns a passable answer into a confident one.

Try it yourself

You do not need a real array. Install the free VMware Workstation, spin up a nested ESXi lab, or use VMware’s own browser-based Hands-on Labs (HOL), which are free and need nothing installed. Create a new VM and give it a 40 GB thin disk. Before installing anything, browse to the VM folder on your real machine and note the size of the disk file: it will be tiny, a few hundred megabytes, not 40 GB.

Now install a small Linux guest or copy a few gigabytes of files inside it, shut the VM down, and look at the disk file again. It will have grown to roughly match what you wrote, not the full 40 GB. How to check you got it right: the provisioned size the VM reports (40 GB) is larger than the actual file size on your disk. You have just watched thin provisioning work, and you now understand exactly how a datastore can be promised more than it holds.

Gotcha: Free space on a datastore and free space inside the guest are two different numbers. A guest can report plenty of room while its thin disk keeps growing on the datastore, because deleting files inside the guest does not automatically shrink the file outside it. VMFS-6 can reclaim that freed space automatically (a process called UNMAP), but do not assume it is instant. Always trust the datastore free-space figure, not the guest, when you are worried about running out.

FAQ

What is the difference between a datastore and a LUN?
A LUN is a raw slice of storage an array presents to a host, with no VMware file system on it yet. A datastore is what you get after ESXi formats that LUN with VMFS (or after it mounts an NFS share). You manage and think in datastores; the LUN is the plumbing underneath.

Can two ESXi hosts use the same datastore at the same time?
Yes, and that is the point. VMFS is a clustered file system designed for exactly this, and NFS and vSAN are shared by nature too. Shared access is what lets a VM move between hosts with vMotion or restart elsewhere with HA, because the files never have to move.

Is thin provisioning bad for performance?
On modern storage the difference is small enough that most workloads will never notice, because the only extra cost is a quick zero-on-first-write as new blocks are touched. The real trade-off with thin is management, not speed: you must monitor free space so you do not overcommit your way into a full datastore.

How big can a VMFS datastore and a single VMDK be?
A VMFS datastore can reach 64 TB and a single virtual disk can reach 62 TB. You will rarely build anything near that, but the numbers come up in interviews and in capacity planning, so they are worth remembering.

VMFS or NFS, which should I use?
For a fresher the honest answer is that you usually inherit whatever the team already runs rather than choosing. VMFS suits block storage like Fibre Channel and iSCSI; NFS is simpler to set up over the network and avoids the format step. Neither is universally better; they fit different storage hardware.

Where to go next

You now know where a VM lives, what files it is made of, and the storage choice most likely to page you at 2 a.m. Next we move from the disk to the network, and look at how VMs actually talk to each other and the outside world with virtual switches and port groups. When you are ready to go further than the basics, the advanced VCF and vSAN material on this site goes much deeper into software-defined storage; treat that as your stage-two reading once these foundations feel comfortable.

Your move: Open a lab (your own, or VMware’s free Hands-on Labs), create one thin disk, and watch its file grow as you write to it. Then look at any datastore you can see and find its free-space figure. That single habit, checking free space before it bites, is the most useful thing a junior storage engineer can carry into their first month.
VMware for Beginners · Part 6 of 18
« Previous: Part 5  |  Complete Guide  |  Next: Part 7 »

References

About The Author


Discover more from Journal of Intelligent Infrastructure – By Dr Pranay Jha

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *

Architect’s Toolkit

About the Author

Dr. Pranay Jha is a Cloud and AI Consultant with 18+ years of experience in hybrid cloud, virtualization, and enterprise infrastructure transformation. He specializes in VMware technologies, multi-cloud strategy, and Generative AI solutions. He holds a PhD in Computer Applications with research focused on Cloud and AI, has published multiple research papers, and has been a VMware vExpert since 2016 and a VMUG Community Leader.

Discover more from Journal of Intelligent Infrastructure - By Dr Pranay Jha

Subscribe now to keep reading and get access to the full archive.

Continue reading