The new image's backing file is the existing image, so we need to take the format from there.
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- blockdev.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/blockdev.c b/blockdev.c index d78aa51..96a893b 100644 --- a/blockdev.c +++ b/blockdev.c @@ -800,7 +800,8 @@ void qmp_blockdev_group_snapshot_sync(SnapshotDevList *dev_list, /* create new image w/backing file */ ret = bdrv_img_create(snapshot_file, format, states->old_bs->filename, - drv->format_name, NULL, -1, flags); + states->old_bs->drv->format_name, + NULL, -1, flags); if (ret) { error_set(errp, QERR_OPEN_FILE_FAILED, snapshot_file); goto delete_and_fail; -- 1.7.7.6