get expunged VM data for job result (#9949)

This commit is contained in:
dahn 2024-11-28 17:46:01 +01:00 committed by GitHub
parent c56fc7f81c
commit a73841a693
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5611,7 +5611,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
//Update Resource Count for the given account
resourceCountDecrement(vm.getAccountId(), vm.isDisplayVm(), new Long(offering.getCpu()), new Long(offering.getRamSize()));
}
return _vmDao.findById(vmId);
return _vmDao.findByIdIncludingRemoved(vmId);
} else {
CloudRuntimeException ex = new CloudRuntimeException("Failed to destroy vm with specified vmId");
ex.addProxyObject(vm.getUuid(), "vmId");