diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-22 09:00:39 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-22 09:00:39 +0100 |
commit | 43db06ea892cc157324a6b837ca430607441c509 (patch) | |
tree | fc377195fcfda3b163d8f184a6965bb64b1bb018 /python/guestfs.py | |
parent | 54dd7be5855055a698291084c0074a1abac7b921 (diff) | |
download | libguestfs-43db06ea892cc157324a6b837ca430607441c509.tar.gz libguestfs-43db06ea892cc157324a6b837ca430607441c509.tar.xz libguestfs-43db06ea892cc157324a6b837ca430607441c509.zip |
Allow qemu binary to be overridden at runtime.
Diffstat (limited to 'python/guestfs.py')
-rw-r--r-- | python/guestfs.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/python/guestfs.py b/python/guestfs.py index 6417caf4..e5f43d1f 100644 --- a/python/guestfs.py +++ b/python/guestfs.py @@ -143,6 +143,32 @@ class GuestFS: """ return libguestfsmod.config (self._o, qemuparam, qemuvalue) + def set_qemu (self, qemu): + u"""Set the qemu binary that we will use. + + The default is chosen when the library was compiled by + the configure script. + + You can also override this by setting the + "LIBGUESTFS_QEMU" environment variable. + + The string "qemu" is stashed in the libguestfs handle, + so the caller must make sure it remains valid for the + lifetime of the handle. + + Setting "qemu" to "NULL" restores the default qemu + binary. + """ + return libguestfsmod.set_qemu (self._o, qemu) + + def get_qemu (self): + u"""Return the current qemu binary. + + This is always non-NULL. If it wasn't set already, then + this will return the default qemu binary name. + """ + return libguestfsmod.get_qemu (self._o) + def set_path (self, path): u"""Set the path that libguestfs searches for kernel and initrd.img. |