summaryrefslogtreecommitdiffstats
path: root/src/guestfs.pod
Commit message (Collapse)AuthorAgeFilesLines
* Add Lua bindings.Richard W.M. Jones2012-11-171-0/+7
| | | | | | | | These are relatively complete, although only lightly tested. Missing: - events - last_errno - user_cancel
* tests: Add 'make check-slow' rule to recursively run slow/long-running tests.Richard W.M. Jones2012-11-131-0/+4
|
* tests: Replace 'make extra-tests' with individual tests.Richard W.M. Jones2012-11-131-8/+53
| | | | | | | | | | | | | | | | | | | | | | | | | 'make extra-tests' was a monolithic set of tests that did all sorts of things: valgrind, tests over local guests, tests with upstream qemu, tests with upstream libvirt, tests with the appliance attach method. This made it hard to perform individual tests, eg. just valgrind testing. It was also hard to maintain because the tests were not located in the same directories as the programs and sometimes duplicated tests that were run elsewhere. This commit splits up 'make extra-tests' into 5 separate targets: make check-valgrind # run a subset of tests under valgrind make check-valgrind-local-guests # test under valgrind with local guests make check-with-appliance # test with attach-method == appliance make check-with-upstream-qemu # test with an alternate/upstream qemu make check-with-upstream-libvirt # test with an alternate/upstream libvirt (You can also still run 'make extra-tests' which is now simply a rule that runs the above 5 targets in order). This replaces everything that was in the tests/extra directory, so that has now gone.
* lib: Add new C API calls: guestfs_push_error_handler,Richard W.M. Jones2012-11-091-0/+26
| | | | | | | | | | | | | | | | | guestfs_pop_error_handler. The addition of these calls makes it much simpler to temporarily disable or ignore errors: guestfs_push_error_handler (g, NULL, NULL); guestfs_mkdir (g, "/foo"); /* We don't care if this fails. */ guestfs_pop_error_handler (g); Note these calls are used by the C API only. They are not necessary in other languages, because those map errors to exceptions. The subsequent commits change existing code to use push/pop instead of laboriously saving and restoring the error handler.
* lib: Rework temporary and cache directory code.Richard W.M. Jones2012-11-091-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New APIs: set-tmpdir, get-tmpdir, set-cachedir, get-cachedir. The current code has evolved over time and has a number of problems: (a) A single environment variable ($TMPDIR) controls the location of several directories. (b) It's hard for the library user to predict which directory libguestfs will use, unless the user simulates the same internal steps that libguestfs performs. This commit fixes these issues. (a) Now three environment variables control the location of all small temporary files, and the appliance cache: For temporary files: $LIBGUESTFS_TMPDIR or $TMPDIR or /tmp. For the appliance cache: $LIBGUESTFS_CACHEDIR or $TMPDIR or /var/tmp. The user can also set these directories explicitly through API calls (guestfs_set_tmpdir and guestfs_set_cachedir). (b) The user can also retrieve the actual directories that libguestfs will use, by calling guestfs_get_tmpdir and guestfs_get_cachedir. These functions are also used internally. This commit also: - reworks the internal tmpdir code - removes the internal (undocumented) guestfs_tmpdir call (replacing it with calls to the documented guestfs_get_tmpdir API instead) - changes the ./run script to set LIBGUESTFS_TMPDIR and LIBGUESTFS_CACHEDIR - adds a test - fixes a few places like libguestfs-make-fixed-appliance which depended on $TMPDIR
* lib: Add inspect_list_applications2 method (RHBZ#859949)John Eckersberg2012-11-011-1/+1
| | | | | | RWMJ: - Fix memory leak in guestfs__inspect_list_applications wrapper. - Don't document app2_spare* fields.
* build: Source 'localenv' in top-level Makefile.Richard W.M. Jones2012-10-301-0/+35
| | | | Also document 'local*' files.
* docs: Review and clarify ERROR HANDLING section of guestfs(3).Richard W.M. Jones2012-10-251-14/+32
|
* lib: Fix guestfs_create_flags example program in man page.Richard W.M. Jones2012-10-151-2/+4
| | | | This fixes commit 9466060201600db47016133d80af22eb38091a49.
* New APIs: guestfs_create_flags, guestfs_parse_environment,Richard W.M. Jones2012-10-151-3/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | guestfs_parse_environment_list. Add a new function for creating a handle: guestfs_h *guestfs_create_flags (unsigned flags [, ...]); This variant lets you supply flags and extra arguments, although extra arguments are not used at the moment. Of particular interest is the ability to separate the creation of the handle from the parsing of environment variables like LIBGUESTFS_DEBUG. guestfs_create does both together, which prevents us from propagating errors from parsing environment variables back to the caller (guestfs_create has always printed any errors on stderr and then just ignored them). If you are interested in these errors, you can now write: g = guestfs_create_flags (GUESTFS_CREATE_NO_ENVIRONMENT); if (!g) exit (EXIT_FAILURE); r = guestfs_parse_environment (g); if (!r) exit (EXIT_FAILURE); Also you can *omit* the call to guestfs_parse_environment, which creates a handle unaffected by the environment (which was not possible before). This commit also includes new (backwards compatible) changes to the OCaml, Perl, Python, Ruby and Java constructors that let you use the flags.
* New APIs: Model libvirt authentication events through the API.Richard W.M. Jones2012-10-131-0/+136
| | | | | | | | | | | | | | | | | | | | | This commit models libvirt authentication events through the API, adding one new event (GUESTFS_EVENT_LIBVIRT_AUTH) and several new APIs: guestfs_set_libvirt_supported_credentials guestfs_get_libvirt_requested_credentials guestfs_get_libvirt_requested_credential_prompt guestfs_get_libvirt_requested_credential_challenge guestfs_get_libvirt_requested_credential_defresult guestfs_set_libvirt_requested_credential See the documentation and example which shows how to use the new API. This commit also changes existing calls to virConnectOpen* within the library so that the new API is used. Also included is an example (but not a test, because it's hard to see how to automatically test the libvirt API).
* docs: Make 'EVENTS' into its own =head1 section.Richard W.M. Jones2012-10-131-2/+6
| | | | | For some reason it was stuck under "CALLS WITH OPTIONAL ARGUMENTS", which made no sense.
* docs: Fix documentation about hotplugging.Richard W.M. Jones2012-10-101-3/+2
|
* docs: Fully document all subdirectories of the source.Richard W.M. Jones2012-10-091-4/+17
|
* docs: Add overview to guestfs(3)/EXTENDING LIBGUESTFS.Richard W.M. Jones2012-10-091-3/+34
|
* Add support for hotplugging (removing disks).Richard W.M. Jones2012-10-091-3/+7
| | | | | | | | New API: remove-drive. Note because of a bug in fuser, this only works with psmisc >= 22.20. This also updates the hotplugging tests.
* Add support for hotplugging (adding disks) to the libvirt attach-method.Richard W.M. Jones2012-10-081-3/+35
| | | | | | | | | | | | | When libvirt is used, we can allow disks to be hotplugged. guestfs_add_drive can be called after launch to hot-add a disk. When a disk is hot-added, we first ask libvirt to add the disk to the appliance, then we make an internal call into the appliance to get it to wait for the disk to appear (ie. udev_settle ()). Hot-added disks are tracked in the g->drives array. This also adds a test.
* launch: Add add_drive 'label' option.Richard W.M. Jones2012-10-081-0/+20
| | | | | | | | | | | | | | | | | | | | | New API: list-disk-labels Allow the user to pass an optional disk label when adding a drive. This is passed through to qemu / libvirt using the disk serial field, and from there to the appliance which exposes it through udev, creating a special alias of the device /dev/disk/guestfs/<label>. Partitions are named /dev/disk/guestfs/<label><partnum>. virtio-blk and virtio-scsi limit the serial field to 20 bytes. We further limit the name to maximum 20 ASCII characters in [a-zA-Z]. list-devices and list-partitions are not changed: these calls still return raw block device names. However a new call, list-disk-labels, returns a hash table allowing callers to map between disk labels, and block device and partition names. This commit also includes a test.
* syntax: Use __PATTERNS__ instead of @PATTERNS@ in podwrapper man pages.Richard W.M. Jones2012-10-031-3/+3
| | | | | It is slightly dangerous to use @PATTERNS@, since these might be substituted by autoconf when they appear in Makefile.am files.
* run: Label tmp directory.Richard W.M. Jones2012-09-261-5/+0
| | | | | | | | | There's not really any point just documenting that people should label the tmp directory, when we can just label it. So change the ./run script so it calls chcon. However it's not a failure if chcon doesn't work. If SELinux is not installed or is disabled, then labelling will fail.
* docs: Link to guestfs-recipes(1) from intro in guestfs(3).Richard W.M. Jones2012-09-251-0/+2
|
* docs: Add links to various guestfs-* man pages from guestfs(3).Richard W.M. Jones2012-09-201-0/+5
|
* docs: Fix documentation of syntax-check target, add extra-tests.Richard W.M. Jones2012-09-151-2/+7
|
* build: Create new 'tmp' directory for tests.Richard W.M. Jones2012-09-141-0/+12
| | | | | | | | | | | | Having a separate directory means: (1) It's easy to clean up orphaned temporary files, the appliance, etc. (2) You can put an SELinux label on this directory so that qemu can write to it when you're using sVirt and SELinux is enforcing: chcon --reference=/tmp tmp
* guestfs(3): Document disk image formats and how to detect them.Richard W.M. Jones2012-09-031-0/+87
|
* generator: Rename 'generator_*' as '*'.Richard W.M. Jones2012-09-021-10/+9
| | | | | | | | | This is a simple renaming of the files/modules. Note that in OCaml, module names are derived from filenames by capitalizing the first letter. Thus the old module names had the form "Generator_api_versions". The new modules names have the form "Api_versions".
* New APIs: hivex_*Richard W.M. Jones2012-08-291-6/+9
| | | | | | | | | | | Transscribe many hivex(3) APIs into the libguestfs API. There is one hive handle per libguestfs handle, as with Augeas. Note that hivex uses iconv_open for some APIs (eg. hivex_value_string). But since we delete all the i18n files from the appliance, this doesn't work -- iconv_open returns EINVAL. Therefore hivex APIs which require iconv cannot be bound in the daemon.
* man pages: Ensure consistent copyright/author sections, remove licenseRichard W.M. Jones2012-08-211-48/+0
| | | | | | | | | | section. Ensure each man page contains consistent COPYRIGHT and AUTHOR sections. Remove the LICENSE section. We will add that back in podwrapper in a later commit.
* docs: Document null disks.Richard W.M. Jones2012-08-211-0/+61
| | | | | It's always been possible to use /dev/null as a disk image. Document this formally in the API.
* Replace mount-options with mount where appropriate.Richard W.M. Jones2012-08-181-3/+3
| | | | | | Since our minimum supported version is now 1.16 and mount was fixed in 1.13.16, it is now safe to replace mount-options + empty options with mount wherever it occurs.
* docs: Rewrite section on protocol limits again.Richard W.M. Jones2012-08-171-22/+20
| | | | This updates commit 92e241440d361e9491a9d96d23ad7a378cb2ab6a.
* docs: Update documentation to reflect no 2/4 MB protocol limits.Richard W.M. Jones2012-08-171-12/+21
|
* Convert release notes to a POD file / man page.Richard W.M. Jones2012-08-111-1/+1
| | | | | Note that we add the text version to git so that it's available for people to read without requiring any special tools.
* Document problems copying long filenames from NTFS to Linux filesystems ↵Richard W.M. Jones2012-08-031-0/+22
| | | | (RHBZ#845488).
* launch: Allow default attach-method to be set in environment or configure.Richard W.M. Jones2012-07-231-0/+5
| | | | | | | | | | You can now choose the default attach method in two ways: (1) Set the LIBGUESTFS_ATTACH_METHOD environment variable. (2) ./configure --with-default-attach-method=appliance|libvirt|... Note that (1) overrides (2).
* Add attach-method "libvirt" or "libvirt:<URI>".Richard W.M. Jones2012-07-211-0/+2
| | | | | With this commit, you can set the attach method to libvirt, but calling launch will give an error.
* docs: Use L<...> for links.Richard W.M. Jones2012-07-171-1/+1
| | | | | Instead of working around bugs, podwrapper has been fixed so that links work in all output formats.
* docs: febootstrap is in section 8 of the manual, not section 1.Richard W.M. Jones2012-07-161-1/+1
|
* New API: guestfs_shutdown: Cleanly shutdown the backend.Richard W.M. Jones2012-07-031-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | The new API splits orderly close into a two-step process: if (guestfs_shutdown (g) == -1) { /* handle the error, eg. qemu error */ } guestfs_close (g); Note that the explicit shutdown step is only necessary in the case where you have made changes to the disk image and want to handle write errors. Read the documentation for further information. This change also: - deprecates guestfs_kill_subprocess - turns guestfs_kill_subprocess into the same as guestfs_shutdown - changes guestfish and other tools to call shutdown + close where necessary (not for read-only tools) - updates documentation - updates examples
* New API: guestfs_canonical_device_name.Richard W.M. Jones2012-06-131-1/+1
| | | | This API makes device names canonical, eg. /dev/vda1 -> /dev/sda1.
* New API: guestfs_max_disks.Richard W.M. Jones2012-06-131-0/+13
| | | | Returns the maximum number of disks that may be added to a handle.
* Update documentation on maximum number of disks.Richard W.M. Jones2012-06-131-8/+10
|
* New API: filesystem-available: tests for filesystem availability.Richard W.M. Jones2012-06-091-0/+10
| | | | | This also creates an internal filesystem_available function within the daemon.
* Turn libguestfs FAQ into a man page: guestfs-faq(1).Richard W.M. Jones2012-05-011-0/+3
|
* doc: Rewrite description section in man page guestfs(3).Richard W.M. Jones2012-05-011-31/+12
| | | | | Make the introduction in the man page shorter and punchier, so it leads readers directly to other pages of interest.
* lib: Remove the BUSY state.Richard W.M. Jones2012-04-261-17/+16
| | | | | | | | | | | | | | | Originally this state was intended so that in some way you could find out if the appliance was running a command. However there was never a thread-safe way to access the state of the handle, so in effect you could never do anything useful safely with this information. This commit completely removes the BUSY state. The only visible change is to the guestfs_is_busy API. Previously you could never call this safely from another thread. If you called it from the same thread it would always return false (since the current thread can't be running a libguestfs command at that point by definition). Now it always returns false.
* New man page: guestfs-performance(1).Richard W.M. Jones2012-04-111-0/+1
| | | | This contains tips for engineering libguestfs for greatest performance.
* docs: Add libguestfs-test-tool(1) and libguestfs-make-fixed-appliance(1) to ↵Richard W.M. Jones2012-04-111-1/+3
| | | | | | guestfs(3) man page. Inexplicably these were not included before.
* Rewrite virt-sysprep.Richard W.M. Jones2012-03-311-5/+4
|
* New APIs: mount-local, mount-local-run, umount-local (FUSE support in the API).Richard W.M. Jones2012-03-291-0/+52
| | | | | | | | | | Add FUSE support directly to the API. Instead of needing to use the external 'guestmount' command, you can mount the libguestfs filesystem space on a local mountpoint using an API call from any language. Note that although mount-local-run is marked as Cancellable, the current implementation does not support it, but it would be relatively simple to add it.