Johnny Zhang
Each ESX server will keep a list of VMotion history since it first boot up. You can find that by
cat /proc/vmware/migration/history
It will show you if the VM was migrated to this host or from this host. In my case VM1244 is migrated from this host to host 10.21.51.133. This IP is the VMotion IP address. The VMotion id is a very important part. Both hosts involved in the VMotion will have the same VMotion id. So you can track the VM from one host to another by using this id.
For example, my VMotion id is 1253064812716632. So I can use this against vmkernel logs on both hosts
On the source:
grep 1253064812716632 vmkernel
From the log we can see:
src ip = <10.21.51.132> dest ip = <10.21.51.133> Dest wid = 1111. The source will always show both VMotion IP address for source and destination hosts, it will also show the new world ID for the VM on the new host, in this case 1111.
On destination:
grep 1253064812716632 vmkernel
On destination we see:
src ip = <10.21.51.132> dest ip = <0.0.0.0> Dest wid = -1 using SHARED swap
Note, the destination IP will always show 0.0.0.0 and world id -1. Another way for us to tell this is the destination host.
We will talk about more on how to track VMotion from other files.
0 Responses

Post a Comment