qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Christopher Pereira <kripper@imatronix.cl>,
	Stefan Hajnoczi <stefanha@gmail.com>, Fam Zheng <famz@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Can qemu reopen image files?
Date: Thu, 29 Dec 2016 07:42:28 -0600	[thread overview]
Message-ID: <c087ebdd-e266-ceba-1390-66b2d38cab16@redhat.com> (raw)
In-Reply-To: <a982da67-2971-3134-de18-7d470b1fb4d2@imatronix.cl>

[-- Attachment #1: Type: text/plain, Size: 1328 bytes --]

On 12/28/2016 12:51 PM, Christopher Pereira wrote:
> Hi Eric,
> 
> There is something I don't understand.
> 
> We are doing: "virsh save", "qemu-img convert", "qemu-img rebase" and
> "virsh restore".
> We only touch the backing chain by doing the rebase while the VM is down.
> Is there any chance this procedure can destroy data?

Since there are never two active writers to the file (you have made sure
that qemu-img and qemu are not both holding the same file open at once),
there is no chance for corruption on that front.  There's still a
possibility of corruption if you botch the instructions, and don't
rebuild the chain in such a way that the guest would see the same data,
but that's harder to say without seeing an actual transcript.

> If so, is there any difference between shutting down and just
> saving/restoring the VM?

Shutting down vs. saving/restoring shouldn't matter other than the
length of time that the guest is offline (including rebooting time with
a shut down, which is not present for an incoming migration restoration).

> Maybe save/restore keeps a cache?

No. Both shutting down and saving end the qemu process, and therefore
flush everything to the disk.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2016-12-29 13:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-18 23:52 [Qemu-devel] Can qemu reopen image files? Christopher Pereira
2016-12-19  1:07 ` Fam Zheng
2016-12-19 13:55   ` Stefan Hajnoczi
2016-12-19 15:03     ` Christopher Pereira
2016-12-19 15:48       ` Eric Blake
2016-12-19 16:24         ` Christopher Pereira
2016-12-28 18:51           ` Christopher Pereira
2016-12-29 13:42             ` Eric Blake [this message]
2016-12-29 13:52               ` Eric Blake
2016-12-29 13:55                 ` Eric Blake
2016-12-29 13:39           ` Eric Blake

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=c087ebdd-e266-ceba-1390-66b2d38cab16@redhat.com \
    --to=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=kripper@imatronix.cl \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /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 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).