class AutonomiccsSystemVmDeploymentService implements InitializingBean {

    protected void waitUntilTheAutonomiccsSystemVmIsUpAndRunning(AutonomiccsSystemVm autonomiccsSystemVm) {
        for (int i = 0; i < 100; i++) {
            logger.debug("Checking for the %d time(s) if the system VM [name=%s], [id=%d] is reachable ", i, autonomiccsSystemVm.getInstanceName(), autonomiccsSystemVm.getId());
            if (hostUtils.isHostReachable(autonomiccsSystemVm.getManagementIpAddress())) {
                logger.info("The system VM [name=%s], [id=%d] is reachable after %d tries.", autonomiccsSystemVm.getInstanceName(), autonomiccsSystemVm.getId(), i);
                break;
            }
            threadUtils.sleepThread(5);
        }
        if (!hostUtils.isHostReachable(autonomiccsSystemVm.getManagementIpAddress())) {
            throw new CloudRuntimeException(String.format("The system VM [name=%s], [id=%d] is not reachable, maybe a problem has happened while starting it.",
                    autonomiccsSystemVm.getInstanceName(),
                    autonomiccsSystemVm.getId()));
        }
    }

}