diff --git a/blockdev.c b/blockdev.c index 86e6bffdc493a1113c0984a7e9d4c35b87ddcc2f..d95569482afe650b64c62224813fde5ab2d9f889 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2029,7 +2029,9 @@ void qmp_drive_mirror(const char *device, const char *target, return; } - if (sync == MIRROR_SYNC_MODE_FULL && mode != NEW_IMAGE_MODE_EXISTING) { + if ((sync == MIRROR_SYNC_MODE_FULL || !source) + && mode != NEW_IMAGE_MODE_EXISTING) + { /* create new image w/o backing file */ assert(format && drv); bdrv_img_create(target, format,