private static Integer checkServerStopped(String hostName) throws Exception {
Command checkCmd = new Command(asadminCmd, "list-domains");
// checkCmd.setLogLevel(Command.STDOUT, Level.FINE);
// checkCmd.setLogLevel(Command.STDERR, Level.FINE);
CommandHandle handle = exec(hostName, checkCmd);
byte[] output = handle.fetchOutput(Command.STDOUT);
if (output != null) {
String outStr = new String(output);
if (outStr.indexOf("domain1 not running") != -1)
return 1;
else