[pve-devel] [PATCH qemu-server 20/22] blockdev: add helpers to generate blockdev commandline

DERUMIER, Alexandre alexandre.derumier at groupe-cyllene.com
Mon Jun 16 13:07:06 CEST 2025


>>The 'snapshot' option, for QEMU's snapshot mode, i.e. writes are only
>>temporary, is not yet supported.

from qemu manpage:

"
       -snapshot
              Write to temporary files instead of disk image files. In
this case, the raw disk image you use is not written back. You can
however force the write back by pressing C-a s (see the Disk Images
chapter in the System Emulation Users Guide).

              WARNING:
                 snapshot is incompatible with -blockdev (instead use
qemu-img to manually create snapshot images to attach to your
blockdev).  If you have mixed -blockdev and -drive declarations you can
use the 'snapshot' property on your drive declarations instead of this
global
                 option.
"

So, if we want to keep this option. (I never used it to be honest),
I think we should create a temporary qcow2 file at vm start and delete
it at vm stop.
I'm not sure of current behaviour when you use a block device ? 
how qemu known where to write a temp snapshot file ?

maybe we could reuse state storage ? only with a temp qcow2 file ? or
do we want to reuse snapshot feature of storage ?


Also, I think that some features should be disable when it's used.
(vm snapshots for example, maybe move disk,...)



More information about the pve-devel mailing list