REBOOT_RETRY_COUNT = 60
REBOOT_RETRY_INTERVAL = 10
+ ANCILLARY_FILES = [
+ '/etc/xen/xend-config.sxp',
+ '/etc/xen/scripts/vif-bridge',
+ ]
+
@classmethod
def _WriteConfigFile(cls, instance, block_devices):
"""Write the Xen config file for the instance.
except EnvironmentError:
logging.exception("Failure while removing instance config file")
+ @classmethod
+ def PowercycleNode(cls):
+ """Xen-specific powercycle.
+
+ This first does a Linux reboot (which triggers automatically a Xen
+ reboot), and if that fails it tries to do a Xen reboot. The reason
+ we don't try a Xen reboot first is that the xen reboot launches an
+ external command which connects to the Xen hypervisor, and that
+ won't work in case the root filesystem is broken and/or the xend
+ daemon is not working.
+
+ """
+ try:
+ cls.LinuxPowercycle()
+ finally:
+ utils.RunCmd(["xm", "debug", "R"])
+
class XenPvmHypervisor(XenHypervisor):
"""Xen PVM hypervisor interface"""
class XenHvmHypervisor(XenHypervisor):
"""Xen HVM hypervisor interface"""
+ ANCILLARY_FILES = XenHypervisor.ANCILLARY_FILES + \
+ [constants.VNC_PASSWORD_FILE]
+
PARAMETERS = {
constants.HV_ACPI: hv_base.NO_CHECK,
constants.HV_BOOT_ORDER: (True, ) + \