[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC] QEMU Guest Tools ISO Follow-up
From: |
Michael Roth |
Subject: |
[Qemu-devel] [RFC] QEMU Guest Tools ISO Follow-up |
Date: |
Mon, 22 Aug 2011 12:09:15 -0500 |
These patches apply on top of master (8-22), and can also be obtained from:
git://repo.or.cz/qemu/mdroth.git guest-tools-iso-v1
This is a follow-up to the previous discussion regarding deployment QEMU/KVM
guest dependencies via a distributable ISO:
http://lists.gnu.org/archive/html/qemu-devel/2011-06/msg02239.html
At the time a cross-platform byte-compiled python install framework was being
explored, but since qemu-ga will likely be the only user for a while I wanted
to focus on putting together a dead simple framework for linux guests and going
from there.
This current framework works as follows:
Adding a tool:
1) A tool intended for guest deployment adds distribution files (init/config
scripts, etc) to qemu.git/guest-tools-iso/projects/<tool>
2) A linux executable/script, preferably a simple shell script to ensure the
guest can run it, is placed in that same directory to handle all the install
logic.
3) The logic to build the required binaries for that tool/project is added to
qemu.git/scripts/build-guest-iso.sh
Generating an ISO/tarball:
1) qemu.git/scripts/build-guest-iso.sh is invoked: scripts/build-guest-iso.sh
2) guest-tools-iso/ gets copied to $tmp/qemu-guest-tools-$VERSION
3) The ISO-generation logic for each project (in build-guest-iso.sh) will
build/copy binaries and dynamically-generated files to $tmp/projects/<tool>
4) An ISO and tarball of the contents of $tmp/qemu-guest-tools-$VERSION are
then created and placed in the current directory.
libvirt/virsh/hmp/qmp users would install the tools by mounting the ISO and
running the installer for their platform. Ideally, this would be done via a new
interface that does intelligent things: for instance, automatically locating
the appropriate ISO in the host, or checking if the guest agent is already
installed and kicking off the installer automatically after mounting (and if
not, passing back some indication that something like virt-manager can use to
guide the user to the next steps).
For users of GUI-based management tools like virt-manager, this would all
manifest in a simple, tooltip-guided "Install Guest Additions" button, as with
virtualbox/VMWare.
TODO/KNOWN ISSUES:
- qemu-ga has a single notable dependency, glib, which makes it easy to build
a single executable 32-bit and 64-bit executable that runs on multiple distros.
Even so, we have issues with glibc that require an older host, like RHEL5, or a
cross-build environment, to build. With other projects this mismatches will be
more pronounced. To take some of the subtleties out of the equation, it would
be ideal to tie this ISO generation command into Makefile and do some logic
during configuration to gather up all these variables and determine whether or
not we can generate the ISO and what's needed to build it. So far the known
requirements are glibc <= 2.5 and glib >= 2.0. A user could then attempt to
resolve these dependencies by building on a different host, or putting together
a cross-build environment that meets these dependencies. Similar handling would
be needed for MinGW-based builds when support for windows guest tools are added.
- Support for interactive/graphical installs would be nice. For now we're
command-line only.
- Currently every tool's installer script needs to do stuff to figure out what
arch/distro/platform it's on. Ideally this would all be done via the installer
harness, which would then pass the information to individual installers as
environment variables or parameters.
Any comments on the approach/code are welcome.
guest-tools-iso/install.linux | 7 ++
.../projects/qemu-ga/debian/qemu-ga.init | 112 ++++++++++++++++++++
.../projects/qemu-ga/debian/qemu-ga.sysconfig | 14 +++
guest-tools-iso/projects/qemu-ga/install.linux | 61 +++++++++++
.../projects/qemu-ga/redhat/qemu-ga.init | 97 +++++++++++++++++
.../projects/qemu-ga/redhat/qemu-ga.sysconfig | 14 +++
scripts/build-guest-iso.sh | 46 ++++++++
7 files changed, 351 insertions(+), 0 deletions(-)
- [Qemu-devel] [RFC] QEMU Guest Tools ISO Follow-up,
Michael Roth <=
- [Qemu-devel] [PATCH 1/5] guest tools: add iso/tarball generator for guest tools, Michael Roth, 2011/08/22
- [Qemu-devel] [PATCH 2/5] guest tools: installer harness, Michael Roth, 2011/08/22
- [Qemu-devel] [PATCH 4/5] guest tools: qemu-ga, redhat init scripts, Michael Roth, 2011/08/22
- [Qemu-devel] [PATCH 5/5] guest tools: installer for qemu-ga, Michael Roth, 2011/08/22
- [Qemu-devel] [PATCH 3/5] guest tools: qemu-ga, debian init files, Michael Roth, 2011/08/22