qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel Developers <qemu-devel@nongnu.org>,
	Avi Kivity <avi@redhat.com>
Subject: [Qemu-devel] Re: libvirt vs. in-qemu management
Date: Tue, 6 Apr 2010 15:06:33 +0100	[thread overview]
Message-ID: <20100406140633.GQ28689@redhat.com> (raw)
In-Reply-To: <4BBB3CCC.3000208@suse.de>

On Tue, Apr 06, 2010 at 03:53:16PM +0200, Alexander Graf wrote:
> Daniel P. Berrange wrote:
> >> If instead there was a common machine description file that everyone
> >> knows, there'd be a single point of knowledge. A RHEL-V admin could work
> >> on plain qemu. A qemu developer would feel right at home with virt-manager.
> >>     
> >
> > This isn't solving the problem. If you see a problem in the QEMU config
> > uses by a high level tool like RHEV/oVirt, you still aren't going to 
> > know what the config change you need to make in those apps. They are
> > never going to work with the QEMU config as their master data format.
> > It is just something they generate on the fly at runtime, from their
> > SQL databases, because they want to model concepts at a high level.
> > A VM as represented in RHEV/oVirt does not have a single QEMU or libvirt
> > config file description - the low level config can potentially vary each
> > time the guest is started on a host(s).
> >   
> 
> So we could still make it transparent to the user, no? RHEV could import
> a KVM machine description as well as it could export one. So the
> internal representation is transparent to the user. That would also ease
> going from RHEV to other management apps. Or the other way around.
> 
> >   
> >>> Even if an app was using QEMU directly, you can't presume that the app 
> >>> will use QEMU's config file as its native format. Many apps will store
> >>> configs in their own custom format (or in a database) and simply generate
> >>> the QEMU config data on the fly when starting a VM. In the same way libvirt
> >>> will  generate QEMU config data on the fly when starting a VM. Having many
> >>> config formats & conversion / generation of the fly is a fact of life no 
> >>> matter what mgmt system you use.
> >>>   
> >>>       
> >> I don't see why we shouldn't try to change that. Why not generate a
> >> common machine description file in qemu for all qemu VMs? Think of word
> >> documents. Everyone knows how to read and write .doc files. Why
> >> shouldn't VM description files be the same? It's really the best case
> >> for the user if there's a single type of configuration.
> >>     
> >
> > The raw QEMU config for a disk device is specified in terms of the
> > file path for the storage.  A management app using QEMU / libvirt is
> > not going to store its config for the guest in this way. They will
> > have some model of storage and an association between a storage volume
> > and a virtual machine. The actual file path for this may is only relevant
> > at the time the VM is actually started & may be different on every host
> > the VM is run on. eg if you've associated a VM with a LUN based, it may
> > be /dev/sda when run on host A and /dev/sdz on host B. The mgmt app is
> > going to use a mapping based on the  WWID, not paths. 
> >   
> 
> Sounds like somebody didn't understand the concept of persistent device
> names here. The device names should be /dev/disk/by-wwid/... then.

To find out either the /dev/sdXX or /dev/disk/by-XXX paths you need to
setup the storage on one of the hosts. At the time the VM is being
configured in the app you can't presume that the storage is visible on
any of the hosts. The /dev/disk/by-XXX paths are only stable for the
type of physical storage. Modelling the VM <-> storage association based 
on any kind of file path is fundamentally the wrong level of representation
for high level apps. By modelling based on a application specific logical
association, the storage can be moved between filesystems, moved from a
file to an LVM lv, to a SAN etc, without ever breaking the assocation at
an application level. 

Fundamentally, a QEMU level configuration is a description of a specific
instantiation of a VM. An application level configuration is a description
of a VM that can be instantiated in many ways. There's a 1 <-> M relation
between application level config description & QEMU level config file.
Thus in many cases a QEMU config will not be usable as an application's
master config format.


Regards,
Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

  reply	other threads:[~2010-04-06 14:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-05 21:11 [Qemu-devel] libvirt vs. in-qemu management Alexander Graf
2010-04-05 22:14 ` [Qemu-devel] " Avi Kivity
2010-04-05 22:29   ` Alexander Graf
2010-04-06 12:09     ` Avi Kivity
2010-04-06 12:28       ` Alexander Graf
2010-04-06 12:41         ` Avi Kivity
2010-04-06 12:51           ` Alexander Graf
2010-04-06 20:15             ` Jamie Lokier
2010-04-06 11:06   ` Daniel P. Berrange
2010-04-06 12:49     ` Alexander Graf
2010-04-06 13:00       ` Daniel P. Berrange
2010-04-06 13:20         ` Alexander Graf
2010-04-06 20:08         ` Jamie Lokier
2010-04-06 10:47 ` Daniel P. Berrange
2010-04-06 12:43   ` Alexander Graf
2010-04-06 12:58     ` Avi Kivity
2010-04-06 13:39     ` Daniel P. Berrange
2010-04-06 13:53       ` Alexander Graf
2010-04-06 14:06         ` Daniel P. Berrange [this message]
2010-04-06 15:06           ` Alexander Graf
2010-04-06 19:43             ` Jamie Lokier
2010-04-06 14:14     ` Richard W.M. Jones

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=20100406140633.GQ28689@redhat.com \
    --to=berrange@redhat.com \
    --cc=agraf@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --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 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).