[xenpreview-dev] migration fails after about 1024 times

Fraser Campbell fraser at georgetown.wehave.net
Tue Mar 28 07:03:15 MST 2006


Set up a small domU so that migration is fast (I gave 64MB).

Set up 2 Xen hosts with shared storage, I used loopback on OCFS2 for 
storage but I have observed same issue using NFS root storage.

Start domU on one host, initiate script on both hosts that looks for 
specific domU and immediately migrates it once it sees it running.

Migration will always fail after about 1,024 times, worse one of the 
dom0 which is migrating the domain away will crash.  I say about 1,024 
because it's such a nice number, domain ID will vary from 1,019 to 1023 
on the surviving host. This means that between 1,019 and 1,022 
migrations have succeeded ... this is all from a clean boot of dom0.

This problem has existed for quite a while, I have seen it on much older 
Xen versions.  I reported the problem to Xensource and to the xen-users 
list 
(http://lists.xensource.com/archives/html/xen-users/2006-02/msg00003.html) 
but haven't had any feedback.

Here's the version info from SuSE xen package that I am using:

   xen_major              : 3
   xen_minor              : 0
   xen_extra              : _9172-4
   xen_caps               : xen-3.0-x86_32
   platform_params        : virt_start=0xfc000000

I am concerned that this crash is so reproducible and can crash a dom0, 
we wouldn't do this in production but it suggests some lack of robustness.

Thanks,
Fraser
-------------- next part --------------
#!/bin/bash
usage() {
  echo 'Usage: migrator <guest> <target-host>'
}
guest=$1
host=$2

[ -z "$host" ] && {
  usage
  exit 1
}

while true ; do
  LIST=`xm list | grep ^${guest}\   2> /dev/null`
  if [ -n "$LIST" ]; then
    STATE=`echo $LIST | awk '{print $5}'|sed -e 's|-||g'`
    # Only migrate if in running or blocked state
    if [ "$STATE" == 'b' -o "$STATE" == 'r' ]; then
      start=`date +%s`
      xm migrate -l $guest $host
      end=`date +%s`
      echo Migrated $guest to $host in `expr $end - $start` seconds \($end\)
    fi 
  fi
  sleep 1
done


More information about the xenpreview-dev mailing list