From: Markus Armbruster <armbru@redhat.com>
To: Christopher Pereira <kripper@imatronix.cl>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, users@lists.libvirt.org
Subject: Re: Compact backing chain (sparsify + compress)
Date: Mon, 10 Nov 2025 07:07:54 +0100 [thread overview]
Message-ID: <87wm3y2zet.fsf@pond.sub.org> (raw)
In-Reply-To: <aea951a3-6e83-4ec1-b287-4d7dba14b674@imatronix.cl> (Christopher Pereira's message of "Sun, 9 Nov 2025 23:31:16 -0300")
Adding cc:s.
Christopher Pereira <kripper@imatronix.cl> writes:
> Hi,
>
> I would like to revisit this old thread from 2016 with a special use case that I believe should be a standard `virsh` command:
> https://lists.gnu.org/archive/html/qemu-devel/2016-12/msg03571.html
>
> **Summary:**
>
> Given this QEMU backing chain:
> `base <- snap1 <- snap2 <- snap3 (active)`
>
> We want to merge `base <- snap1 <- snap2` into a new snapshot `collapsed-base` that is:
> 1. Sparsified (`virt-sparsify`)
> 2. Compressed
>
> The resulting backing chain would be:
> `collapsed-base <- snap3 (active)`
>
> **Motivation:**
>
> - We perform daily backup snapshots and never modify existing files (too dangerous). We only rebase.
> - We collapse older chains into a new `collapsed-base` snapshot to limit chain size and avoid performance degradation.
>
> We have been doing this successfully for over 10 years using:
>
> - `qemu-img convert`
> - `virt-sparsify`
> - `virsh save`
> - `qemu-img rebase`
> - `virsh resume`
>
> **Problems:**
>
> - There is a small downtime due to `virsh save`/`resume`.
> - In recent QEMU versions, `virsh` adds a `backingStore` tag to the XML even when using the `--no-metadata` option. This causes inconsistencies after `qemu-img rebase`.
>
> We didn’t use QMP because it didn’t support sparsify + compression in the past.
>
> **Questions:**
>
> - Is there now a better way to achieve this?
> - Could this feature be implemented or supported directly in `virsh`?
>
> In my opinion, this would be the ideal backup solution: we could travel in time, sync immutable snapshots to a remote backup server, and maintain performance.
next prev parent reply other threads:[~2025-11-10 9:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 2:31 Compact backing chain (sparsify + compress) Christopher Pereira
2025-11-10 6:07 ` Markus Armbruster [this message]
2025-11-10 9:53 ` Peter Krempa
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=87wm3y2zet.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=kripper@imatronix.cl \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=users@lists.libvirt.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.