From 6555373d341c2652d0ad119479d586a0026b049b Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Mon, 17 Oct 2011 12:05:00 +0100 Subject: [PATCH] xen: changes to facilitate "xl" support (xen 4.1) - Copy the xl config file, in case there's any - Start instances by config file, not name (also xm compatible) - Start paused domains with -p and not --paused (also xm compatible) - Add a fixme for migration (changes are not xm compatible) Signed-off-by: Guido Trotter <ultrotter@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/hypervisor/hv_xen.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/hypervisor/hv_xen.py b/lib/hypervisor/hv_xen.py index 33491854d..d2638f94c 100644 --- a/lib/hypervisor/hv_xen.py +++ b/lib/hypervisor/hv_xen.py @@ -47,6 +47,7 @@ class XenHypervisor(hv_base.BaseHypervisor): ANCILLARY_FILES = [ "/etc/xen/xend-config.sxp", + "/etc/xen/xl.conf", "/etc/xen/scripts/vif-bridge", ] @@ -200,8 +201,8 @@ class XenHypervisor(hv_base.BaseHypervisor): self._WriteConfigFile(instance, block_devices) cmd = [constants.XEN_CMD, "create"] if startup_paused: - cmd.extend(["--paused"]) - cmd.extend([instance.name]) + cmd.extend(["-p"]) + cmd.extend([self._ConfigFileName(instance.name)]) result = utils.RunCmd(cmd) if result.failed: @@ -445,6 +446,11 @@ class XenHypervisor(hv_base.BaseHypervisor): raise errors.HypervisorError("Remote host %s not listening on port" " %s, cannot migrate" % (target, port)) + # FIXME: migrate must be upgraded for transitioning to "xl" (xen 4.1). + # -l doesn't exist anymore + # -p doesn't exist anymore + # -C config_file must be passed + # ssh must recognize the key of the target host for the migration args = [constants.XEN_CMD, "migrate", "-p", "%d" % port] if live: args.append("-l") -- GitLab