vMotion of a virtual machine fails with the error: Virtual machine must be running in order to be migrated.
search cancel

vMotion of a virtual machine fails with the error: Virtual machine must be running in order to be migrated.

book

Article ID: 306553

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • Performing a vMotion on a virtual machine fails
  • The virtual machine is running and able to access console.
  • Error in Client: Virtual machine must be running in order to be migrated.
  • From ESXi host /var/log/hostd.log file:

    info 'vm:/vmfs/volumes/UUID/VMFolder/VM.vmx' opID=1DC6FA66-0000007D-2] State Transition (VM_STATE_ON -> VM_STATE_EMIGRATING)
    info 'vm:/vmfs/volumes/UUID/VMFolder/VM.vmx' opID=1DC6FA66-0000007D-2] VMotionPrepare (1316622150328125): Sending 'to' srcIp=<host IP> dstIp=<host IP>, type=1, encrypted=false, remoteThumbprint=
    info 'vm:/vmfs/volumes/UUID/VMFolder/VM.vmx'] VMotionCmdCb [1316622150328125] 'to': error -1: Virtual machine must be running in order to be migrated.
    info 'vm:/vmfs/volumes/UUID/VMFolder/VM.vmx'] VMotionCmdCb [1316622150328125] : Prepare task completed with error vmodl.fault.SystemError
    verbose 'vm:/vmfs/volumes/UUID/VMFolder/VM.vmx'] VMotionCmdCb: Firing ResolveCb
    info 'vm:/vmfs/volumes/UUID/VMFolder/VM.vmx'] State Transition (VM_STATE_EMIGRATING -> VM_STATE_ON)
    warning 'vm:/vmfs/volumes/UUID/VMFolder/VM.vmx'] Unable to get resource settings for a powered on VM
    info 'vm:/vmfs/volumes/UUID/VMFolder/VM.vmx'] VMotion cleanup completed
    verbose 'VMotionSrc (1343330562668941)' opID=C9DDFF31-00001526-cf-fd] Migration changed state from NONE to BEGIN
    verbose 'vm:/vmfs/volumes/UUID/VMFolder/VM.vmx'] VMotionCmdCb: Firing ResolveCb
    info 'VMotionSrc (1343330562668941)'] ResolveCb: VMX reports needsUnregister = false for migrateType MIGRATE_TYPE_VMOTION
    info 'VMotionSrc (1343330562668941)'] ResolveCb: Failed with fault: (vmodl.fault.SystemError) {
    dynamicType = <unset>,
    faultCause = (vmodl.MethodFault) null,
    reason = "Virtual machine must be running in order to be migrated.",
    msg = "",
    }

Environment

  • vSphere ESXi 7.x
  • vSphere ESXi 8.x
  • vCenter Server 7.x
  • vCenter Server 8.x

Cause

This is typically caused when the management agent is out of sync with vCenter server.

Resolution

To resolve this issue, restart the host management agent on source host and then retry the vMotion.
 
For more information on restarting management agents, see Restarting Management Agents in ESXi