Problems with Storage VMotion

I’ve been using the new Storage VMotion functionality fairly heavily over the last couple of months.  I have encountered a couple of significant bugs whilst using it, which have resulted in corrupted VMDK files.  Here are my two tips when using Storage VMotion, to avoid the problems I have seen:

  • Ensure that you have sufficient space in the source datastore as Storage VMotion uses snapshots to transfer the VMDKs over.  This is a particular problem with large frequently changing VMs, e.g. database servers.  Large disks mean that the whole transfer can take several hours, and frequently changing data means large snapshot files.  If sufficient space is not available, the datastore can fill up, preventing any more data being written to the disks and causing the Storage VMotion to fail.  I would recommend you have empty space equivalent to the size of the VM’s disk files before you start.  VMFS extents are an excellent solution to this short term problem.
  • The other problem I have encountered occurs when the VM has its VMDK disk files spread across more than one datastore.  The operation begins successfully, but during the transfer the host gets confused and the process fails.  The disks have snapshots applied, but are corrupt.  Unfortunately, the only way to avoid this situation is to cold migrate all the VM’s files onto one datastore first.

Great care has to be taken to recover disks after a Storage VMotion failure, to avoid total data loss.