Skip to contentSkip to conversation

-blockdev vs -snapshot bug

DISCUSSION Michael Tokarev 2 participants 3 messages May 13, 2022 – May 31, 2022

lore
Share & tools
lore
#0 lore raw

Hi!

Now here's something.. interesting.

I tested -blockdev here with a real image. This way:

qemu-system-x86_64 ... -snapshot \
-blockdev qcow2,node-name=q,file.driver=file,file.filename=w.qcow2 \
-device ide-hd,drive=q

I always use -snapshot when testing something, not to damage the image.

And to my great surprise, the above command *did* damage my image.

It looks like -snapshot is entirely ignored by -blockdev.

This is quite a serious issue, to me anyway, - it is seriously unexpected.

If it is intentional, I think an error should be thrown back because the expectation is definitely different.

Or am I doing it wrong?

Thanks,

/mjt

#1 lore raw

Cc'ing qemu-block@

Quoted 28 lines · Michael Tokarev

Hi!

Now here's something.. interesting.

I tested -blockdev here with a real image.  This way:

qemu-system-x86_64 ... -snapshot \
 -blockdev qcow2,node-name=q,file.driver=file,file.filename=w.qcow2 \
 -device ide-hd,drive=q

I always use -snapshot when testing something, not to damage the image.

And to my great surprise, the above command *did* damage my image.

It looks like -snapshot is entirely ignored by -blockdev.

This is quite a serious issue, to me anyway, - it is seriously unexpected.

If it is intentional, I think an error should be thrown back because the expectation is definitely different.

Or am I doing it wrong?

Thanks,

/mjt