vMotion fails at 19% with "Operation Timed out" error due to locked .vmx file
search cancel

vMotion fails at 19% with "Operation Timed out" error due to locked .vmx file

book

Article ID: 419305

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware Telco Cloud Platform

Issue/Introduction

  • Virtual machine vMotion fails at 19% with the task error "Operation Timed out"

  • Attempts to power off the virtual machine also fail, preventing cold migration, though virtual machines in other datastores are unaffected.

  • The source ESXi host /var/run/log/hostd.log reports migration start request timeouts:
    info hostd[####] [Originator@#### sub=Vmsvc.vm:/vmfs/volumes/<datastore-uuid>/<vm-name>/<vm-name>.vmx opID=lro-<opid>] VigorMigrateNotifyCb:: hostlog state changed from emigrating to failure
    info hostd[####] [Originator@#### sub=Vcsvc.VMotionSrc.######### opID=lro-<opid>] ResolveCb: VMX reports needsUnregister = false for migrateType MIGRATE_TYPE_VMOTION
    info hostd[####] [Originator@#### sub=Vcsvc.VMotionSrc.######### opID=lro-<opid>] ResolveCb: Failed with fault: (vim.fault.GenericVmConfigFault) {
    -->    faultMessage = (vmodl.LocalizableMessage) [
    -->       (vmodl.LocalizableMessage) {
    -->          key = "msg.migrate.expired",
    -->          message = "Timed out waiting for migration start request.
  • The destination ESXi host /var/run/log/vmkernel.log indicates a file lock on the .vmx file:
    cpu9:#### opID=<opid>)DLX: 2651: vol '<Datastore-name>', lock at ####: Lock type: 10C00001. owner(s) MAC: ##:##:##:##:##:##
    cpu9:#### opID=<opid>)[type 10c00001 offset 424550400 v 240, hb offset 3571712
    gen 51, mode 1, owner ########-########-####-############ mtime 4230711
    num 0 gblnum 0 gblgen 0 gblbrk 0] alloc owner 0
    cpu9:#### opID=<opid>)Fil3: 5037: Lock failed on file: <vm-name>.vmx on vol '<Datastore-name>' with FD: <FD c38 r65>

  • The destination ESXi host /var/run/log/hostd.log shows invalid state and timeout faults:
    warning hostd[####] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<datastore-uuid>/<vm-name>/<vm-name>.vmx opID=<opid> user=vpxuser:<user-name>] GetWid: cancel failed: N3Vim5Fault12InvalidState9ExceptionE(Fault cause: vim.fault.InvalidState
    warning hostd[####] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<datastore-uuid>/<vm-name>/<vm-name>.vmx opID=<opid> user=vpxuser:<user-name>] GetWid: Launch failed with fault: (vim.fault.Timedout) {
    -->    msg = "",
    --> }
    error hostd[####] [Originator@6876 sub=Vcsvc.VMotionDst.########## opID=<opid> user=vpxuser:<user-name>] Initiate: Failed to get the WID

  • The virtual machine's /vmfs/volumes/<datastore-uuid>/<vm-name>/vmware.log file records the expired migration request:
    In(05) vmx - MigrateWriteHostLog: Writing to log file took 672230 us.
    In(05) vmx - MigrateSetStateFinished: type=1 new state=6
    In(05) vmx - MigrateSetState: Transitioning from state 1 to 6.
    No(00) vmx - ConfigDB: Setting config.readOnly = "FALSE"
    In(05) vmx - Migrate_SetFailureMsgList: switching to new log file.
    In(05) vmx - Migrate_SetFailureMsgList: Now in new log file.
    In(05) vmx - Migrate: Caching migration error message list:
    In(05) vmx - [msg.migrate.expired] Timed out waiting for migration start request.
    In(05) vmx - Migrate: cleaning up migration state.
    In(05) vmx - MigrateSetState: Transitioning from state 6 to 0.

Environment

VMware vSphere 7.x

Cause

A storage-level lock (ATS or SCSI-2) on the .vmx file is held or contested, which exceeds the 90-second timeout for migration start requests.

Resolution

Follow the below steps to resolve the issue,

  1. Perform a Storage vMotion to migrate the virtual machine to a different datastore while powered on.

  2. If the issue persists, log in to the ESXi host CLI as root.

  3. Obtain the Virtual Machine ID by running the following command:
    vim-cmd vmsvc/getallvms

  4. Note the VM ID of the affected virtual machine.

  5. Power off the virtual machine by running:
    vim-cmd vmsvc/power.off <ID>

  6. Reattempt the vMotion.

  7. Power on the virtual machine.

Additional Information

If the Storage vMotion continues to fail, contact storage vendor to investigate potential VAAI/ATS issues on the underlying array.