#!/bin/bash

# Call the SM backend python program to reset the locks on all the VDIs that were on the
# host that has been declared dead

HOSTUUID=$2

IFS=","
for i in `xe pbd-list host-uuid=$HOSTUUID --minimal`
do
   SR=`xe pbd-param-get uuid=$i param-name=sr-uuid`  
   /opt/xensource/sm/resetvdis.py $HOSTUUID $SR 
done
