mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
backup: Move file format check from parser to qemu driver
It's a technical detail in qemu that QCOW2 is needed for a pull-mode backup. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a0a2eb12ab
commit
d46512fc95
@ -204,11 +204,6 @@ virDomainBackupDiskDefParseXML(xmlNodePtr node,
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("unknown disk backup driver '%s'"), driver);
|
||||
return -1;
|
||||
} else if (!push && def->store->format != VIR_STORAGE_FILE_QCOW2) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("pull mode requires qcow2 driver, not '%s'"),
|
||||
driver);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -266,8 +266,16 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm,
|
||||
if (!qemuDomainDiskBlockJobIsSupported(vm, dd->domdisk))
|
||||
return -1;
|
||||
|
||||
if (!dd->store->format)
|
||||
if (dd->store->format == VIR_STORAGE_FILE_NONE) {
|
||||
dd->store->format = VIR_STORAGE_FILE_QCOW2;
|
||||
} else if (dd->store->format != VIR_STORAGE_FILE_QCOW2) {
|
||||
if (pull) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("pull mode backup for disk '%s' requires qcow2 driver"),
|
||||
dd->backupdisk->name);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* calculate backing store to use:
|
||||
* push mode:
|
||||
|
Loading…
Reference in New Issue
Block a user