try {
String result = connect(cmd.getName(), privateIp, cmdPort);
if (result != null) {
s_logger.error("Can not ping System vm " + vmName + "due to:" + result);
return new CheckSshAnswer(cmd, "Can not ping System vm " + vmName + "due to:" + result);
}
} catch (Exception e) {
s_logger.error("Can not ping System vm " + vmName + "due to exception");
return new CheckSshAnswer(cmd, e);
}
if (s_logger.isDebugEnabled()) {
s_logger.debug("Ping command port succeeded for vm " + vmName);
}
if (VirtualMachineName.isValidRouterName(vmName)) {
if (s_logger.isDebugEnabled()) {
s_logger.debug("Execute network usage setup command on " + vmName);
}
networkUsage(privateIp, "create", null);
}
return new CheckSshAnswer(cmd);
}