On Thu, Apr 25, 2024 at 02:51:28PM +0200, lacsaP Patatetom wrote: > > > when using `qemu-img create`, why do I have to specify the > > > format of the base image ? can't `qemu-img` detect it itself ? > > > > Image format detection isn't 100% reliable. Notably, a 'raw' > > format image could in theory look like any of the other image > > types if it happens to start with the right kind of data. > > > OK for the raw format, which can be anything, but not for the qcow2 > format, which is standardized (header). > in the absence of details, `qemu-img` could use the qcow2 format by > default ?
You probably don't want the integrity of your data to depend on whether QEMU detects correctly the format of the backing file every time you open it. If the problem is that you have to type extra characters every time you create an image that can be easily solved with a shell script or an alias. Berto