Revision 0625d08f

b/lib/constants.py
267 267
XEN_BOOTLOADER = _autoconf.XEN_BOOTLOADER
268 268
XEN_KERNEL = _autoconf.XEN_KERNEL
269 269
XEN_INITRD = _autoconf.XEN_INITRD
270
XEN_CMD = "xm"
270
XEN_CMD_XM = "xm"
271
XEN_CMD_XL = "xl"
272
# FIXME: This will be made configurable using hvparams in Ganeti 2.7
273
XEN_CMD = _autoconf.XEN_CMD
271 274

  
272 275
KVM_PATH = _autoconf.KVM_PATH
273 276
KVM_KERNEL = _autoconf.KVM_KERNEL
b/lib/hypervisor/hv_xen.py
537 537
                                   " %s, cannot migrate" % (target, port))
538 538

  
539 539
    # FIXME: migrate must be upgraded for transitioning to "xl" (xen 4.1).
540
    #  -l doesn't exist anymore
541
    #  -p doesn't exist anymore
542
    #  -C config_file must be passed
540
    #        This should be reworked in Ganeti 2.7
543 541
    #  ssh must recognize the key of the target host for the migration
544
    args = [constants.XEN_CMD, "migrate", "-p", "%d" % port]
545
    if live:
546
      args.append("-l")
542
    args = [constants.XEN_CMD, "migrate"]
543
    if constants.XEN_CMD == constants.XEN_CMD_XM:
544
      args.extend(["-p", "%d" % port])
545
      if live:
546
        args.append("-l")
547
    elif constants.XEN_CMD == constants.XEN_CMD_XL:
548
      args.extend(["-C", self._ConfigFileName(instance.name)])
549
    else:
550
      raise errors.HypervisorError("Unsupported xen command: %s" %
551
                                   constants.XEN_CMD)
552

  
547 553
    args.extend([instance.name, target])
548 554
    result = utils.RunCmd(args)
549 555
    if result.failed:

Also available in: Unified diff