From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qcow3 - arbitrary metadata
Date: Mon, 28 Jul 2008 22:06:06 -0500 [thread overview]
Message-ID: <488E891E.6000000@codemonkey.ws> (raw)
In-Reply-To: <a38baa500807281825p53bce1d1x2a0f579004a0fa7b@mail.gmail.com>
Nathaniel McCallum wrote:
> On Mon, Jul 28, 2008 at 7:04 PM, Laurent Vivier <laurent@lvivier.info
> <mailto:laurent@lvivier.info>> wrote:
>
>
> Le 28 juil. 08 à 21:56, Nathaniel McCallum a écrit :
>
> A project I'm working on requires the ability to store
> arbitrary metadata in the VM disk image. Thus, here is a
> patch that implements that as qcow3. It basically replaces
> the header.backing_store_{offset|size} with
> header.metadata_{offset|size}. Metadata is then defined as
> NULL-byte separated 'key:value' pairs. The attached qcow3
> then stores the backing file as
> 'Backing-File:/home/me/backing_file.img' in the metadata
> section. I've included two patches. One is the full patch
> against the latest SVN (qcow3.patch). The second patch is
> just the diff between qcow2.c and qcow3.c so that you can
> easily see the changes.
>
> I've also wondered if it might be possible to backport these
> changes into qcow2 instead of qcow3. However, this would
> break older versions of qemu that claim to support qcow2.
>
> Nathaniel
> <qcow3.patch><qcow2-qcow3.patch>
>
>
> I think this has already been tried exactly one year ago modifying
> snapshot...
>
> http://www.mail-archive.com/kvm-devel@lists.sourceforge.net/msg05103.html
>
> but now Fabrice is working on a configuration file, perhaps you
> can store your metadata in it.
>
>
> Well, the point is to not have a separate configuration file.
>
> I've dug up a few more bits of info. First, the offset option will
> never work without changing at least qcow2's on disk format.
Never is such a strong word. What I was thinking is that you could do
the offset thing based on a URI of some sort. For instance:
qemu -drive file=offset:foo.img:offset=32,if=ide
The syntax of -drive erks me here but you get the gist. Then backing
files would work fine.
> This is because when you start qemu in snapshot mode, it creates a
> new qcow2 image and uses it as the main image. However, the offset
> was meant to apply to the underlying image and there is no field in
> qcow2 to specify the offset of the backing_file.
>
> Second, when creating a new qcow2 file, the l1_table_offset is 4096.
> There does not appear to be anything stored between the end of the
> header and the 4096. So, in theory, you could put anything you want
> there. No?
There's no guarantee that that space won't be used in future versions of
QCOW2 so you can't just cram arbitrary stuff in there.
Regards,
Anthony Liguori
> Nathaniel
>
next prev parent reply other threads:[~2008-07-29 3:06 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-28 19:56 [Qemu-devel] [PATCH] qcow3 - arbitrary metadata Nathaniel McCallum
2008-07-28 20:08 ` Anthony Liguori
2008-07-28 20:24 ` Nathaniel McCallum
2008-07-28 20:36 ` Paul Brook
2008-07-28 20:52 ` Anthony Liguori
2008-07-28 20:50 ` Anthony Liguori
2008-07-28 21:12 ` Nathaniel McCallum
2008-07-28 21:17 ` Anthony Liguori
2008-07-28 21:19 ` Nathaniel McCallum
2008-07-28 21:39 ` Anthony Liguori
2008-07-29 1:49 ` Jamie Lokier
2008-07-29 2:11 ` Jorge Lucángeli Obes
2008-07-29 2:48 ` Nathaniel McCallum
2008-07-29 3:05 ` Jorge Lucángeli Obes
2008-07-29 3:13 ` Anthony Liguori
2008-07-29 6:44 ` Jamie Lokier
2008-07-29 13:38 ` Anthony Liguori
2008-07-29 16:05 ` Jamie Lokier
2008-07-29 8:48 ` Daniel P. Berrange
2008-07-28 23:04 ` Laurent Vivier
2008-07-29 1:25 ` Nathaniel McCallum
2008-07-29 3:06 ` Anthony Liguori [this message]
2008-07-29 3:22 ` Nathaniel McCallum
2008-07-29 6:40 ` maht
2008-07-29 6:44 ` maht
2008-07-29 7:48 ` Laurent Vivier
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=488E891E.6000000@codemonkey.ws \
--to=anthony@codemonkey.ws \
--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.