Skip to content

Commit

Permalink
core: only try to unlock vm if vm present
Browse files Browse the repository at this point in the history
When a standalone disk is made, don't try to release locks on VM, because there are none

Signed-off-by: Jasper Berton <[email protected]>
  • Loading branch information
JasperB-TeamBlue authored and sandrobonazzola committed Dec 10, 2024
1 parent 12f39f9 commit f453110
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,16 @@ protected void endSuccessfully() {
super.endSuccessfully();
}

@Override
protected void endVmCommand() {
if (isFloatingDisk()) {
endActionOnDisks();
setSucceeded(true);
} else {
super.endVmCommand();
}
}

private void plugDiskToVmIfNeeded() {
if (Boolean.TRUE.equals(getParameters().getPlugDiskToVm()) && getVm() != null) {
if (!getVm().getStatus().isUpOrPaused()) {
Expand Down

0 comments on commit f453110

Please sign in to comment.