Unable to take snapshot of a VM – File is larger than maximum size supported by datastore

Unable to take snapshot of a VM – File is larger than maximum size supported by datastore

You try to create a snapshot of a VM and run into the following error:

“File<unspecified filename> is larger than the maximum size supported by datastore ‘<unspecified datastore>”

Your configuration is one or all of the following:

1) Your vmx file is in a different datastore than the vmdk disks

2) Your datastore is set with a small blocksize (1Mb)

As explained in the article “Creating a snapshot for a virtual machine fails with the error: File is larger than maximum file size supported” (http://kb.vmware.com/kb/1012384😞

“This issue occurs because the snapshot file at its maximum size cannot fit into a datastore. Starting with version 4.0, ESX and ESXi will compare the maximum size of a snapshot redolog file with the maximum size of files on a the datastore. The redolog file may not work correctly once it reaches the maximum size of the datastore. If the file could grow beyond the maximum size, ESX cancels the Create Snapshot operation and displays this error instead.”

This issue does not happen with ESX 3.5 or earlier.

Now how to solve the problem? Let’s do a step back, first of all why this error is thrown ?Basically as explained in this article the problem is in the blocksize, just to refresh our (mine too) knowledge the maximum filesize it’s directly related to the block size in the following manner:

“All virtual machines having disks with a maximum supported size by VMFS may experience this error.

For example, a virtual machine with a disk sized 256 GB stored on VMFS with 1MB block size fails to snapshot because of the additional overhead required for the delta files. Though the maximum file size for a 1MB block size is 256GB – 512, creating a vmfsSparse (delta) disk requires additional overhead space about 2GB. This resulting delta has potential to grow beyond the file system limit.

To resolve this issue, move the virtual machine to a VMFS volume with a larger block size.

Overhead for the snapshot is roughly about 2GB for a disk size of 256GB. If snapshots are to be used, consider the overhead while deciding the size of the disks.

Note: VMware recommends that you to create virtual disks of size less than 2TB-xxGB, to use features like Snapshot, Clone, and Independent-nonpersistent.

Block size in MBMaximum VMDK sizeMaximum Overhead
1256 GB – 512 B~ 2 GB
2512 GB – 512 B~ 4 GB
41024 GB – 512 B~ 8 GB
82048 GB – 512 B~ 16 GB

This means that to use snapshots, the maximum file sizes are:

1MB block size -> 256GB – 2GB = 254GB
2MB block size -> 512GB – 4GB = 508GB
4MB block size -> 1024GB – 8GB = 1016GB
8MB block size -> 2048GB -16GB = 2032GB”

Now based on this article you have 2 choices

“To resolve this issue you can either change the location of the virtual machine configuration files or change the workingDir to a datastore with enough block size. workingDir is the location where the snapshots are created, By default, workingDir contains the .vmx file).”

So let say that you cannot change the blocksize of a VMFS so easily,at least if you don’t move out of it all the VM ,destroy the datastore and recreate it with a larger blocksize . So, as I was saying the only option is to move the working dir on a datastore with a larger blocksize.

How to do that? Simple :

  • Power off the virtual machine.
  • Add the following line to the .vmx configuration file for the virtual machine: workingDir=”<new_path_location>

For example: workingDir=”/vmfs/volumes/46f1225f-552b0069-e03b-00145e808070/vm-snapshots”

Note: Alternatively, if your datastore has been called Datastore1, you can specify workingDir=”/vmfs/volumes/Datastore1/vm-snapshots” instead of the UUID as demonstrated above. If the name of the directory contains a space, use the UUID as the space may cause an issue.

  • Reload the virtual machine by unregistering and re-registering it. If you do not want to redirect the virtual machine’s swap file, add this line to the .vmx configuration file and reload the configuration file:

sched.swap.dir=”<path_to_vm_directory>”

This ensures that the swap file is created in the same directory as the virtual machine.

  • Power on the virtual machine.

That’s it now you may re-launch your snapshot and everything will work.

Version history
Revision #:
1 of 1
Last update:
‎03-14-2011 09:09 AM
Updated by: