#!/bin/sh
DOMAIN=$1
EVENT=$2
PHASE=$3

if [ "x$EVENT" != "xmigrate" -a "x$EVENT" != "xrestore" ]; then
  # Return 0 and empty output for events that are not handled
  # by this hook.
  #
  # libvirt will use input XML without change and consider
  # it a success run according to the documentation.
  exit 0
fi

/usr/libexec/vdsm/vm_migrate_hook.py $DOMAIN $EVENT $PHASE
