}
// power off the VApp if necessary
if (vApp.getStatus() == Status.POWERED_ON) {
try {
Task shutdownTask = vAppApi.powerOff(vAppUrn);
taskDoneEventually(shutdownTask);
} catch (Exception e) {
// keep going; cleanup as much as possible
logger.warn(e, "Continuing cleanup after error shutting down VApp %s", vApp.getName());
}