Revision 0625d08f lib/hypervisor/hv_xen.py

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