VMware Cloud Community
andvm
Hot Shot
Hot Shot
Jump to solution

VM snapshot - space consumption location

Hi,

If I create a datastore of 2TB and create a VM with a thin provisioned disk of 1.5TB, then lets say I create a snapshot and leave the VM running on the snapshot for a while.

Will the VM space consumption (now including the snapshot) still be restricted to 1.5TB? Meaning the datastore can never run out of space in this scenario with a VM on a snapshot?

I know that keeping the snapshot for more than 72 hours is not recommended but want to understand what is the space limit of a snapshot (VM vdisk vs VMFS datastore)

Thanks

1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

I think the above was not clear to me as I thought that once you provision a VM with a vdisk of a certain amount (what ever disk format) - no activities (temporary or not) would be able to consume more than that on the datastore.

That's unfortunately not the case. As mentioned, each snapshot may grow up to the virtual disk's provisioned size, which can already cause issues, and using thin provisioning for virtual disks is one more reason, why it's important to monitor disk space usage on a datastore.


André

View solution in original post

0 Kudos
8 Replies
a_p_
Leadership
Leadership
Jump to solution

Will the VM space consumption (now including the snapshot) still be restricted to 1.5TB? Meaning the datastore can never run out of space in this scenario with a VM on a snapshot?

No, each snapshot can grow up to its base virtual disk's provisioned size (plus some overhead).

Also keep in mind that once the snapshot grows to a certain size, you may not be able to consolidate/delete it anymore, depending on the changes, and the size of the base disk.

André

0 Kudos
andvm
Hot Shot
Hot Shot
Jump to solution

Ok so the risks (in terms of disk space) in this case scenario (assuming 1 VM on this datastore) is that the VM base disk will run out of free disk space.

Also as far as I understand you cannot resize the base disk if there is a snapshot applied.

So one would want to avoid the situation in which the snapshot grows too much that it requires more free space to be consolidated/deleted but at the same time time you cannot expand the VM base disk because there is a snapshot. So basically you and end up with a chicken and egg scenario.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Ok so the risks (in terms of disk space) in this case scenario (assuming 1 VM on this datastore) is that the VM base disk will run out of free disk space.

Not the base disk, but the datastore may run out of disk space if a VM has active snapshots, or when you try to consolidate/delete snapshots with thin provisioned base disks.

Also as far as I understand you cannot resize the base disk if there is a snapshot applied.

Yes, that's corect. A snapshot .vmdk file contains metadata, based on the base disk's provisioned size at the time of the snapshot creation.

So one would want to avoid the situation in which the snapshot grows too much that it requires more free space to be consolidated/deleted but at the same time time you cannot expand the VM base disk because there is a snapshot. So basically you and end up with a chicken and egg scenario.

You are mixing up two things, free space in the base disk, and free disk space on the datastore. Resizing a virtual disk may only be required, if the guest OS requires more space. Deleting a snapshot however is transparent to a guest OS, and is only about the growth of the base .vmdk file on the datastore.

Example: If the thin provisioned base .vmdk file - at the time you create a snapshot - has a size of let's say 500GB, and you let the snapshot grow to ~1TB (assuming its additional data), then the .vmdk files will consume 1.5TB on the datasatore. Consolidating/deleting the snapshot at this point will not work anymore, because the data from the snapshot .vmdk file needs to be merged into the base .vmdk file (expanding t to 1.5TB) before the snapshot files can be deleted from the datastore. In this example the required disk space on the datastore would be ~2.5TB, which exceeds the 2TB datatore size. 1.5 TB for the base .vmdk file, and 1TB for the snapshot .vmdk file.

André

scott28tt
VMware Employee
VMware Employee
Jump to solution

In addition to the replies above, not sure where the 72 hours thing comes from - never keep snapshots for any longer than necessary (ie. during backups, app/OS updates, and very little else!)


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
andvm
Hot Shot
Hot Shot
Jump to solution

Ok so snapshot deletion will consume space from the datastore and nothing to do with the free space left in the base disk.

I think the above was not clear to me as I thought that once you provision a VM with a vdisk of a certain amount (what ever disk format) - no activities (temporary or not) would be able to consume more than that on the datastore.

If the above is correct that proves to be wrong and snapshot deletion is one example.

0 Kudos
andvm
Hot Shot
Hot Shot
Jump to solution

thanks, yes I know that but the focus of this thread is to understand the snapshot disk space inner workings/utilisation/limits

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

I think the above was not clear to me as I thought that once you provision a VM with a vdisk of a certain amount (what ever disk format) - no activities (temporary or not) would be able to consume more than that on the datastore.

That's unfortunately not the case. As mentioned, each snapshot may grow up to the virtual disk's provisioned size, which can already cause issues, and using thin provisioning for virtual disks is one more reason, why it's important to monitor disk space usage on a datastore.


André

0 Kudos
scott28tt
VMware Employee
VMware Employee
Jump to solution

The more you understand about snapshots, I’m sure you will come to your own conclusions as to how and when to use them.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos