Revision f5118ade lib/hypervisor/hv_xen.py

b/lib/hypervisor/hv_xen.py
402 402
    except EnvironmentError:
403 403
      logging.exception("Failure while removing instance config file")
404 404

  
405
  @classmethod
406
  def PowercycleNode(cls):
407
    """Xen-specific powercycle.
408

  
409
    This first does a Linux reboot (which triggers automatically a Xen
410
    reboot), and if that fails it tries to do a Xen reboot. The reason
411
    we don't try a Xen reboot first is that the xen reboot launches an
412
    external command which connects to the Xen hypervisor, and that
413
    won't work in case the root filesystem is broken and/or the xend
414
    daemon is not working.
415

  
416
    """
417
    try:
418
      cls.LinuxPowercycle()
419
    finally:
420
      utils.RunCmd(["xm", "debug", "R"])
421

  
405 422

  
406 423
class XenPvmHypervisor(XenHypervisor):
407 424
  """Xen PVM hypervisor interface"""

Also available in: Unified diff