From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: aliguori@linux.vnet.ibm.com, mdroth@linux.vnet.ibm.com
Subject: [Qemu-devel] [RFC] QEMU Guest Tools ISO Follow-up
Date: Mon, 22 Aug 2011 12:09:15 -0500 [thread overview]
Message-ID: <1314032960-23474-1-git-send-email-mdroth@linux.vnet.ibm.com> (raw)
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(-)
next reply other threads:[~2011-08-22 20:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-22 17:09 Michael Roth [this message]
2011-08-22 17:09 ` [Qemu-devel] [PATCH 1/5] guest tools: add iso/tarball generator for guest tools Michael Roth
2011-08-22 17:09 ` [Qemu-devel] [PATCH 2/5] guest tools: installer harness Michael Roth
2011-08-22 17:09 ` [Qemu-devel] [PATCH 3/5] guest tools: qemu-ga, debian init files Michael Roth
2011-08-22 17:09 ` [Qemu-devel] [PATCH 4/5] guest tools: qemu-ga, redhat init scripts Michael Roth
2011-08-22 17:09 ` [Qemu-devel] [PATCH 5/5] guest tools: installer for qemu-ga Michael Roth
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=1314032960-23474-1-git-send-email-mdroth@linux.vnet.ibm.com \
--to=mdroth@linux.vnet.ibm.com \
--cc=aliguori@linux.vnet.ibm.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).