VMware justed added a new KB article about problems with Storage VMotion script:
Storage VMotion can fail for a virtual machine with the error message:
Failed to unstun VM after disk reparent.
The virtual machine is partially migrated and powered off. Generally, the virtual machine cannot be powered on again.
This issue affects:
- Virtual machines converted in-place (not deployed or cloned) from template virtual machines with compact disks.
- Virtual machines cloned from a virtual machine of the above type (as well as virtual machines cloned from those virtual machines, and so on).
- Virtual machines with disks created with the following command: vmkfstools -i <source> -d <destination>. ESX Server 3.5 does not support thin-provisioned (or sparse) disks.
- Virtual machines created through the SDK with at least one disk created using the RelocateSpec.transform parameter set to sparse. Again, ESX Server 3.5 does not support thin-provisioned disks.
This issue affects the above types of virtual machines because when a disk that is thin-provisioned, or is flat but was cloned from a virtual machine that thin-provisioned disks, is copied to the target datastore as part of Storage VMotion, the disk’s content ID (CID) value is not preserved (although the content of the disk is correctly copied). When the virtual machine attempts to open the disk, it notices the CID is different from what it expects and fails to resume because it believes the disk is corrupted. In reality, the disk is not corrupted, only the CID is incorrect. So not only does the virtual machine end up powered off, but it cannot be powered back on because the CID is still incorrect.
To identify and solve the problem download the scripts attached to the article!