Feature #4292

add possibility to live migrate via another interface

Added by Anton Todorov over 5 years ago.

Status:PendingStart date:01/15/2016
Priority:NormalDue date:
Assignee:-% Done:


Category:Drivers - VM
Target version:-
Resolution: Pull request:83



Here is a feature request and suggested solution to extend the live migration to be completed via another interface.

It is known that OpenNebula uses default hostname of the host to build the remote execution tasks. And it is common the hosts's hostname to resolve to a "management" interface. Which is usually 1G (even 100M sometimes).

The proposed change add possibility to do live migrations via other "hostname". technically speaking - the hostname with appended constant string which is resolved via DNS or the hosts file to another interface (for example 10g). The constant string is defined in the `kvmrc` file so if not defined everything is working without changes.

pull request https://github.com/OpenNebula/one/pull/83

diff --git a/src/vmm_mad/remotes/kvm/migrate b/src/vmm_mad/remotes/kvm/migrate
index 178748c..b234ca1 100755
--- a/src/vmm_mad/remotes/kvm/migrate
+++ b/src/vmm_mad/remotes/kvm/migrate
@@ -22,5 +22,5 @@ source $(dirname $0)/../../scripts_common.sh

-exec_and_log "virsh --connect $LIBVIRT_URI migrate --live $MIGRATE_OPTIONS $deploy_id $QEMU_PROTOCOL://$dest_host/system" \
+exec_and_log "virsh --connect $LIBVIRT_URI migrate --live $MIGRATE_OPTIONS $deploy_id $QEMU_PROTOCOL://$dest_host/system tcp:$dest_host$DEST_HOST_APP
END" \
     "Could not migrate $deploy_id to $dest_host" 
diff --git a/src/vmm_mad/remotes/kvm/migrate_local b/src/vmm_mad/remotes/kvm/migrate_local
index 22107d6..7da01e3 100755
--- a/src/vmm_mad/remotes/kvm/migrate_local
+++ b/src/vmm_mad/remotes/kvm/migrate_local
@@ -23,5 +23,5 @@ dest_host=$2

 virsh --connect $QEMU_PROTOCOL://$src_host/system \
-    migrate --live $deploy_id $QEMU_PROTOCOL://$dest_host/system
+    migrate --live $deploy_id $QEMU_PROTOCOL://$dest_host/system tcp:$dest_host$DEST_HOST_APPEND

Also available in: Atom PDF