コード例 #1
0
  @Override
  public void runColdRebootVms(List<Guid> vmIds) {
    for (Guid vmId : vmIds) {
      AuditLogableBase event = new AuditLogableBase();
      event.setVmId(vmId);
      auditLogDirector.log(event, AuditLogType.COLD_REBOOT_VM_DOWN);

      log.info(
          "VM is down as a part of cold reboot process. Attempting to restart. VM Name '{}', VM Id '{}",
          event.getVmName(),
          vmId);
    }

    coldRebootAutoStartVmsRunner.addVmsToRun(vmIds);
  }
コード例 #2
0
  @Override
  public void runFailedAutoStartVMs(List<Guid> vmIds) {
    for (Guid vmId : vmIds) {
      // Alert that the virtual machine failed:
      AuditLogableBase event = new AuditLogableBase();
      event.setVmId(vmId);
      auditLogDirector.log(event, AuditLogType.HA_VM_FAILED);

      log.info(
          "Highly Available VM went down. Attempting to restart. VM Name '{}', VM Id '{}'",
          event.getVmName(),
          vmId);
    }

    haAutoStartVmsRunner.addVmsToRun(vmIds);
  }