Commit Graph

2788 Commits

Author SHA1 Message Date
Richard W.M. Jones
87fb6d852d fish: Allow -d UUID (specify libvirt domains by UUID).
This applies in all the commands which use the common C option parsing
code, ie:

* guestfish
* guestmount
* virt-cat
* virt-df
* virt-filesystems
* virt-inspector
* virt-ls
* virt-rescue
2011-05-06 13:04:19 -04:00
Richard W.M. Jones
be3b028d7f add-domain: Add allowuuid flag to allow UUIDs to be used for names.
This makes a backwards-compatible change to the add-domain API.  If
the optional allowuuid flag is true then UUIDs can be used instead of
names in the domain name parameter.
2011-05-06 13:04:18 -04:00
Richard W.M. Jones
a4c28b4ed1 add-domain: Suppress libvirt errors on stderr.
Install an error handler on the libvirt error connection so that
errors are not printed on stderr (instead they go up through the usual
libguestfs error mechanism).

Unfortunately this doesn't suppress initial connection error messages
to stderr.  I cannot see how to do this without affecting the global
libvirt error handler, which is not acceptable for a library to be
doing.
2011-05-06 13:03:50 -04:00
Richard W.M. Jones
c49fc3831d doc: Use I<-...> for cross-references to command line options.
This is now used consistently across all the documentation.
2011-05-01 17:43:18 -04:00
Richard W.M. Jones
988a878464 df: Refresh virt-df(1) man page.
Add examples.

Refresh description.

Use I<...> to refer to command line options.
2011-05-01 14:53:23 -04:00
Richard W.M. Jones
805e6dbc15 guestfs(3): Note that host file size limits affect guest disk limits. 2011-04-30 20:12:07 -04:00
Richard W.M. Jones
40f2b698ac guestfs(3): Refresh documentation for private data area keys. 2011-04-30 19:39:01 -04:00
Richard W.M. Jones
e1836891d4 guestfs(3): Document that old callback functions still work. 2011-04-30 19:26:08 -04:00
Richard W.M. Jones
108d7a134c guestfs(3): Referenced section is above, not below. 2011-04-30 19:10:52 -04:00
Richard W.M. Jones
a5e421570c guestfs(3): Refresh autosync gotcha documentation. 2011-04-30 19:10:25 -04:00
Richard W.M. Jones
470e373eea guestfs(3): Writing to a file descriptor, not just a pipe. 2011-04-30 18:45:56 -04:00
Richard W.M. Jones
dd86183f3f guestfs(3): Refresh documentation for guestfs_create, guestfs_close. 2011-04-30 18:31:06 -04:00
Richard W.M. Jones
91b35746b4 Add a trace message to guestfs_close.
Only the "first half" (ie. the call) is traced, because by the time
the function returns the handle has gone and there's no way to
generate events.

You should see:

  libguestfs: trace: close
2011-04-30 05:55:27 -04:00
Richard W.M. Jones
10167cea98 internal: Use size_t instead of int for command line size. 2011-04-30 05:49:06 -04:00
Richard W.M. Jones
478b2d80ed guestfs_close: Move local variables close to code that uses them.
This is just code motion.
2011-04-30 05:45:26 -04:00
Richard W.M. Jones
b2f8627ab5 guestfs_close: Remove unused local variable. 2011-04-30 05:42:43 -04:00
Richard W.M. Jones
c0f96e9c6e guestfs(3): Document limits. 2011-04-27 20:10:24 +01:00
Richard W.M. Jones
ea293658f4 todo: Integrate with CMDBs (thanks Quinten Laureijs). 2011-04-26 11:00:10 +01:00
Richard W.M. Jones
f24494195a python: Ensure Python GIL state is correct during callback.
This updates commit 2cac52000a.
2011-04-22 22:53:07 +01:00
Richard W.M. Jones
dfd7efb91f Version 1.11.3. 1.11.3 2011-04-22 22:26:02 +01:00
Richard W.M. Jones
2cac52000a python: Implement new event API.
This implements set_event_callback and delete_event_callback so that
Python programs can use the new event mechanism.
2011-04-22 21:50:16 +01:00
Richard W.M. Jones
16da7589e9 python: Rearrange C files for bindings.
Move the hand-written functions into two new files:
guestfs-py.h and guestfs-py-byhand.c

This is just code motion.
2011-04-22 21:50:15 +01:00
Richard W.M. Jones
3acf732c2f perl: Decrement refcount in $g->delete_event_callback.
This updates commit bc468c87d0.
2011-04-22 21:50:15 +01:00
Richard W.M. Jones
0da6f55a67 inspect: Look for %systemroot%/system32 for Windows heuristic.
The virt-v2v transfer ISO had a /windows directory.  The core
inspection code thought this was a Windows root filesystem.
2011-04-21 17:33:48 +01:00
Richard W.M. Jones
782f3a3646 list-applications: If software hive is missing, this is an error.
virt-inspector would exit silently if list-applications failed along
this error path.
2011-04-21 17:29:44 +01:00
Richard W.M. Jones
2b0ca7e7b8 inspect: "centos" and "scientificlinux" are now separate distros.
Previously we returned "rhel" for these, which was not accurate.
2011-04-21 15:09:11 +01:00
Richard W.M. Jones
a9ac448cf8 Update TODO. 2011-04-21 14:47:57 +01:00
Richard W.M. Jones
6d0d3b7f02 Version 1.11.2. 1.11.2 2011-04-18 21:47:45 +01:00
Richard W.M. Jones
08dc4a87b9 python: Release Python GIL while running libguestfs calls.
Release the Python global interpreter lock while running libguestfs
calls.

We don't release it around guestfs_create() because that is a short
call that just allocates memory.  We do release it around
guestfs_close() since that is a potentially long-running (it can call
wait(2) amongst other things).  We also release it around all the
other generated Python calls.

We don't yet support callbacks into Python code (ie. the new event
API).  But when we do in future, we will need to also handle the GIL
around those callbacks.

This code is adapted from libvirt's python/typewrappers.h.  Thanks to
Dan Berrange for showing us how to do this properly.
2011-04-18 20:21:38 +01:00
Richard W.M. Jones
a3cce46557 fish: --rw option will be mandatory in 1.12 not 1.10. 2011-04-16 21:35:11 +01:00
Richard W.M. Jones
4c2bb8b301 fish: Fix typo in guestfish man page (--format option). 2011-04-16 21:26:15 +01:00
Richard W.M. Jones
34d9fed24a inspector: Refresh the virt-inspector(1) manpage. 2011-04-16 21:15:10 +01:00
Richard W.M. Jones
5d139fa8a4 run script: Don't depend on libtool being installed.
Also use 'exec' to run the program.
2011-04-16 15:29:58 +01:00
Richard W.M. Jones
79f5720d2c Version 1.11.1. 1.11.1 2011-04-16 14:57:33 +01:00
Richard W.M. Jones
340ff70c1e Add images/guestfs-aux/fedora-packages.db{,.txt} to EXTRA_DIST.
This updates commit d95874db3d.
2011-04-16 14:56:38 +01:00
Richard W.M. Jones
33a2c184e1 Remove local LIBGUESTFS_PATH detection from guestfish and guestmount.
Remove the hack that let you run ./fish/guestfish or
./fuse/guestmount.  You now have to do:

  ./run ./fish/guestfish
or
  ./run ./fuse/guestmount

to run these programs without installing.
2011-04-16 08:32:48 +01:00
Richard W.M. Jones
5790f5bfaf Remove ad-hoc run*locally scripts, replace with './run'
Remove all the run*locally scripts and replace with a single top level
./run shell script.
2011-04-16 08:32:44 +01:00
Richard W.M. Jones
0108d7861d inspector: Handle write failures when creating example-*.xml. 2011-04-14 18:20:30 +01:00
Richard W.M. Jones
67493bfca4 Delete file so db_load doesn't run incrementally.
It turns out that db_load incrementally updates the database (instead
of writing a new one).  Remove the old database to force db_load to
write a new one.

This also ensures that we handle write failure gracefully.
2011-04-14 18:20:30 +01:00
Richard W.M. Jones
36d3a4ce53 inspector: Include <hostname> in output. 2011-04-14 18:20:26 +01:00
Richard W.M. Jones
d95874db3d inspect: Get version and release of RPM packages.
This commit downloads the Packages RPM database allowing us to find
other details about installed RPM packages (via
inspect-list-applications).  This adds version and release.  Epoch
cannot yet be found.

This commit also updates the Fedora example image so that it contains
a dummy RPM Packages database with some data.
2011-04-14 18:19:42 +01:00
Richard W.M. Jones
a986e8dadb inspect: Abstract out db_dump code for listing RPM applications.
There are two changes here:

(1) The code for listing RPM applications ran db_dump and parsed the
output.  We abstract out that parsing code into a separate reusable
module (src/dbdump.c).

(2) The old db_dump parsing code used db_dump -p (printable) format.
Instead use db_dump -k (hex) format so we can read binary fields.
2011-04-14 13:28:02 +01:00
Richard W.M. Jones
3336b5448f inspect: Split code into separate files.
The src/inspect.c file had grown rather large -- 3,500 lines.  Split
it across several files according to function.

This is just moving code.

After the split the files are more evenly divided:

  536 src/inspect_apps.c
  766 src/inspect.c
  537 src/inspect_fs.c
  404 src/inspect_fs_cd.c
  785 src/inspect_fs_unix.c
  535 src/inspect_fs_windows.c
 3563 total
2011-04-14 11:29:19 +01:00
Richard W.M. Jones
439a42efdb inspect: Move shared PCRE match functions to separate file.
This is just moving code around.
2011-04-13 23:02:45 +01:00
Richard W.M. Jones
3c1f762abe inspect: Cache downloaded files in the handle g->tmpdir.
During inspection we download various files such as the Windows
'software' and 'system' registries.  Previously these were downloaded
as temporary files and discarded immediately after use.  This meant
that the 'software' registry was being downloaded twice by
virt-inspector (it's required once for basic OS inspection, and a
second time to list Windows applications).

This commit changes this so that these files are cached in g->tmpdir,
and thus the second time we just reuse the file we've already
downloaded.

Callers shouldn't be relying on inspect-list-applications to reread
the actual registry from the VM (unless you close and reopen the
handle).  It says in the documentation that the results of inspection
may be cached in the handle.
2011-04-13 22:35:35 +01:00
Richard W.M. Jones
70975981be Remove temporary directory containing arbitrary files.
In preparation for caching inspection information in the temporary
directory (g->tmpdir), allow the temporary directory to contain
arbitrary files, and remove all of them when the handle is closed.

This just generalizes the previous method of cleaning up the tmpdir.
2011-04-13 22:02:08 +01:00
Jim Meyering
6740028b33 Include string.h and libintl.h, as needed.
* df/df.c: As above.
* df/main.c: As above.
* df/output.c: As above.
* fuse/guestmount.c: As above.
* inspector/virt-inspector.c: As above.
* rescue/virt-rescue.c: As above.
2011-04-13 14:26:06 +01:00
Jim Meyering
ace1795d10 Add more missing include directives.
* cat/virt-cat.c: Include string.h and libintl.h.
* cat/virt-filesystems.c: Likewise.
* cat/virt-ls.c: Likewise.
2011-04-13 14:25:56 +01:00
Nikita A Menkovich
173c374bd0 debian: Add dependency on libpcre-ocaml-dev. 2011-04-13 12:41:27 +01:00
Jim Meyering
0db662eae5 Add missing include directives.
* fish/config.c: Include string.h, for use of strlen.
* fish/keys.c: Likewise, but for use of memcpy.
* fish/man.c: Likewise, but for use of memset.
2011-04-13 12:06:27 +01:00