1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-23 17:33:56 +03:00

Bug #2467: live migration in xen4

(cherry picked from commit 563168e1eb)
This commit is contained in:
Jaime Melis 2013-11-19 12:55:30 +01:00
parent 5fb9fc931e
commit cf717232f6
4 changed files with 34 additions and 3 deletions

View File

@ -791,7 +791,7 @@ VMM_EXEC_KVM_SCRIPTS="src/vmm_mad/remotes/kvm/cancel \
VMM_EXEC_XEN3_SCRIPTS="src/vmm_mad/remotes/xen/cancel \ VMM_EXEC_XEN3_SCRIPTS="src/vmm_mad/remotes/xen/cancel \
src/vmm_mad/remotes/xen/deploy \ src/vmm_mad/remotes/xen/deploy \
src/vmm_mad/remotes/xen/xen3/xenrc \ src/vmm_mad/remotes/xen/xen3/xenrc \
src/vmm_mad/remotes/xen/migrate \ src/vmm_mad/remotes/xen/xen3/migrate \
src/vmm_mad/remotes/xen/restore \ src/vmm_mad/remotes/xen/restore \
src/vmm_mad/remotes/xen/reboot \ src/vmm_mad/remotes/xen/reboot \
src/vmm_mad/remotes/xen/reset \ src/vmm_mad/remotes/xen/reset \
@ -809,7 +809,7 @@ VMM_EXEC_XEN3_SCRIPTS="src/vmm_mad/remotes/xen/cancel \
VMM_EXEC_XEN4_SCRIPTS="src/vmm_mad/remotes/xen/cancel \ VMM_EXEC_XEN4_SCRIPTS="src/vmm_mad/remotes/xen/cancel \
src/vmm_mad/remotes/xen/deploy \ src/vmm_mad/remotes/xen/deploy \
src/vmm_mad/remotes/xen/xen4/xenrc \ src/vmm_mad/remotes/xen/xen4/xenrc \
src/vmm_mad/remotes/xen/migrate \ src/vmm_mad/remotes/xen/xen4/migrate \
src/vmm_mad/remotes/xen/restore \ src/vmm_mad/remotes/xen/restore \
src/vmm_mad/remotes/xen/reboot \ src/vmm_mad/remotes/xen/reboot \
src/vmm_mad/remotes/xen/reset \ src/vmm_mad/remotes/xen/reset \

View File

@ -0,0 +1,30 @@
#!/bin/bash
# -------------------------------------------------------------------------- #
# Copyright 2002-2013, 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. #
#--------------------------------------------------------------------------- #
source $(dirname $0)/xenrc
source $(dirname $0)/../../scripts_common.sh
deploy_id=$1
dest_host=$2
USERNAME=$(whoami)
CMD="$SSH $dest_host $XM_MIGRATE_RECEIVE"
CMD="$XM_MIGRATE -s \"su - $USERNAME -c '$CMD'\" $deploy_id $dest_host"
multiline_exec_and_log "$CMD" "Could not migrate $deploy_id to $dest_host"

View File

@ -20,7 +20,8 @@ export XM_PATH="/usr/sbin/xl"
export XM_CANCEL="sudo $XM_PATH destroy" export XM_CANCEL="sudo $XM_PATH destroy"
export XM_CREATE="sudo $XM_PATH create" export XM_CREATE="sudo $XM_PATH create"
export XM_CREDITS="sudo $XM_PATH sched-cred" export XM_CREDITS="sudo $XM_PATH sched-cred"
export XM_MIGRATE="sudo $XM_PATH migrate -l" export XM_MIGRATE="sudo $XM_PATH migrate"
export XM_MIGRATE_RECEIVE="sudo $XM_PATH migrate-receive"
export XM_SAVE="sudo $XM_PATH save" export XM_SAVE="sudo $XM_PATH save"
export XM_REBOOT="sudo $XM_PATH reboot" export XM_REBOOT="sudo $XM_PATH reboot"
export XM_RESET="sudo $XM_PATH reset" export XM_RESET="sudo $XM_PATH reset"