Command parameters:
is a disk image filename
is the destination format
Parameters to snapshot subcommand:
Command description:
Only the formats "qcow2", "qed" and "vdi" support consistency checks.
If the option backing_file is specified, then the image will record only the differences from backing_file. No size needs to be specified in this case. backing_file will never be modified unless you use the "commit" monitor command (or qemu-img commit).
The size can also be specified using the size option with "-o", it doesn't need to be specified separately in this case.
Only the formats "qcow" and "qcow2" support compression. The compression is read-only. It means that if a compressed sector is rewritten, then it is rewritten as uncompressed data.
Image conversion is also useful to get smaller image when using a growable format such as "qcow" or "cow": the empty sectors are detected and suppressed from the destination image.
You can use the backing_file option to force the output image to be created as a copy on write image of the specified base image; the backing_file should have the same content as the input's base image, however the path, image format, etc may differ.
The backing file is changed to backing_file and (if the image format of filename supports this) the backing file format is changed to backing_fmt.
There are two different modes in which "rebase" can operate:
In order to achieve this, any clusters that differ between backing_file and the old backing file of filename are merged into filename before actually changing the backing file.
Note that the safe mode is an expensive operation, comparable to converting an image. It only works if the old backing file still exists.
This mode is useful for renaming or moving the backing file to somewhere else. It can be used without an accessible old backing file, i.e. you can use it to fix an image whose backing file has already been moved/renamed.
Before using this command to shrink a disk image, you MUST use file system and partitioning tools inside the VM to reduce allocated file systems and partition sizes accordingly. Failure to do so will result in data loss!
After using this command to grow a disk image, you must use file system and partitioning tools inside the VM to actually begin using the new space on the device.
Supported image file formats:
Supported options:
Encryption uses the AES format which is very secure (128 bit keys). Use a long password (16 characters) to get maximum protection.
Supported options:
Supported options: