summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add test for qemu broken -machine option (RHBZ#748266).Richard W.M. Jones2011-10-241-0/+12
| | | | | | | Also add this option, if necessary, when testing for virtio-serial support. When the workaround is enabled, we specify machine type 'pc'.
* add-drive-opts: Correctly handle unreadable and unwritable files (RHBZ#747287).Richard W.M. Jones2011-10-211-3/+14
|
* lib: Common code for formatting the qemu -drive parameter.Richard W.M. Jones2011-10-211-28/+32
| | | | This is just code refactoring.
* Allow compilation without hivex (RHBZ#723474).Richard W.M. Jones2011-10-213-96/+97
|
* inspection: Return root devices sorted.Richard W.M. Jones2011-10-191-0/+11
|
* inspect: Handle cciss devices in /etc/fstabMatthew Booth2011-10-191-0/+32
|
* inspect: Don't assume number of captures in match functionsMatthew Booth2011-10-191-30/+13
| | | | | | | | | | | | | | | It is possible for the pcre library to return a variable number of captures for a single regular expression. e.g.: ^/dev/(cciss/c\d+d\d+)(?:p(\d+))?$ This will return either 1 or 2 captures depending on whether the device has a partition suffix. The current match wrappers don't allow for this, and require that a predictable number of matches are returned. This change updates match, match1, match2, and match3 to ignore the specific number of matches returned. Instead, any returned captures are assigned to the given arguments, and any remaining arguments are set to NULL.
* inspect: Add drive naming hintsMatthew Booth2011-10-194-19/+46
| | | | | | | | | | | We currently use a heuristic to guess how drive names we find referenced in the guest map to drive names in the appliance. If this heuristic fails it can cause inspection to fail. This change adds a new 'name' option to add_drive_opts, which allows the user to explicitly pass the name of a drive to libguestfs if it is known. This change also updates the fstab-parsing inspection code to use this information if it is available.
* NFC: Remove unnecessary gotoMatthew Booth2011-10-191-7/+5
|
* launch: Store drive information in guestfs_hMatthew Booth2011-10-194-35/+127
| | | | | | | | | | | | | | | | | | This is a NFC on its own, but provides a place-holder for drive metadata which can be used after launch. Fixes by RWMJ: - Fix the tests: this requires a new internal function 'debug-drives' that dumps out the g->drives information so it can be checked in two of the tests. Previously these tests used 'debug-cmdline'. - Test file existence / use_cache_off in the add_drive_opts function, not when launching qemu in the child process. - Call free along error paths. - Add comments.
* inspect: Fix fstab device mapping for >26 disksMatthew Booth2011-10-191-20/+31
| | | | | The regular expression matching disk name assumed that there was only a single letter suffix. This change handles a naming scheme for any number of disks.
* launch: Ensure g->cmdline is allocated before assigning g->cmdline[0].Richard W.M. Jones2011-10-191-7/+14
|
* Add basic support for netbsd detection.Michael Scherer2011-10-146-1/+70
|
* Add support for pkgsrc, default NetBSD package manager.Michael Scherer2011-10-143-1/+4
| | | | | | For now, only detect the tool, but support from reading installed package could be added later ( may require either a package of pkgsrc, or a smaller tool to read the db ).
* Add support for mounting ufs from NetBSD, and fix FreeBSD detection on Fedora 16Michael Scherer2011-10-141-2/+9
| | | | | | | | While testing on Fedora 16, I noticed that Linux will mount the disk without trouble by using automatically ufstype=old, and yet do not let us read the directories. So we should start directly with usftype=ufs2, and if it fail, try 44bsd, as used for netbsd and openbsd ( as seen on http://wiki-static.aydogan.net/How_to_mount_FFS_partition_under_Linux ).
* Add the Opensuse logo ( thanks to Vincent Untz )Michael Scherer2011-10-141-0/+14
| | | | Like Ubuntu one, it may not be always present.
* Add Opensuse and zypper detection supportMichael Scherer2011-10-144-0/+19
| | | | This would also erronously detect SLES as Opensuse.
* Add support for Ubuntu logoMichael Scherer2011-10-141-2/+13
| | | | | | Ths logo is present on Lucid Lynx, but may not always be installed, like in case of a minimal installation ( or server ). While Edubuntu and Kubuntu have different logo, I didn't check where it would be placed.
* Detect Mageia distributionMichael Scherer2011-10-145-0/+21
|
* Add systemtap/DTrace probes.Richard W.M. Jones2011-10-103-0/+102
| | | | | Mainly this is a documentation change. However a sample of DTrace-compatible userspace probes are also added.
* New tool: virt-sysprep: system preparation for guests.Richard W.M. Jones2011-10-081-0/+6
|
* New tool: virt-alignment-scan to check alignment of partitions.Richard W.M. Jones2011-10-051-0/+5
|
* docs: Add directory sections for resize/ and sparsify/Richard W.M. Jones2011-10-051-0/+8
|
* New tool: virt-sparsify to make disk images sparse.Richard W.M. Jones2011-10-041-0/+1
|
* docs: Add virt-resize to list of links in guestfs(3).Richard W.M. Jones2011-10-041-0/+1
|
* docs: virt-win-reg is written in Perl, not virt-resize.Richard W.M. Jones2011-10-041-1/+1
|
* Update API support documentation.Richard W.M. Jones2011-10-0435-0/+14948
|
* mount: No longer implicitly add -o sync,noatime options.Richard W.M. Jones2011-10-011-0/+3
|
* New API: set-smp, get-smpRichard W.M. Jones2011-09-283-0/+29
| | | | | | | These calls allow you to change the number of virtual CPUs assigned to the appliance. This also adds a --smp option to virt-rescue.
* New APIs: compress-out, compress-device-out.Richard W.M. Jones2011-09-281-1/+1
| | | | | | | | | | | | | | | | | These APIs let you copy compressed files or devices out from the disk image. Compression is useful for large images which are mostly zeroes. We cannot currently do sparseness detection, and compression gives us a form of zero detection for free. Example usage: $ guestfish --ro -a /dev/vg_pin/F16x64 -i \ compress-out gzip /etc/passwd /tmp/passwd.gz $ file -z /tmp/passwd.gz /tmp/passwd.gz: ASCII text (gzip compressed data, was "passwd", from Unix, last modified: Sun Aug 28 14:40:46 2011)
* Add no_timer_check to disable faulty test during boot (RHBZ#502058).Richard W.M. Jones2011-09-261-0/+1
| | | | | | | | | See: https://bugzilla.redhat.com/show_bug.cgi?id=502058#c15 https://bugzilla.redhat.com/show_bug.cgi?id=698842#c8 This updates commit 79e66f89e2f6c27486476d7857da58feb491bf5c.
* docs: Show how to use a qemu wrapper to edit the qemu command line.Richard W.M. Jones2011-09-261-0/+23
|
* Enable APIC.Richard W.M. Jones2011-09-211-1/+0
| | | | | | | | | Originally this was disabled to work around RHBZ#502058. That bug was never officially fixed, but it may have fixed itself. In the meantime, KVM has broken ordinary PIC support (RHBZ#723822). Since APIC is the most common way that regular Linux and Windows guests run it makes sense to remove this hack.
* Add Erlang bindings.Richard W.M. Jones2011-09-211-2/+9
|
* inspection: Handle /dev/root in /etc/fstab.Richard W.M. Jones2011-09-161-0/+3
| | | | | | | This means "the device that holds /etc/fstab", so map it correctly. This fixes support for ttylinux and also some other guests that use /dev/root instead of a real device name.
* inspection: Add support for ttylinux (a minimal Linux).Richard W.M. Jones2011-09-165-0/+15
|
* docs: Add a section explaining the appliance boot process.Richard W.M. Jones2011-09-071-0/+93
|
* Add GUESTFS_EVENT_ENTER event.Richard W.M. Jones2011-08-262-5/+22
| | | | This event is generated whenever a libguestfs function is called.
* Coverity: fix memory leak along error path.Richard W.M. Jones2011-08-231-0/+12
|
* pclose: Fix other places where we only tested pclose == -1.Richard W.M. Jones2011-08-232-2/+2
| | | | pclose can return > 0 when the status of the command was non-zero.
* test_qemu: Improve the error message.Richard W.M. Jones2011-08-231-1/+2
| | | | | Note that errno is probably not set to a useful value here, so there is not much point recording it.
* test_qemu: pclose may return any != 0 on error.Richard W.M. Jones2011-08-231-1/+1
| | | | In particular pclose returns a status > 0 if the command fails.
* qemu detection: Free up previous qemu help/version strings if they exist.Richard W.M. Jones2011-08-231-0/+5
|
* Coverity: test_qemu: Ensure FILE * is not leaked along error paths.Richard W.M. Jones2011-08-231-15/+21
| | | | | This refactors the code in test_qemu slightly to ensure that FILE *fp is not leaked on error paths.
* Escape special/non-printing characters in debug output (RHBZ#731744).Richard W.M. Jones2011-08-181-12/+42
| | | | | | | | | | | | | | | | | | The default event handler in libguestfs was simply writing all debug output directly to stderr. However if the output contains non-printable characters such as terminal control codes then these would also be sent directly. With newer SeaBIOS there is a lame attempt to implement a splash screen using terminal control codes, thus when libguestfs tries to display debugging output it would cause the screen to clear and debug output to be lost. This commit causes all non-printing characters to be escaped. (\n and \r characters from the appliance are treated somewhat specially). Furthermore, instead of using write(2), use buffered stderr calls.
* Remove guestfs___print_timestamped_argv.Richard W.M. Jones2011-08-183-48/+90
| | | | | | | | | | | | | | | | | | | | | | | This function was used to print the qemu and febootstrap-supermin-helper command lines. Unfortunately in the qemu case it was used incorrectly: it called the internal debug function (ie. event API callback) from the forked qemu subprocess, which meant that higher level event callbacks might have been invoked from the child process. To fix this, convert the qemu case into a new function called print_qemu_command line which just prints the command line directly to stderr. This is called after stderr has been redirected into the pipe to the main process. Thus the qemu command line will be marshalled into the event API along with other qemu and appliance output. After fixing this, only one use of guestfs___print_timestamped_argv remained, for printing the febootstrap-supermin-helper command line. This is converted to a local function print_febootstrap_command_line. Also print_febootstrap_command_line is now called before we fork febootstrap-supermin-helper, so that messages no longer overlap.
* out-of-tree build: fix building libraryHilko Bengen2011-08-151-3/+3
|
* out-of-tree build: fix documentation generationHilko Bengen2011-08-151-4/+4
|
* inspection: Better checking for Windows root disks (RHBZ#729075).Richard W.M. Jones2011-08-083-30/+75
| | | | | | | | | | | | | | | | | Previously any disk that had /autoexec.bat or /boot.ini or /ntldr would be picked up as a candidate for a Windows root disk. If further checking could not find any systemroot (eg. /windows) then this would result in complete failure of inspection. In particular, this got confused by Hp_recovery partitions which have /autoexec.bat, but don't have a systemroot in one of the usual places (they have /MiniNT instead). What we do now is to properly investigate all possible systemroot places before deciding this is a Windows systemroot, so the subsequent failure cannot occur. (Thanks to lorimar for reporting this bug).
* docs: guestfs_set_out_of_memory_handler returns void, not int.Richard W.M. Jones2011-08-061-2/+2
| | | | It always has done. The documentation was wrong.