FaultToleranceConfigInfo info = vm.getConfig().getFtInfo();
if (info != null && info.getRole() == 1) {
logger.info("VM " + vm.getName()
+ " is FT primary VM, disable FT before delete it.");
vm.turnOffFT();
}
// try guest shut down first, wait for 3 minutes, power it off after time out
if (vm.isPoweredOn()
&& !vm.shutdownGuest(Constants.VM_FAST_SHUTDOWN_WAITING_SEC * 1000)) {
vm.powerOff();