Skip to content

Commit

Permalink
FIXUP/HACK: Use internal snapshots for non-running VMs
Browse files Browse the repository at this point in the history
This feels like a bug, but let's check with libvirt first:
cockpit-project#1280 (comment)
  • Loading branch information
martinpitt committed Jan 25, 2024
1 parent e0d2442 commit 7ff1250
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,12 @@ export function getStoragePoolPath(storagePools, poolName, connectionName) {
}

export function vmSupportsExternalSnapshots(config, vm, storagePools) {
// HACK/TODO: external snapshots fail for stopped VMs; intended? https://github.com/cockpit-project/cockpit-machines/pull/1280#issuecomment-1910102935
if (vm.state !== 'running') {
logDebug(`vmSupportsExternalSnapshots: vm ${vm.name} is not running, false`);
return false;
}

const disks = Object.values(vm.disks);

// If at leat one disk has internal snapshot preference specified, use internal snapshot for all disk,
Expand Down

0 comments on commit 7ff1250

Please sign in to comment.