mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
qemuDomainSnapshotForEachQcow2Raw: Lock out operation on unsupported storage
Don't try to manipulate snapshots on network or unresolved volume backed storage. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
c15ff50da0
commit
d3c6c80c79
@ -6507,6 +6507,13 @@ qemuDomainSnapshotForEachQcow2Raw(virQEMUDriverPtr driver,
|
||||
if (def->disks[i]->device != VIR_DOMAIN_DISK_DEVICE_DISK)
|
||||
continue;
|
||||
|
||||
if (!virStorageSourceIsLocalStorage(def->disks[i]->src)) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID,
|
||||
_("can't manipulate inactive snapshots of disk '%s'"),
|
||||
def->disks[i]->dst);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (format > 0 && format != VIR_STORAGE_FILE_QCOW2) {
|
||||
if (try_all) {
|
||||
/* Continue on even in the face of error, since other
|
||||
|
Loading…
Reference in New Issue
Block a user