vCenter Server 4.0, VMotion of a VM fails
Error in viclient: Insufficient disk space on datastore
I ran into this error today.
When i checked the datastore i noticed there was still 5GB of free space.
I do not want to say that this is a fair enough amount of free space on a 280GB Datastore, and I did anticipate some possible problems when using snapshots, but I did not expect problems with Vmotion.
I remembered some capacity guidelines from vmware and after some googling i found them here:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003412
In short:
____________________________________
All VMFS (vmfs2, vmfs3) must retain a level of free space to ensure that the virtual machine functions properly. Two important capacity thresholds must be observed:
· 200 Megabyte Capacity: VMware suggests 200 MB as the threshold where ESX system administrators take action to resolve capacity issues,
VMFS volumes vary widely in size and it is impossible to define a precise percentage, but the risk of unexpected problems become greater at this point.
· 100 Megabyte Remaining: If left unchecked, a VMFS volume grows until only 100 MB of space remains, at which time issues may occur.
100 MB is defined as a critical threshold at which ESX system administrators must take immediate action to correct the issue because VMware VMFS stops growing at this point.
____________________________________
The odd thing is that these thresholds do not account for preserving the VMotion, DRS and Snapshot capabilities.
I agree that, with these sugested thresholds, VMs will keep running but you lose a lot of functionality when using these capacity thresholds.
Cause of the problem:
vCenter Server 4.0 requires enough space to store two full-size copies of the virtual machine swap file simultaneously. If there is not enough space on the datastore, you receive this error.
So the VMotion of a VM with 8GB of memory requires 8GB of free diskspace on the datastore.
I have not checked it, yet, but i can imagine that this is not the case when using vCenter Server 4.1.
This could really cause problems with large memory VMs or when vmotioning multiple VMs sharing the same datastore.
Solution:
Free up space on the datastore (SVmotion will still work as this does not move the VM, just make sure you have enough space for the temporarily delta files)
Workaround:
Since only the non-reserved memory uses the swap file, you can temporarily increase the memory reservation of the virtual machine and remove the reservation after the vMotion.