--- /dev/null
+#!/bin/bash
+
+set -e
+set -x
+#filename=$1
+#exec 3<$filename
+tempfile=`mktemp`
+exec 3<"$1"
+ssh -k root@xh8.mit.edu 'pvdisplay -m /dev/mapper/22*' > $tempfile
+while read -u 3 machine; do
+ echo $machine
+ disk=/dev/xenvg/d_${machine}_hda
+ if grep -q $disk $tempfile; then
+ host=`ssh -k root@xvm.mit.edu remctl xvm-remote control $machine listhost`
+ if [ -n $host ]; then
+ scp do-move.sh root@$host:/tmp/
+ ssh root@$host chmod +x /tmp/do-move.sh
+ ssh root@$host /tmp/do-move.sh $machine
+ sleep 10
+ fi
+ fi
+done
+