- args = [constants.XEN_CMD, "migrate", "-p", "%d" % port]
- if live:
- args.append("-l")
+ args = [constants.XEN_CMD, "migrate"]
+ if constants.XEN_CMD == constants.XEN_CMD_XM:
+ args.extend(["-p", "%d" % port])
+ if live:
+ args.append("-l")
+ elif constants.XEN_CMD == constants.XEN_CMD_XL:
+ cluster_name = ssconf.SimpleStore().GetClusterName()
+ args.extend(["-s", constants.XL_SSH_CMD % cluster_name])
+ args.extend(["-C", self._ConfigFileName(instance.name)])
+ else:
+ raise errors.HypervisorError("Unsupported xen command: %s" %
+ constants.XEN_CMD)
+