From: Eduardo Habkost <ehabkost@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
stefanha@redhat.com, kwolf@redhat.com, mreitz@redhat.com,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] storing machine data in qcow images?
Date: Mon, 21 May 2018 17:33:22 -0300 [thread overview]
Message-ID: <20180521203322.GU25013@localhost.localdomain> (raw)
In-Reply-To: <20180521201817.GA10382@redhat.com>
On Mon, May 21, 2018 at 09:18:17PM +0100, Daniel P. Berrangé wrote:
> On Fri, May 18, 2018 at 02:41:33PM -0300, Eduardo Habkost wrote:
> > On Fri, May 18, 2018 at 06:09:56PM +0100, Daniel P. Berrangé wrote:
> > > On Fri, May 18, 2018 at 06:30:38PM +0300, Michael S. Tsirkin wrote:
> > > > Hi!
> > > > Right now, QEMU supports multiple machine types within
> > > > a given architecture. This was the case for many architectures
> > > > (like ARM) for a while, somewhat more recently this is the case
> > > > for x86 with I440FX and Q35 options.
> > > >
> > > > Unfortunately this means that it's no longer possible
> > > > to more or less reliably boot a VM just given a disk image,
> > > > even if you select the correct QEMU binary:
> > > > you must supply the correct machine type.
> > >
> > > You must /sometimes/ supply the correct machine type.
> > >
> > > It is quite dependent on the guest OS you have installed, and even
> > > just how the guest OS is configured. In general Linux is very
> > > flexible and can adapt to a wide range of hardware, automatically
> > > detecting things as needed. It is possible for a sysadmin to build
> > > a Linux image in a way that would only work with I440FX, but I
> > > don't think it would be common to see that. Many distros build
> > > and distribute disk images that can work across VMWare, KVM,
> > > and VirtualBox which all have very quite different hardware.
> > > Non-x86 archs may be more fussy but I don't have personal
> > > experiance with them
> > >
> > > Windows is probably where things get more tricky, as it is not
> > > happy with disks moving between different controller types
> > > for example, and you might trigger license activation again.
> >
> > All I'm suggesting here is just adding extra hints that OpenStack
> > can use.
> >
> > I have very specific goal here: the goal is to make it less
> > painful to users when OpenStack+libvirt+QEMU switch to using a
> > different machine-type by default (q35), and/or when guest OSes
> > stop supporting pc-i440fx. I assume this is a goal for OpenStack
> > as well.
> >
> > We can make the solution to be more extensible and solve other
> > problems as well, but my original goal is the one above.
>
> Configuring the machine type is just one thing that users
> would do with OpenStack though. A simple example might be
>
> openstack image set \
> --property hw_disk_bus=scsi \
> --property hw_vif_model=e1000e
>
> Or if they're using libosinfo to set preferred devices
>
> openstack image set \
> --property os_distro=fedora26
>
> which will identify virtio-blk & virtio-net as disk+nic
> respectively. Using libosinfo is more flexible than setting
> the hw_disk_bus & hw_vif_model explicitly, because libosinfo
> will report multiple devices that can be used, and the virt
> driver can then pick one which best suits the particular
> host or hypervisor.
>
> Setting a non-default machine type is one extra prop
>
> openstack image set \
> --property hw_machine_type=q35
> --property os_distro=fedora26
Nice. Are these just hypothetical examples, or something that
already works?
>
> So while your immediate motivation is only considering the
> machine type, from the Openstack POV thats only one property
> out of many that users might be setting.
Agreed.
> > > That said I'm not really convinced that using the qcow2 headers is
> > > a good plan. We have many disk image formats in common use, qcow2
> > > is just one. Even if the user provides the image in qcow2 format,
> > > that doesn't mean that mgmt apps actually store the qcow2 file.
> > >
> >
> > Why this OpenStack implementation detail matters? Once the hints
> > are included in the input, it's up to OpenStack to choose how to
> > deal with it.
>
> Well openstack aims to support multiple hypervisors - if there's a
> choice between implementing something that is a cross-vendor standard
> like OVF, or implementing something that only works with qcow2, the
> latter is not very appealing to support.
I still don't understand why you claim this would only work with
qcow2. If somebody wants to implement the same functionality in
OVF, it's also possible.
> > > The closest to a cross-hypervisor standard is OVF which can store
> > > metadata about required hardware for a VM. I'm pretty sure it does
> > > not have the concept of machine types, but maybe it has a way for
> > > people to define metadata extensions. Since it is just XML at the
> > > end of the day, even if there was nothing official in OVF, it would
> > > be possible to just define a custom XML namespace and declare a
> > > schema for that to follow.
> >
> > There's nothing preventing OVF from supporting the same kind of
> > hints.
> >
> > I just don't think we should require people to migrate to OVF if
> > all they need is to tell OpenStack what's the recommended
> > machine-type for a guest image.
> >
> > Requiring a different image format seems very likely to not
> > fulfill the goal I stated above: it will require using different
> > tools to create the guest images, and we can't force everybody
> > publishing guest images to stop using qcow2.
>
> It doesn't have to require different tools - existing tools could
> create a OVF/OVA file for the disk image as part of an "export"
> process.
Requiring a new "export" step that wasn't required before is
requiring a different tool, isn't it?
> > > > - We most likely shouldn't get backend parameters from the image
> > > >
> > > > Thoughts?
> > >
> > > I tend to think we'd be better looking at what we can do in the context
> > > of an existing standard like OVF rather than inventing something that
> > > only works with qcow2. I think it would need to be more expressive than
> > > just a single list of key,value pairs for each item.
> >
> > Why you claim we are inventing something that only works with
> > qcow2?
>
> It works with a disk image format that has ability to record extra
> metadata. With raw files you would have to have a separate file to
> record it, likewise for any other vendor disk formats that are
> not extended.
So this could work with both qcow2 and OVF (and maybe other
formats if others want to extend them), wouldn't it?
--
Eduardo
next prev parent reply other threads:[~2018-05-21 20:33 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 [this message]
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
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=20180521203322.GU25013@localhost.localdomain \
--to=ehabkost@redhat.com \
--cc=berrange@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=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).