From 027897d4ddaf886a309a032b488f64512d2dc873 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sun, 26 Apr 2009 06:34:54 +0100 Subject: [PATCH] Document qemu wrappers. --- guestfs.pod | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/guestfs.pod b/guestfs.pod index f133a1c..9cef777 100644 --- a/guestfs.pod +++ b/guestfs.pod @@ -632,6 +632,30 @@ sort of connection control, when the daemon launches it sends an initial word (C) which indicates that the guest and daemon is alive. This is what C waits for. +=head1 QEMU WRAPPERS + +If you want to compile your own qemu, run qemu from a non-standard +location, or pass extra arguments to qemu, then you can write a +shell-script wrapper around qemu. + +There is one important rule to remember: you I> as +the last command in the shell script (so that qemu replaces the shell +and becomes the direct child of the libguestfs-using program). If you +don't do this, then the qemu process won't be cleaned up correctly. + +Here is an example of a wrapper, where I have built my own copy of +qemu from source: + + #!/bin/sh - + qemudir=/home/rjones/d/qemu + exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "$@" + +Save this script as C (or wherever), C, +and then use it by setting the LIBGUESTFS_QEMU environment variable. +For example: + + LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish + =head1 ENVIRONMENT VARIABLES =over 4 @@ -652,6 +676,8 @@ Set the default qemu binary that libguestfs uses. If not set, then the qemu which was found at compile time by the configure script is used. +See also L above. + =back =head1 SEE ALSO -- 1.8.3.1