vmspawn: catch unsupported growing of qcow2 images (#41654)
For qcow2 images it's not enough to grow the file. Since we probably don't want to shell out to qemu-img either let's just error out to make the user aware that growing needs to be done manually.
This commit is contained in:
@@ -4006,6 +4006,10 @@ static int verify_arguments(void) {
|
||||
log_warning("--grow-image has no effect with --image-disk-type=scsi-cd (CD-ROMs are read-only).");
|
||||
}
|
||||
|
||||
if (arg_grow_image && arg_image_format == IMAGE_FORMAT_QCOW2)
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"--grow-image is not supported for qcow2 images, use 'qemu-img resize FILE SIZE'.");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user