class ConfigurationServerImpl extends ManagerBase implements ConfigurationServer {

    @DB
    protected void updateSystemvmPassword() {
        String userid = System.getProperty("user.name");
        if (!userid.startsWith("cloud")) {
            return;
        }

        if (!Boolean.valueOf(_configDao.getValue("system.vm.random.password"))) {
            return;
        }

        String already = _configDao.getValue("system.vm.password");
        if (already == null) {
            TransactionLegacy txn = TransactionLegacy.currentTxn();
            try {
                String rpassword = _mgrService.generateRandomPassword();
                String wSql = "INSERT INTO `cloud`.`configuration` (category, instance, component, name, value, description) "
                + "VALUES ('Secure','DEFAULT', 'management-server','system.vm.password', ?,'randmon password generated each management server starts for system vm')";
                PreparedStatement stmt = txn.prepareAutoCloseStatement(wSql);
                stmt.setString(1, DBEncryptionUtil.encrypt(rpassword));
                stmt.executeUpdate();
                s_logger.info("Updated systemvm password in database");
            } catch (SQLException e) {
                s_logger.error("Cannot retrieve systemvm password", e);
            }
        }

    }

    public  ConfigurationServerImpl();

}