diff --git a/install.sh b/install.sh index d29e734f5f..075d381737 100755 --- a/install.sh +++ b/install.sh @@ -1018,6 +1018,7 @@ TM_SHARED_FILES="src/tm_mad/shared/clone \ src/tm_mad/shared/context \ src/tm_mad/shared/premigrate \ src/tm_mad/shared/postmigrate \ + src/tm_mad/shared/failmigrate \ src/tm_mad/shared/mvds \ src/tm_mad/shared/cpds" @@ -1028,6 +1029,7 @@ TM_FS_LVM_FILES="src/tm_mad/fs_lvm/clone \ src/tm_mad/fs_lvm/cpds \ src/tm_mad/fs_lvm/premigrate \ src/tm_mad/fs_lvm/postmigrate \ + src/tm_mad/fs_lvm/failmigrate \ src/tm_mad/fs_lvm/delete" TM_QCOW2_FILES="src/tm_mad/qcow2/clone \ @@ -1039,6 +1041,7 @@ TM_QCOW2_FILES="src/tm_mad/qcow2/clone \ src/tm_mad/qcow2/context \ src/tm_mad/qcow2/premigrate \ src/tm_mad/qcow2/postmigrate \ + src/tm_mad/qcow2/failmigrate \ src/tm_mad/qcow2/mvds \ src/tm_mad/qcow2/cpds" @@ -1051,6 +1054,7 @@ TM_SSH_FILES="src/tm_mad/ssh/clone \ src/tm_mad/ssh/context \ src/tm_mad/ssh/premigrate \ src/tm_mad/ssh/postmigrate \ + src/tm_mad/ssh/failmigrate \ src/tm_mad/ssh/mvds \ src/tm_mad/ssh/cpds" @@ -1063,6 +1067,7 @@ TM_DUMMY_FILES="src/tm_mad/dummy/clone \ src/tm_mad/dummy/context \ src/tm_mad/dummy/premigrate \ src/tm_mad/dummy/postmigrate \ + src/tm_mad/dummy/failmigrate \ src/tm_mad/dummy/mvds \ src/tm_mad/dummy/cpds" @@ -1076,6 +1081,7 @@ TM_VMFS_FILES="src/tm_mad/vmfs/clone \ src/tm_mad/vmfs/mvds \ src/tm_mad/vmfs/cpds \ src/tm_mad/vmfs/postmigrate \ + src/tm_mad/vmfs/failmigrate \ src/tm_mad/vmfs/premigrate" TM_LVM_FILES="src/tm_mad/lvm/clone \ @@ -1085,6 +1091,7 @@ TM_LVM_FILES="src/tm_mad/lvm/clone \ src/tm_mad/lvm/cpds \ src/tm_mad/lvm/premigrate \ src/tm_mad/lvm/postmigrate \ + src/tm_mad/lvm/failmigrate \ src/tm_mad/lvm/delete" TM_CEPH_FILES="src/tm_mad/ceph/clone \ @@ -1094,6 +1101,7 @@ TM_CEPH_FILES="src/tm_mad/ceph/clone \ src/tm_mad/ceph/cpds \ src/tm_mad/ceph/premigrate \ src/tm_mad/ceph/postmigrate \ + src/tm_mad/ceph/failmigrate \ src/tm_mad/ceph/delete" TM_DEV_FILES="src/tm_mad/dev/clone \ @@ -1103,6 +1111,7 @@ TM_DEV_FILES="src/tm_mad/dev/clone \ src/tm_mad/dev/cpds \ src/tm_mad/dev/premigrate \ src/tm_mad/dev/postmigrate \ + src/tm_mad/dev/failmigrate \ src/tm_mad/dev/delete" #------------------------------------------------------------------------------- diff --git a/src/tm_mad/ceph/failmigrate b/src/tm_mad/ceph/failmigrate new file mode 120000 index 0000000000..5928a42794 --- /dev/null +++ b/src/tm_mad/ceph/failmigrate @@ -0,0 +1 @@ +../common/failmigrate \ No newline at end of file diff --git a/src/tm_mad/common/failmigrate b/src/tm_mad/common/failmigrate new file mode 100755 index 0000000000..49ab4a881d --- /dev/null +++ b/src/tm_mad/common/failmigrate @@ -0,0 +1,29 @@ +#!/bin/bash + +# -------------------------------------------------------------------------- # +# Copyright 2002-2015, OpenNebula Project (OpenNebula.org), C12G Labs # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +#--------------------------------------------------------------------------- # +# FAILMIGRATE SOURCE DST remote_system_dir vmid dsid template +# - SOURCE is the host where the VM is running +# - DST is the host where the VM failed to be migrated +# - remote_system_dir is the path for the VM home in the system datastore +# - vmid is the id of the VM +# - dsid is the target datastore +# - template is the template of the VM in XML and base64 encoded + +# To access the vm_template you can use the xpath.rb utility. Check the +# datastore drivers for an example. + +exit 0 diff --git a/src/tm_mad/dev/failmigrate b/src/tm_mad/dev/failmigrate new file mode 120000 index 0000000000..5928a42794 --- /dev/null +++ b/src/tm_mad/dev/failmigrate @@ -0,0 +1 @@ +../common/failmigrate \ No newline at end of file diff --git a/src/tm_mad/dummy/failmigrate b/src/tm_mad/dummy/failmigrate new file mode 120000 index 0000000000..5928a42794 --- /dev/null +++ b/src/tm_mad/dummy/failmigrate @@ -0,0 +1 @@ +../common/failmigrate \ No newline at end of file diff --git a/src/tm_mad/fs_lvm/failmigrate b/src/tm_mad/fs_lvm/failmigrate new file mode 120000 index 0000000000..5928a42794 --- /dev/null +++ b/src/tm_mad/fs_lvm/failmigrate @@ -0,0 +1 @@ +../common/failmigrate \ No newline at end of file diff --git a/src/tm_mad/lvm/failmigrate b/src/tm_mad/lvm/failmigrate new file mode 120000 index 0000000000..5928a42794 --- /dev/null +++ b/src/tm_mad/lvm/failmigrate @@ -0,0 +1 @@ +../common/failmigrate \ No newline at end of file diff --git a/src/tm_mad/qcow2/failmigrate b/src/tm_mad/qcow2/failmigrate new file mode 120000 index 0000000000..5928a42794 --- /dev/null +++ b/src/tm_mad/qcow2/failmigrate @@ -0,0 +1 @@ +../common/failmigrate \ No newline at end of file diff --git a/src/tm_mad/shared/failmigrate b/src/tm_mad/shared/failmigrate new file mode 120000 index 0000000000..5928a42794 --- /dev/null +++ b/src/tm_mad/shared/failmigrate @@ -0,0 +1 @@ +../common/failmigrate \ No newline at end of file diff --git a/src/tm_mad/ssh/failmigrate b/src/tm_mad/ssh/failmigrate new file mode 120000 index 0000000000..5928a42794 --- /dev/null +++ b/src/tm_mad/ssh/failmigrate @@ -0,0 +1 @@ +../common/failmigrate \ No newline at end of file diff --git a/src/tm_mad/vmfs/failmigrate b/src/tm_mad/vmfs/failmigrate new file mode 120000 index 0000000000..5928a42794 --- /dev/null +++ b/src/tm_mad/vmfs/failmigrate @@ -0,0 +1 @@ +../common/failmigrate \ No newline at end of file