Skip to content

Commit 6f85033

Browse files
committed
get expunged VM data for job result
1 parent a2690e9 commit 6f85033

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/main/java/com/cloud/vm/UserVmManagerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5569,7 +5569,7 @@ private Host getDestinationHost(Long hostId, boolean isRootAdmin, boolean isExpl
55695569
@Override
55705570
public UserVm destroyVm(long vmId, boolean expunge) throws ResourceUnavailableException, ConcurrentOperationException {
55715571
// Verify input parameters
5572-
UserVmVO vm = _vmDao.findById(vmId);
5572+
UserVmVO vm = _vmDao.findByIdIncludingRemoved(vmId);
55735573
if (vm == null || vm.getRemoved() != null) {
55745574
InvalidParameterValueException ex = new InvalidParameterValueException("Unable to find a virtual machine with specified vmId");
55755575
throw ex;
@@ -5611,7 +5611,7 @@ public UserVm destroyVm(long vmId, boolean expunge) throws ResourceUnavailableEx
56115611
//Update Resource Count for the given account
56125612
resourceCountDecrement(vm.getAccountId(), vm.isDisplayVm(), new Long(offering.getCpu()), new Long(offering.getRamSize()));
56135613
}
5614-
return _vmDao.findById(vmId);
5614+
return _vmDao.findByIdIncludingRemoved(vmId);
56155615
} else {
56165616
CloudRuntimeException ex = new CloudRuntimeException("Failed to destroy vm with specified vmId");
56175617
ex.addProxyObject(vm.getUuid(), "vmId");

0 commit comments

Comments
 (0)