All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masayoshi Mizuma <msys.mizuma@gmail.com>
To: qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Question: How do I discard any changes for the device which is set by blockdev option?
Date: Tue, 19 May 2020 13:56:59 -0400	[thread overview]
Message-ID: <20200519175659.4poxgjmp4xoufl7h@gabell> (raw)

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


             reply	other threads:[~2020-05-19 17:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 17:56 Masayoshi Mizuma [this message]
2020-05-19 18:41 ` Question: How do I discard any changes for the device which is set by blockdev option? Eric Blake
2020-05-19 20:16   ` Masayoshi Mizuma
2020-05-20  8:24 ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200519175659.4poxgjmp4xoufl7h@gabell \
    --to=msys.mizuma@gmail.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.