vMOTION (including Storage vMOTION) Fails Migrating from ESXi 5.5 to ESXi 6.0 U1

VMware

When attempting to migrate a VM from VMware ESXi 5.5. to ESXi 6.0 U1 you may experience problems, this does not affect all VMs only some and they are typically VMs that have been backed up using an external backup tool and make use of CBT (Change Block Tracking). A bug within ESX 5.5 or ESXi 6.0 U1 is present and attempting to storage vMOTION from a 5.5 ESXi host to a 6.0 U1 tickles this bug and causes the vMOTION to fail with an error such as the following:

Cannot migrate to <hostname>
vMOTION migration [GUID of Task] failed to read stream keepalive: Connection closed by remove host, possibly due to timeout
Failed waiting for data. Error 195887167. Connection closed by remote host, possibly due to timeout.

Looking within the vmware.log stored with the VMDKs for the VM on your virtualisation storage you’ll see something like:

2017-05-25T11:02:27.345Z| vmx| I120: [msg.svmotion.mirror.thread.remote.disk.setup.fail] Failed to set up disks on the destination host.
2017-05-25T11:02:27.345Z| vmx| I120: [msg.svmotion.fail.platform] Failed to copy one or more of the virtual machine's disks. See the virtual machine's log for more details.

2017-05-25T11:02:27.345Z| vmx| I120: [msg.svmotion.mirror.thread.remote.disk.setup.fail] Failed to set up disks on the destination host.2017-05-25T11:02:27.345Z| vmx| I120: [msg.svmotion.fail.platform] Failed to copy one or more of the virtual machine’s disks. See the virtual machine’s log for more details.

cls 
#Import VMware PowerCLI Snapin 
if ( (Get-PSSnapin -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue) -eq $null ) 
{ 
 Add-PsSnapin VMware.VimAutomation.Core 
} 
$vCenterServer = "Vcenter-server-name" 
$VMName ="VMName" 
$mute = Connect-VIServer $vCenterServer -WarningAction SilentlyContinue 
$VMs = get-vm -Name "$VMName" 
#Create a VM Specification to apply with the desired setting: 
$spec = New-Object VMware.Vim.VirtualMachineConfigSpec  
$spec.ChangeTrackingEnabled = $false 
#Apply the specification to each VM, then create and remove a snapshot: 
foreach($vm in $VMs){  
    $vm.ExtensionData.ReconfigVM($spec)  
    $snap=$vm | New-Snapshot -Name 'Disable CBT'  
    $snap | Remove-Snapshot -confirm:$false 
} 
Disconnect-VIServer * -Confirm:$false

The process for allowing you to migrate the problem is as shown below. The script sets the CBT disable flag, then creates a snapshot and removes it immediately afterwards to force an update of the VMX file, when run in enable mode it sets the CBT disable flag and then creates a snapshot and removes it immediately afterwards to force an update of the VMX file.

  1. Run the script above in disable mode to turn off CBT.
  2. vMOTION the VM, you should find this works as expected now.
  3. Run the script above in enable mode to turn on CBT.