}
VcContext.inVcSessionDo(new VcSession<Void>() {
@Override
protected Void body() throws Exception {
if (vmPoweroff) {
vcVm.powerOff();
} else {
if (!vcVm
.shutdownGuest(Constants.VM_SHUTDOWN_WAITING_SEC * 1000)) {
logger.info("shutdown guest OS failed, power off directly");
vcVm.powerOff();