Commit 6555373d authored by Guido Trotter's avatar Guido Trotter
Browse files

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: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent c2be2532
......@@ -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")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment