From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Eric Blake <eblake@redhat.com>, Max Reitz <mreitz@redhat.com>,
Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
armbru@redhat.com, qemu-devel@nongnu.org,
"Richard W.M. Jones" <rjones@redhat.com>,
stefanha@redhat.com
Subject: Re: [Qemu-devel] storing machine data in qcow images?
Date: Wed, 6 Jun 2018 17:36:26 +0100 [thread overview]
Message-ID: <20180606163625.GK2660@work-vm> (raw)
In-Reply-To: <20180606163246.GL3064@redhat.com>
* Daniel P. Berrangé (berrange@redhat.com) wrote:
> On Wed, Jun 06, 2018 at 10:36:20AM -0500, Eric Blake wrote:
> > On 06/06/2018 10:05 AM, Dr. David Alan Gilbert wrote:
> >
> > > > If that's the issue, add a UUID to qcow2 files and reference it from the
> > > > config file.
> > >
> > > Is a UUID a small string :-)
> >
> > Even better, it's something that you could stick directly in the qcow2
> > header (and which therefore cannot grow to a larger size) - it would be a
> > well-constrained scoped addition. Maybe the analogy to actual hardware
> > would be that the config file is like a sticky note, and a UUID embedded in
> > the qcow2 file would be the disk serial number; if you are paranoid that the
> > sticky note could be too easily pulled off one disk and put on another, then
> > the sticky note can include the serial number.
> >
> > >
> > > > > We should make this EASY for users.
> > > >
> > > > To me, having a simple config file they can edit manually certainly
> > > > seems simpler than having to use specific tools to edit it inside of the
> > > > qcow2 file.
> > >
> > > The users never touch the tools; they click and import the VM image.
> >
> > And if we make it easy to import a tar file as the VM image, then that's
> > still the case.
> >
> > > > Sure that it isn't a soft constraint? If most tools can stay unchanged
> > > > but some very specific ones have to be changed, that seems reasonable to me.
> > >
> > > The hard constraint is the normal path stays unchanged; we can change
> > > the tools to make use of the extra data, but not change what's out
> > > there.
> >
> > But for the new config to be useful, you have to modify at least one tool in
> > the path. At which point, it is just as easy to say: "libvirt is now smart
> > enough to read the config file out of a .qcow2 to know that it should prefer
> > a q35 machine" as it is to say "libvirt is now smart enough to treat a .tar
> > file containing .qcow2 and a config file that states that it should prefer a
> > q35 machine", and either approach requires just a single file for the user
> > to download.
>
> Just to be clear, libvirt isn't going to do either of those things.
>
> Whether there is metadata stuffed inside qcow2, or in a metdata file
> inside a tar file, libvirt is not going to look inside either of them.
> The XML is the only place libvirt deals with the hardware config.
>
> Extracting machine type is always going to be a job for the layer above
> such as OpenStack/OVirt/Virt-manager/etc. They will then decide whether
> or not they want to honour that info, and if so, put it into the XML
> they give to libvirt.
>
> As mentioned elsewhere, IMHO, it is more friendly to those tools
> to use pre-existing formats, eg TAR and XML/JSON, for which
> their respective programming langauges already have APIs/parsers.
Libvirt could provide a wrapper around whichever format to extract the
data and provide it to the upper layer. It could also validate against
it to see if the constraints were met as a service for an upper layer.
Dave
>
> Regards,
> Daniel
> --
> |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o- https://fstop138.berrange.com :|
> |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2018-06-06 16:36 UTC|newest]
Thread overview: 157+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-18 15:30 [Qemu-devel] storing machine data in qcow images? Michael S. Tsirkin
2018-05-18 16:49 ` Eduardo Habkost
2018-05-18 17:09 ` Daniel P. Berrangé
2018-05-18 17:41 ` Eduardo Habkost
2018-05-19 6:05 ` Markus Armbruster
2018-05-21 18:29 ` Eduardo Habkost
2018-05-21 18:44 ` Daniel P. Berrangé
2018-05-21 19:01 ` Eduardo Habkost
2018-05-23 11:19 ` Markus Armbruster
2018-05-23 12:13 ` Eduardo Habkost
2018-05-23 16:35 ` Markus Armbruster
2018-05-29 14:06 ` Dr. David Alan Gilbert
2018-06-05 21:58 ` Michal Suchánek
2018-05-21 20:18 ` Daniel P. Berrangé
2018-05-21 20:33 ` Eduardo Habkost
2018-05-24 9:58 ` Kashyap Chamarthy
2018-05-22 7:35 ` Gerd Hoffmann
2018-05-22 10:53 ` Eduardo Habkost
2018-05-22 14:19 ` Michael S. Tsirkin
2018-05-22 15:02 ` Kevin Wolf
2018-05-22 15:14 ` Eduardo Habkost
2018-05-23 2:12 ` Fam Zheng
2018-05-23 9:16 ` Kevin Wolf
2018-05-23 14:46 ` Michael S. Tsirkin
2018-05-24 11:17 ` Richard W.M. Jones
2018-05-29 14:03 ` Dr. David Alan Gilbert
2018-05-29 14:14 ` Eduardo Habkost
2018-05-29 14:51 ` Richard W.M. Jones
2018-05-29 15:31 ` Dr. David Alan Gilbert
2018-05-22 8:50 ` Philipp Hahn
2018-05-24 11:32 ` Richard W.M. Jones
2018-05-24 14:56 ` Michael S. Tsirkin
2018-05-24 15:08 ` Kevin Wolf
2018-05-24 15:19 ` Michael S. Tsirkin
2018-05-24 15:20 ` Richard W.M. Jones
2018-05-24 16:25 ` Markus Armbruster
2018-05-28 18:10 ` Max Reitz
2018-05-28 18:30 ` Richard W.M. Jones
2018-05-28 18:38 ` Kevin Wolf
2018-05-28 18:44 ` Max Reitz
2018-05-28 19:09 ` Kevin Wolf
2018-05-29 9:23 ` Max Reitz
2018-05-29 10:14 ` Kevin Wolf
2018-05-29 13:16 ` Eduardo Habkost
2018-05-28 21:20 ` Richard W.M. Jones
2018-05-28 21:25 ` Richard W.M. Jones
2018-05-29 6:44 ` Kevin Wolf
2018-05-29 10:14 ` Max Reitz
2018-06-05 9:21 ` Dr. David Alan Gilbert
2018-06-05 19:03 ` Eduardo Habkost
2018-06-05 19:47 ` Michael S. Tsirkin
2018-06-05 19:54 ` [Qemu-devel] [Qemu-block] " Eric Blake
2018-06-05 19:58 ` Richard W.M. Jones
2018-06-05 20:09 ` Eric Blake
2018-06-05 20:28 ` Michael S. Tsirkin
2018-06-05 20:46 ` Eric Blake
2018-06-05 21:26 ` Michael S. Tsirkin
2018-06-06 8:07 ` Dr. David Alan Gilbert
2018-06-06 6:23 ` Gerd Hoffmann
2018-06-05 20:06 ` Michael S. Tsirkin
2018-06-06 6:26 ` [Qemu-devel] " Gerd Hoffmann
2018-06-06 9:44 ` Dr. David Alan Gilbert
2018-06-06 13:35 ` Eduardo Habkost
2018-06-06 11:02 ` Max Reitz
2018-06-06 11:14 ` Dr. David Alan Gilbert
2018-06-06 11:26 ` Max Reitz
2018-06-06 12:00 ` Dr. David Alan Gilbert
2018-06-06 12:59 ` Max Reitz
2018-06-06 14:31 ` Dr. David Alan Gilbert
2018-06-06 14:37 ` Daniel P. Berrangé
2018-06-06 14:42 ` Dr. David Alan Gilbert
2018-06-06 14:51 ` Max Reitz
2018-06-06 15:05 ` Dr. David Alan Gilbert
2018-06-06 15:36 ` Eric Blake
2018-06-06 16:11 ` Michal Suchánek
2018-06-06 16:37 ` Eric Blake
2018-06-06 16:32 ` Daniel P. Berrangé
2018-06-06 16:36 ` Dr. David Alan Gilbert [this message]
2018-06-07 10:02 ` Andrea Bolognani
2018-06-07 10:22 ` Daniel P. Berrangé
2018-06-07 11:17 ` Andrea Bolognani
2018-06-07 12:38 ` Daniel P. Berrangé
2018-06-07 13:49 ` Dr. David Alan Gilbert
2018-06-07 14:06 ` Andrea Bolognani
2018-06-07 14:45 ` Dr. David Alan Gilbert
2018-06-07 14:56 ` Andrea Bolognani
2018-06-07 15:25 ` Dr. David Alan Gilbert
2018-06-07 20:38 ` Gerd Hoffmann
2018-06-07 10:32 ` Richard W.M. Jones
2018-06-07 10:35 ` Dr. David Alan Gilbert
2018-06-07 10:36 ` Daniel P. Berrangé
2018-06-07 10:54 ` Andrea Bolognani
2018-06-07 19:24 ` Laszlo Ersek
2018-06-08 8:21 ` Dr. David Alan Gilbert
2018-06-08 8:41 ` Daniel P. Berrangé
2018-06-08 8:53 ` Dr. David Alan Gilbert
2018-06-07 21:19 ` Michael S. Tsirkin
2018-06-07 21:18 ` Michael S. Tsirkin
2018-06-07 10:51 ` Andrea Bolognani
2018-06-07 19:38 ` Laszlo Ersek
2018-06-06 17:49 ` Max Reitz
2018-06-06 15:09 ` Michael S. Tsirkin
2018-06-06 17:06 ` Max Reitz
2018-06-07 21:43 ` Michael S. Tsirkin
2018-06-09 21:34 ` Max Reitz
2018-06-11 2:06 ` Michael S. Tsirkin
2018-06-11 8:16 ` Michal Suchánek
2018-06-06 11:42 ` Richard W.M. Jones
2018-06-06 11:48 ` Daniel P. Berrangé
2018-06-06 11:53 ` Max Reitz
2018-06-06 12:03 ` Dr. David Alan Gilbert
2018-06-06 13:15 ` Max Reitz
2018-06-06 12:29 ` Richard W.M. Jones
2018-06-06 11:22 ` [Qemu-devel] [Qemu-block] " Peter Krempa
2018-06-06 10:32 ` [Qemu-devel] " Michal Suchánek
2018-06-06 11:02 ` Max Reitz
2018-06-06 11:19 ` Michal Suchánek
2018-06-06 11:32 ` Max Reitz
2018-06-06 11:37 ` Dr. David Alan Gilbert
2018-06-06 11:44 ` Max Reitz
2018-06-06 12:16 ` Dr. David Alan Gilbert
2018-06-06 13:22 ` Max Reitz
2018-06-06 14:02 ` Dr. David Alan Gilbert
2018-06-06 14:33 ` Max Reitz
2018-06-06 14:41 ` Dr. David Alan Gilbert
2018-06-06 14:55 ` Max Reitz
2018-06-06 15:25 ` Michal Suchánek
2018-06-06 18:02 ` Max Reitz
2018-06-06 18:33 ` Michal Suchánek
2018-06-06 18:36 ` Eduardo Habkost
2018-06-07 18:27 ` [Qemu-devel] [Qemu-block] " Kashyap Chamarthy
2018-06-06 13:42 ` [Qemu-devel] " Eduardo Habkost
2018-06-06 14:55 ` Michael S. Tsirkin
2018-06-06 14:57 ` Max Reitz
2018-06-11 14:10 ` Kevin Wolf
2018-06-06 14:46 ` Michael S. Tsirkin
2018-06-06 15:04 ` Max Reitz
2018-06-06 11:43 ` Michal Suchánek
2018-06-06 11:52 ` Max Reitz
2018-06-06 12:13 ` Michal Suchánek
2018-06-06 13:14 ` Max Reitz
2018-06-06 13:45 ` Michal Suchánek
2018-06-06 13:50 ` Daniel P. Berrangé
2018-06-06 14:14 ` Eduardo Habkost
2018-06-06 14:21 ` Max Reitz
2018-06-06 14:24 ` Daniel P. Berrangé
2018-06-06 14:17 ` Max Reitz
2018-06-06 16:10 ` Eduardo Habkost
2018-06-06 18:09 ` Max Reitz
2018-06-11 8:44 ` Richard W.M. Jones
2018-06-06 11:40 ` Richard W.M. Jones
2018-06-06 14:31 ` Michael S. Tsirkin
2018-06-06 14:43 ` Michael S. Tsirkin
2018-06-06 14:57 ` Eric Blake
2018-06-06 20:39 ` Eric Blake
2018-06-06 21:01 ` Gerd Hoffmann
2018-06-06 15:02 ` Max Reitz
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=20180606163625.GK2660@work-vm \
--to=dgilbert@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
--cc=stefanha@redhat.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).