diff --git a/lib/constants.py b/lib/constants.py
index 96454e7ab9ee40c2e448fffe9198e22da8f9caaf..049b0783e2c05e3ade6c37f6ec46499d49eb0a8b 100644
--- a/lib/constants.py
+++ b/lib/constants.py
@@ -165,7 +165,6 @@ XEN_INITRD = _autoconf.XEN_INITRD
 
 KVM_PATH = _autoconf.KVM_PATH
 SOCAT_PATH = _autoconf.SOCAT_PATH
-KVM_MIGRATION_PORT = _autoconf.KVM_MIGRATION_PORT
 
 VALUE_DEFAULT = "default"
 VALUE_AUTO = "auto"
diff --git a/lib/hypervisor/hv_kvm.py b/lib/hypervisor/hv_kvm.py
index 6da5bd5941d71fab69bf07ee39a4bd596b011983..eee6fe10c2bea3c93501dc8ad5b278772de9d7f3 100644
--- a/lib/hypervisor/hv_kvm.py
+++ b/lib/hypervisor/hv_kvm.py
@@ -592,7 +592,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
 
     """
     kvm_runtime = self._LoadKVMRuntime(instance, serialized_runtime=info)
-    incoming_address = (target, constants.KVM_MIGRATION_PORT)
+    incoming_address = (target, instance.hvparams[constants.HV_MIGRATION_PORT])
     self._ExecuteKVMRuntime(instance, kvm_runtime, incoming=incoming_address)
 
   def FinalizeMigration(self, instance, info, success):
@@ -631,8 +631,8 @@ class KVMHypervisor(hv_base.BaseHypervisor):
     if not live:
       self._CallMonitorCommand(instance_name, 'stop')
 
-    migrate_command = ('migrate -d tcp:%s:%s' %
-                       (target, constants.KVM_MIGRATION_PORT))
+    port = instance.hvparams[constants.HV_MIGRATION_PORT]
+    migrate_command = 'migrate -d tcp:%s:%s' % (target, port)
     self._CallMonitorCommand(instance_name, migrate_command)
 
     info_command = 'info migrate'
diff --git a/lib/hypervisor/hv_xen.py b/lib/hypervisor/hv_xen.py
index 5a4eb6462bad032d128cc9fb9a91787939b021fe..e29d4cab99aa4eb504f5db1d8dfdc794926b2f42 100644
--- a/lib/hypervisor/hv_xen.py
+++ b/lib/hypervisor/hv_xen.py
@@ -402,7 +402,8 @@ class XenHypervisor(hv_base.BaseHypervisor):
     """
     if self.GetInstanceInfo(instance.name) is None:
       raise errors.HypervisorError("Instance not running, cannot migrate")
-    args = ["xm", "migrate"]
+    port = instance.hvparams[constants.HV_MIGRATION_PORT]
+    args = ["xm", "migrate", "-p", "%d" % port]
     if live:
       args.append("-l")
     args.extend([instance.name, target])