qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Question: How do I discard any changes for the device which is set by blockdev option?
@ 2020-05-19 17:56 Masayoshi Mizuma
  2020-05-19 18:41 ` Eric Blake
  2020-05-20  8:24 ` Kevin Wolf
  0 siblings, 2 replies; 4+ messages in thread
From: Masayoshi Mizuma @ 2020-05-19 17:56 UTC (permalink / raw)
  To: qemu-devel, qemu-block

Hello,

I would like to discard any changes while the qemu guest OS is done.
I can do that with snapshot and drive option.
However, snapshot option doesn't work for the device which set by
blockdev option like as:

$QEMU --enable-kvm \
      -m 1024 \
      -nographic \
      -serial mon:stdio \
      -blockdev driver=file,node-name=mydisk,filename=/mnt/fedora.qcow2 \
      -blockdev driver=qcow2,node-name=vda,file=mydisk \
      -device virtio-blk-pci,drive=vda,bootindex=1 \
      -snapshot

I would like to use blockdev option to set the device because
libvirt uses blockdev option for disk element.

If there's no way to do so, does that make sense to get available
snapshot option to blockdev as well? If that makes sense, I'll try to
implement that.

As for qcow2, I think we can do such things to use qemu-img snapshot
command, for example save the original image and restore the image
after the qemu guest OS is shutdowned. However, it may be complecated
for user. I would like the simple way like as snapshot/drive option...

If I'm missing something, let me know.

Thanks!
Masa


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-20  8:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-19 17:56 Question: How do I discard any changes for the device which is set by blockdev option? Masayoshi Mizuma
2020-05-19 18:41 ` Eric Blake
2020-05-19 20:16   ` Masayoshi Mizuma
2020-05-20  8:24 ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).