after shutdown, we get the vm status to make sure it is in halted state, otherwise return stop error

This commit is contained in:
anthony 2010-10-10 15:51:47 -07:00
parent 8081713020
commit f0637669eb
1 changed files with 4 additions and 0 deletions

View File

@ -2692,6 +2692,10 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
disableVlanNetwork(network);
}
}
} else {
String msg = "VM " + vmName + " shutdown succeed, but this vm is not in halted state, it is in " + vm.getPowerState(conn) + " state";
s_logger.warn(msg);
return new StopAnswer(cmd, msg);
}
} catch (XenAPIException e) {
String msg = "VM destroy failed in Stop " + vmName + " Command due to " + e.toString();