When multiple VMs migrate concurrently, vmkernel.log lacks human-readable VM names and relies only on process markers, making log analysis difficult.
This article provides guidance on analyzing ESXi vmkernel.log, hostd.log, and a virtual machine's vmware.log to determine which specific virtual machine (VM) was migrated during a vMotion event.
VMware vSphere 8.x
When analyzing vMotion events directly from host logs, the explicit VM name is often omitted in early migration stages. Instead, logs identify the operation using internal process markers such as vmmLeaderID or World ID.
To identify the migrated virtual machine and trace its vMotion history, perform the following log correlation steps:
Step 1: Verify the vMotion Trigger Logs on Source and Destination ESXi Hosts (/var/run/log/vmkernel.log)
When a vMotion operation is initiated, both the source and destination ESXi hosts generate migration entries in their respective vmkernel.log files. These entries share a unique timestamp token (ts) and reference the Virtual Machine Monitor leader ID (vmmLeaderID).
Source Host vmkernel.log Example:
| ####-##-##T##:##:##.###Z In() vmkernel: cpu## opID=d5991c6f)Migrate: 314: vmotion: Source vmmLeaderID = <ex. 2118927>, ts = <ex. 7182955985622810397>, srcIP = <xx.xx.xx.xx> dstIP = <yy.yy.yy.yy> Dest wid = <ex. 2109446> using SHARED swap, encrypted |
Destination Host vmkernel.log Example:
| ####-##-##T##:##:##.###Z In() vmkernel: cpu## )Migrate: 314: vmotion: Dest vmmLeaderID = <ex. 2109446>, ts =<ex. 7182955985622810397>, srcIP = <xx.xx.xx.xx> dstIP = <yy.yy.yy.yy> Dest wid = 0 using SHARED swap, encrypted |
Because the ts token is globally unique to this specific vMotion session, you can use text filtering tools like 'grep' to isolate and view only the logs relevant to this migration stream.
Command Example:
| grep "7182955985622810397" /var/run/log/vmkernel.log |
Step 2: Validate the World ID Mapping via the VM Log (/vmfs/volume/<DatastorePath>/vmware.log)
To discover which virtual machine owns the vmmLeaderID initialized on the destination host, review the vmware.log file located inside the specific VM's datastore directory.
When a VM boots, it lists the World ID for each of its vCPUs. The World ID of the first vCPU (vcpu-0) serves as the VMM Leader ID, which in this example is 2109446, as shown below:
####-##-##T##:##:##.###Z In() vcpu-0 - VMMon_Start: vcpu-0: worldID=<ex. 2109446> ... |
Step 3: Identify the VM Name and Path via Host Daemon Logs (/var/run/log/hostd.log)
During the final cutover phase of vMotion, the VM state changes are captured by the host daemon (hostd). The hostd.log provides the human-readable VM name and the exact path to its .vmx configuration file.
Source Host hostd.log Example:
####-##-##T##:##:##.###Z In() Hostd[]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<DatastorePath>/<VMName>/<VMName>.vmx] State Transition (VM_STATE_ON -> VM_STATE_EMIGRATING) ####-##-##T##:##:##.###Z In() Hostd[]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<DatastorePath>/<VMName>/<VMName>.vmx] State Transition (VM_STATE_EMIGRATING -> VM_STATE_OFF) ####-##-##T##:##:##.###Z In() Hostd[]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<DatastorePath>/<VMName>/<VMName>.vmx] State Transition (VM_STATE_OFF -> VM_STATE_UNREGISTERING) ####-##-##T##:##:##.###Z In() Hostd[]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<DatastorePath>/<VMName>/<VMName>.vmx] State Transition (VM_STATE_UNREGISTERING -> VM_STATE_GONE) |
Destination Host hostd.log Example:
####-##-##T##:##:##.###Z In() Hostd[]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<DatastorePath>/<VMName>/<VMName>.vmx opID=## sid=## user=vpxuser:VSPHERE.LOCAL\Administrator] State Transition (VM_STATE_INITIALIZING -> VM_STATE_OFF) ####-##-##T##:##:##.###Z In() Hostd[]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<DatastorePath>/<VMName>/<VMName>.vmx opID=## sid=## user=vpxuser:VSPHERE.LOCAL\Administrator] State Transition (VM_STATE_OFF -> VM_STATE_IMMIGRATING) ####-##-##T##:##:##.###Z In() Hostd[]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<DatastorePath>/<VMName>/<VMName>.vmx] State Transition (VM_STATE_IMMIGRATING -> VM_STATE_ON) ####-##-##T##:##:##.###Z In() Hostd[]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<DatastorePath>/<VMName>/<VMName>.vmx opID=## sid=## user=vpxuser:<no user>] State Transition (VM_STATE_ON -> VM_STATE_RECONFIGURING) ####-##-##T##:##:##.###Z In() Hostd[]: [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/<DatastorePath>/<VMName>/<VMName>.vmx opID=## sid=## user=vpxuser:<no user>] State Transition (VM_STATE_RECONFIGURING -> VM_STATE_ON) |