vMotion or Storage vMotion of a VM fails with the error: The migration has exceeded the maximum switchover time of 100 second(s)
search cancel

vMotion or Storage vMotion of a VM fails with the error: The migration has exceeded the maximum switchover time of 100 second(s)

book

Article ID: 314376

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • Compute or Storage vMotion of a Virtual Machine fails at the last stage due to the following error:
    The migration has exceeded the maximum switchover time of 100 second(s). ESX has preemptively failed the migration to allow the VM to continue running on the source. To avoid this failure, either increase the maximum allowable switchover time or wait until the VM is performing a less intensive workload.

  • The following log entries are observed under the vmware.log for the affected virtual machine (Location: /vmfs/volumes/<Datastore_UUID>/<VM_Name>/vmware.log):

    YYYY-MM-DDTHH:MM:SS In(05) vmx - MigrateVMXdrToSpec: type: 1 srcIp=<<Source_ESX_Host_vMotion_interface-IP>> dstIp=<<Destination_ESX_Host_vMotion_interface-IP>> mid=########## uuid=f5######-####-####-####-#######g9 priority=no checksumMemory=no maxDowntime=0 latencyAware=yes diskOpFile= srcLogIp=<<unknown>> dstLogIp=<<unknown>> ftPrimaryIp=<<unknown>> ftSecondaryIp=<<unknown>>
    YYYY-MM-DDTHH:MM:SS In(05) vcpu-0 - Migrate: Caching migration error message list:
    YYYY-MM-DDTHH:MM:SS In(05) vcpu-0 - [msg.checkpoint.migration.maxSwitchoverTimeExceeded] The migration has exceeded the maximum switchover time of 100 second(s). ESX has preemptively failed the migration to allow the VM to continue running on the source.  To avoid this failure, either increase the maximum allowable switchover time or wait until the VM is performing a less intensive workload.
    YYYY-MM-DDTHH:MM:SS In(05) vcpu-0 - Msg_Post: Error
    YYYY-MM-DDTHH:MM:SS In(05) vcpu-0 - [msg.checkpoint.migration.maxSwitchoverTimeExceeded] The migration has exceeded the maximum switchover time of 100 second(s). ESX has preemptively failed the migration to allow the VM to continue running on the source.  To avoid this failure, either increase the maximum allowable switchover time or wait until the VM is performing a less intensive workload.
    YYYY-MM-DDTHH:MM:SS In(05) vcpu-0 - ----------------------------------------
    YYYY-MM-DDTHH:MM:SS Wa(03) vcpu-0 - MigrateWrite: failed: Maximum switchover time for migration exceeded
    YYYY-MM-DDTHH:MM:SS In(05) vcpu-0 - MigrateDumperWrite: MigrateWrite failed

Environment

vSphere ESXi 8.x

Cause

During vMotion, this issue occurs if the source host is unable to send the checkpoint data of the virtual machine and memory pages within the default time of maxSwitchoverSeconds (100 seconds) to the destination host. This happens because of network bandwidth and latency-related issues. By default, the timeout value of vmotion.maxSwitchoverSeconds is 100 seconds.

During Storage vMotion, this issue occurs if the host is unable to copy the swap file activity of the virtual machine within the default time of 100 seconds from the source datastore to the destination datastore. It also occurs if the source or destination datastore experiences performance-related issues due to heavy I/O activity.

Resolution

If this issue occurs during vMotion, ensure that there are no network related performance issues between the hosts.

For more information, refer:
To work around this issue, increase the value of the vmotion.maxSwitchoverSeconds parameter of the virtual machine from 100 to a larger number (up to a maximum of 135)
 
Option 1: Modify vmotion.maxSwitchoverSeconds via the vCenter Server UI
  1. Log in to the vSphere Client.
  2. Locate the virtual machine in the inventory.
  3. Power off the virtual machine.
  4. Right-click the virtual machine and select Edit Settings.
  5. Click the VM Options tab.
  6. Expand the Advanced section.
  1. Click the Edit Configuration button. (Note: The Configuration Parameters button is disabled when the virtual machine is powered on).
     
  2. From the Configuration Parameters window, click Add Configuration Params.
  1. In the Name field, enter the parameter name:
    vmotion.maxSwitchoverSeconds
     
  2. In the Value field, enter the new timeout value in seconds (for example: 135).
  3. Click OK.
  4. Power on the virtual machine.

Option 2: Modify vmotion.maxSwitchoverSeconds by editing the .vmx file manually

  1. Locate and edit the .vmx file of the virtual machine. (For more information, see Tips for editing a .vmx file). 
  2. To increase the timeout value to 135 seconds, add or modify this line in the .vmx file:
    vmotion.maxSwitchoverSeconds = "135"
  3. Save the file.
    (Note: To edit a virtual machine's configuration file safely, power off the virtual machine, remove it from the inventory, make the changes, add it back to the inventory, and then power it on. Or follow the article: Reloading a vmx file without removing the virtual machine from inventory)
If the issue occurs during Storage vMotion, ensure that there are no storage-related performance issues on the source and destination datastores. The failure also happens occasionally if the virtual machine has many virtual disks. In this scenario, modify the fsr.maxSwitchoverSeconds option.