Commit
28a06215280b99708ed8dc2d183f62ba7b34ccf8 added support to restore
sparse images but changed the boolean that controls if we open the file
as read-only or read-write. Editing XML in the save image resulted in
following error message:
failed to write header to domain save file '/data/images/fedora40.save': Bad file descriptor
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
if (qemuSaveImageGetMetadata(driver, NULL, path, &def, &data) < 0)
goto cleanup;
- fd = qemuSaveImageOpen(driver, path, false, false, NULL, false);
+ fd = qemuSaveImageOpen(driver, path, false, false, NULL, true);
if (fd < 0)
goto cleanup;