[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] storing machine data in qcow images?
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] storing machine data in qcow images? |
Date: |
Thu, 24 May 2018 17:08:17 +0200 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
Am 24.05.2018 um 16:56 hat Michael S. Tsirkin geschrieben:
> On Thu, May 24, 2018 at 12:32:51PM +0100, Richard W.M. Jones wrote:
> > There is however a seed of a good idea in the thread:
> >
> > > I don't think QEMU needs to use this information automatically,
> > > necessarily. I think the first step is to simply make QEMU save
> > > this information in the disk image, and making qemu-img able to
> > > read and write this information.
> >
> > It would be nice if qcow2 added arbitrary data sections (which would
> > always be ignored by qemu) for storing additional data. This could be
> > used to create a compact qcow2 + metadata format to rival OVA for
> > management layers to use, and there are various other uses too.
> >
> > Rich.
>
> I think this part is pretty uncontroversial.
>
> But can we add data without changing the verion?
Yes. Don't worry about where to store it, we'll solve this. Do worry
about what to store.
> typedef struct QCowHeader {
> uint32_t magic;
> uint32_t version;
> uint64_t backing_file_offset;
> uint32_t backing_file_size;
> uint32_t mtime;
> uint64_t size; /* in bytes */
> uint8_t cluster_bits;
> uint8_t l2_bits;
> uint16_t padding;
> uint32_t crypt_method;
> uint64_t l1_table_offset;
> } QEMU_PACKED QCowHeader;
>
> How about changing mtime to a flags bitmap?
> E.g. 0x1 would mean there's an extended header.
You're looking at the qcow1 header. qcow2 has mechanisms to extend the
metadata, including compatible and incompatible feature flags and a
header_length field.
Kevin
- Re: [Qemu-devel] storing machine data in qcow images?, (continued)
- Re: [Qemu-devel] storing machine data in qcow images?, Michael S. Tsirkin, 2018/05/22
- Re: [Qemu-devel] storing machine data in qcow images?, Kevin Wolf, 2018/05/22
- Re: [Qemu-devel] storing machine data in qcow images?, Eduardo Habkost, 2018/05/22
- Re: [Qemu-devel] storing machine data in qcow images?, Fam Zheng, 2018/05/22
- Re: [Qemu-devel] storing machine data in qcow images?, Kevin Wolf, 2018/05/23
- Re: [Qemu-devel] storing machine data in qcow images?, Michael S. Tsirkin, 2018/05/23
Re: [Qemu-devel] storing machine data in qcow images?, Richard W.M. Jones, 2018/05/24
Re: [Qemu-devel] storing machine data in qcow images?, Philipp Hahn, 2018/05/22
Re: [Qemu-devel] storing machine data in qcow images?, Richard W.M. Jones, 2018/05/24
Re: [Qemu-devel] storing machine data in qcow images?, Max Reitz, 2018/05/28
- Re: [Qemu-devel] storing machine data in qcow images?, Richard W.M. Jones, 2018/05/28
- Re: [Qemu-devel] storing machine data in qcow images?, Kevin Wolf, 2018/05/28
- Re: [Qemu-devel] storing machine data in qcow images?, Max Reitz, 2018/05/28
- Re: [Qemu-devel] storing machine data in qcow images?, Kevin Wolf, 2018/05/28
- Re: [Qemu-devel] storing machine data in qcow images?, Max Reitz, 2018/05/29
- Re: [Qemu-devel] storing machine data in qcow images?, Kevin Wolf, 2018/05/29