Matthew Booth [Tue, 18 Oct 2011 12:42:16 +0000 (13:42 +0100)]
inspect: Handle cciss devices in /etc/fstab
Matthew Booth [Tue, 18 Oct 2011 12:30:40 +0000 (13:30 +0100)]
inspect: Don't assume number of captures in match functions
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.
Matthew Booth [Tue, 18 Oct 2011 10:01:01 +0000 (11:01 +0100)]
inspect: Add drive naming hints
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.
Matthew Booth [Mon, 17 Oct 2011 15:07:31 +0000 (16:07 +0100)]
NFC: Remove unnecessary goto
Matthew Booth [Mon, 17 Oct 2011 14:28:47 +0000 (15:28 +0100)]
launch: Store drive information in guestfs_h
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.
Matthew Booth [Fri, 14 Oct 2011 14:00:32 +0000 (15:00 +0100)]
inspect: Fix fstab device mapping for >26 disks
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.
Richard W.M. Jones [Wed, 19 Oct 2011 14:20:19 +0000 (15:20 +0100)]
launch: Ensure g->cmdline is allocated before assigning g->cmdline[0].
Richard W.M. Jones [Wed, 19 Oct 2011 12:42:59 +0000 (13:42 +0100)]
valgrind: guestfish -i: free strings before exit.
This isn't really necessary, but it keeps valgrind happy.
Richard W.M. Jones [Tue, 18 Oct 2011 14:22:01 +0000 (15:22 +0100)]
Ubuntu 11.10: Create /run and /run/lock if not already.
In real machines these directories are a ramdisk.
Richard W.M. Jones [Mon, 17 Oct 2011 14:26:43 +0000 (15:26 +0100)]
virt-sysprep: Fix link in documentation.
Richard W.M. Jones [Mon, 17 Oct 2011 08:59:43 +0000 (09:59 +0100)]
Skip guestmount and virt-sysprep tests if no /dev/fuse.
Richard W.M. Jones [Sat, 15 Oct 2011 16:51:16 +0000 (17:51 +0100)]
virt-sysprep: Fix test to use guestmount and virt-inspector binaries that have been built.
Richard W.M. Jones [Fri, 14 Oct 2011 21:08:20 +0000 (22:08 +0100)]
appliance: Fedora cryptsetup-luks renamed to cryptsetup.
Therefore we need both names to be listed in the file.
Richard W.M. Jones [Fri, 14 Oct 2011 21:08:14 +0000 (22:08 +0100)]
roadmap: Fix Bugzilla URL.
Richard W.M. Jones [Fri, 14 Oct 2011 17:22:46 +0000 (18:22 +0100)]
More TODO items.
Richard W.M. Jones [Fri, 14 Oct 2011 17:14:59 +0000 (18:14 +0100)]
Update RELEASE-NOTES file.
Richard W.M. Jones [Fri, 14 Oct 2011 14:14:57 +0000 (15:14 +0100)]
Version 1.13.21.
Erik Nolte [Thu, 6 Oct 2011 21:56:40 +0000 (15:56 -0600)]
Use ArchLinux's new kernel package "linux".
Michael Scherer [Thu, 13 Oct 2011 23:05:05 +0000 (01:05 +0200)]
Add basic support for netbsd detection.
Michael Scherer [Thu, 13 Oct 2011 23:05:07 +0000 (01:05 +0200)]
Add support for pkgsrc, default NetBSD package manager.
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 ).
Michael Scherer [Thu, 13 Oct 2011 23:05:06 +0000 (01:05 +0200)]
Add support for mounting ufs from NetBSD, and fix FreeBSD detection on Fedora 16
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 ).
Michael Scherer [Thu, 13 Oct 2011 23:05:04 +0000 (01:05 +0200)]
Add the Opensuse logo ( thanks to Vincent Untz )
Like Ubuntu one, it may not be always present.
Michael Scherer [Thu, 13 Oct 2011 23:05:03 +0000 (01:05 +0200)]
Add Opensuse and zypper detection support
This would also erronously detect SLES as Opensuse.
Michael Scherer [Thu, 13 Oct 2011 23:05:02 +0000 (01:05 +0200)]
Add support for Ubuntu logo
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.
Michael Scherer [Thu, 13 Oct 2011 23:05:01 +0000 (01:05 +0200)]
Detect Mageia distribution
Michael Scherer [Thu, 13 Oct 2011 23:05:00 +0000 (01:05 +0200)]
Partially fix --disable-erlang
Without this, configure will always enable erlang, no matter what
argument are passed. Now, we can disable it, even if configure still
need the erlang compiler for some obscure reason.
Richard W.M. Jones [Fri, 14 Oct 2011 07:36:00 +0000 (08:36 +0100)]
virt-sysprep: Add cron-spool, mail-spool, utmp.
Richard W.M. Jones [Thu, 13 Oct 2011 22:30:13 +0000 (23:30 +0100)]
virt-sysprep: Use /dev/urandom instead of /dev/random.
Richard W.M. Jones [Thu, 13 Oct 2011 22:29:58 +0000 (23:29 +0100)]
virt-sysprep: More clarifications to the man page.
Richard W.M. Jones [Thu, 13 Oct 2011 22:24:28 +0000 (23:24 +0100)]
virt-sysprep: Clarify docs on enabling operations.
Richard W.M. Jones [Thu, 13 Oct 2011 22:20:27 +0000 (23:20 +0100)]
virt-sysprep: Add rhn-systemid.
Richard W.M. Jones [Thu, 13 Oct 2011 14:37:56 +0000 (15:37 +0100)]
virt-sysprep: Switch to using guestmount, add more features.
This switches virt-sysprep to use guestmount instead of guestfish.
This makes the script a little bit easier to modify for sysadmins.
This commit also adds:
- dhcp-client-state
- dhcp-server-state
- logfiles
- random-seed
- smolt-uuid
- yum-uuid
SELinux relabelling, and a section on security in the manual page.
Richard W.M. Jones [Thu, 13 Oct 2011 14:07:41 +0000 (15:07 +0100)]
virt-sysprep: Use Augeas for config file manipulation.
Richard W.M. Jones [Thu, 13 Oct 2011 13:30:35 +0000 (14:30 +0100)]
virt-sysprep: Add prepend_line utility function.
Richard W.M. Jones [Thu, 13 Oct 2011 10:56:52 +0000 (11:56 +0100)]
fish: docs: note how to clean up the remote process properly.
Killing it is always a bad idea, because the qemu subprocess will be
left hanging around. The best thing is to send the exit command.
This also makes the change to virt-sysprep.
Richard W.M. Jones [Thu, 13 Oct 2011 10:54:18 +0000 (11:54 +0100)]
fish: Close guestfs handle explicitly before exiting.
NOTE this is just a cleanup. It is NOT necessary for correctness,
since libguestfs itself is correctly closing the handle in the exit
handler.
Richard W.M. Jones [Thu, 13 Oct 2011 10:34:04 +0000 (11:34 +0100)]
virt-sysprep: Trap ERR as well as EXIT.
Richard W.M. Jones [Thu, 13 Oct 2011 10:13:05 +0000 (11:13 +0100)]
guestmount: Add note to man page about 'fuse' group for Debian.
Richard W.M. Jones [Thu, 13 Oct 2011 10:09:31 +0000 (11:09 +0100)]
virt-sysprep: Simplify calls to guestfish --remote.
Richard W.M. Jones [Thu, 13 Oct 2011 09:36:24 +0000 (10:36 +0100)]
virt-sysprep: Further TODO items (thanks Nikita Menkovich).
Richard W.M. Jones [Thu, 13 Oct 2011 09:36:24 +0000 (10:36 +0100)]
virt-sysprep: Further TODO items (thanks Marko Myllynen, James Antill).
Richard W.M. Jones [Tue, 11 Oct 2011 19:59:29 +0000 (20:59 +0100)]
Version 1.13.20.
Richard W.M. Jones [Tue, 11 Oct 2011 18:20:53 +0000 (19:20 +0100)]
virt-sysprep: Update TODO list again.
Richard W.M. Jones [Tue, 11 Oct 2011 17:04:46 +0000 (18:04 +0100)]
virt-sysprep: Update TODO list (thanks Steve Grubb, Dan Berrange).
Richard W.M. Jones [Mon, 10 Oct 2011 14:13:40 +0000 (15:13 +0100)]
TODO: More virt-sysprep suggestions (thanks librarian).
Richard W.M. Jones [Mon, 10 Oct 2011 12:26:15 +0000 (13:26 +0100)]
Add systemtap/DTrace probes.
Mainly this is a documentation change. However a sample of
DTrace-compatible userspace probes are also added.
Richard W.M. Jones [Mon, 10 Oct 2011 08:51:03 +0000 (09:51 +0100)]
Update TODO file with future plans for virt-sysprep.
Richard W.M. Jones [Sat, 8 Oct 2011 12:59:13 +0000 (13:59 +0100)]
Version 1.13.19.
Richard W.M. Jones [Fri, 7 Oct 2011 18:22:11 +0000 (19:22 +0100)]
New tool: virt-sysprep: system preparation for guests.
Richard W.M. Jones [Fri, 7 Oct 2011 18:20:36 +0000 (19:20 +0100)]
fish: Add man page section on calling guestfish remote robustly from bash.
Richard W.M. Jones [Fri, 7 Oct 2011 12:52:39 +0000 (13:52 +0100)]
virt-alignment-scan: Fix SYNOPSIS in manual page.
Richard W.M. Jones [Fri, 7 Oct 2011 12:42:27 +0000 (13:42 +0100)]
Makefile.am: Fix comment.
Richard W.M. Jones [Thu, 6 Oct 2011 16:37:01 +0000 (17:37 +0100)]
virt-alignment-scan: docs: Add link to RHEL Storage Administration Guide.
Richard W.M. Jones [Thu, 6 Oct 2011 09:23:38 +0000 (10:23 +0100)]
virt-alignment-scan: More information in man page.
Thanks Mike Snitzer.
Richard W.M. Jones [Thu, 6 Oct 2011 09:22:16 +0000 (10:22 +0100)]
virt-resize: Align partitions to multiple of 128 sectors (instead of 64).
This gives us effectively 64 KByte alignment, optimal for all current
types of storage.
Richard W.M. Jones [Wed, 5 Oct 2011 18:12:34 +0000 (19:12 +0100)]
Update RELEASE-NOTES file.
Richard W.M. Jones [Wed, 5 Oct 2011 17:13:38 +0000 (18:13 +0100)]
Version 1.13.18.
Richard W.M. Jones [Wed, 5 Oct 2011 14:06:10 +0000 (15:06 +0100)]
New tool: virt-alignment-scan to check alignment of partitions.
Richard W.M. Jones [Wed, 5 Oct 2011 13:38:07 +0000 (14:38 +0100)]
docs: Add directory sections for resize/ and sparsify/
Richard W.M. Jones [Tue, 4 Oct 2011 21:42:42 +0000 (22:42 +0100)]
Update RELEASE-NOTES file.
Richard W.M. Jones [Tue, 4 Oct 2011 19:00:42 +0000 (20:00 +0100)]
sparsify: Fix --ignore option to work on canonical device names.
Richard W.M. Jones [Tue, 4 Oct 2011 19:00:21 +0000 (20:00 +0100)]
docs: Clearer language in virt-sparsify man page.
Richard W.M. Jones [Tue, 4 Oct 2011 18:24:42 +0000 (19:24 +0100)]
Version 1.13.17.
Richard W.M. Jones [Tue, 4 Oct 2011 10:02:30 +0000 (11:02 +0100)]
New tool: virt-sparsify to make disk images sparse.
Richard W.M. Jones [Tue, 4 Oct 2011 09:58:25 +0000 (10:58 +0100)]
docs: Add virt-resize to list of links in guestfs(3).
Richard W.M. Jones [Tue, 4 Oct 2011 09:58:02 +0000 (10:58 +0100)]
docs: virt-win-reg is written in Perl, not virt-resize.
Richard W.M. Jones [Tue, 4 Oct 2011 09:57:05 +0000 (10:57 +0100)]
Update API support documentation.
Richard W.M. Jones [Sat, 1 Oct 2011 13:35:05 +0000 (14:35 +0100)]
Version 1.13.16.
Richard W.M. Jones [Sat, 1 Oct 2011 09:42:05 +0000 (10:42 +0100)]
mount: Not deprecated any more.
This updates commit
5c2f1a2d9433eeb5aebeec26f0412c703bbe7269.
Richard W.M. Jones [Sat, 1 Oct 2011 07:20:50 +0000 (08:20 +0100)]
mount: No longer implicitly add -o sync,noatime options.
Richard W.M. Jones [Thu, 29 Sep 2011 15:08:20 +0000 (16:08 +0100)]
daemon: mkswap --help output changed, breaking linuxfsuuid group detection.
Richard W.M. Jones [Wed, 28 Sep 2011 21:13:27 +0000 (22:13 +0100)]
Version 1.13.15.
Richard W.M. Jones [Wed, 28 Sep 2011 13:39:31 +0000 (14:39 +0100)]
New API: set-smp, get-smp
These calls allow you to change the number of virtual CPUs assigned to
the appliance.
This also adds a --smp option to virt-rescue.
Richard W.M. Jones [Wed, 28 Sep 2011 10:14:06 +0000 (11:14 +0100)]
New APIs: compress-out, compress-device-out.
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)
Richard W.M. Jones [Wed, 28 Sep 2011 13:17:53 +0000 (14:17 +0100)]
daemon: Move useful is_zero function to header file.
Code motion.
Richard W.M. Jones [Mon, 26 Sep 2011 12:34:12 +0000 (13:34 +0100)]
Add no_timer_check to disable faulty test during boot (RHBZ#502058).
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.
Richard W.M. Jones [Mon, 26 Sep 2011 08:58:46 +0000 (09:58 +0100)]
docs: Show how to use a qemu wrapper to edit the qemu command line.
Richard W.M. Jones [Sat, 24 Sep 2011 21:32:46 +0000 (22:32 +0100)]
Version 1.13.14.
Richard W.M. Jones [Sat, 24 Sep 2011 17:50:00 +0000 (18:50 +0100)]
Update to latest gnulib.
Richard W.M. Jones [Thu, 22 Sep 2011 13:41:46 +0000 (14:41 +0100)]
erlang: Use the official autoconf macros.
Richard W.M. Jones [Wed, 21 Sep 2011 21:28:11 +0000 (22:28 +0100)]
todo: Suggestion to improve Erlang bindings.
Richard W.M. Jones [Wed, 21 Sep 2011 18:31:10 +0000 (19:31 +0100)]
Enable APIC.
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.
Richard W.M. Jones [Wed, 21 Sep 2011 14:12:28 +0000 (15:12 +0100)]
Version 1.13.13.
Richard W.M. Jones [Tue, 20 Sep 2011 17:03:58 +0000 (18:03 +0100)]
Add Erlang bindings.
Richard W.M. Jones [Fri, 16 Sep 2011 14:26:20 +0000 (15:26 +0100)]
inspection: Handle /dev/root in /etc/fstab.
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.
Richard W.M. Jones [Fri, 16 Sep 2011 14:21:26 +0000 (15:21 +0100)]
inspection: Add support for ttylinux (a minimal Linux).
Richard W.M. Jones [Thu, 15 Sep 2011 21:02:43 +0000 (22:02 +0100)]
Add an optional group ("grub") for the guestfs_grub_install API.
This also improves the documentation for this call, pointing out
several pitfalls in using it.
This unfortunately breaks existing callers that might use
guestfs_grub_install without checking for this new group.
Richard W.M. Jones [Wed, 14 Sep 2011 17:56:38 +0000 (18:56 +0100)]
Version 1.13.12.
Richard Jones [Wed, 14 Sep 2011 12:52:39 +0000 (13:52 +0100)]
test-tool: Display TMPDIR.
Richard Jones [Wed, 14 Sep 2011 12:19:11 +0000 (13:19 +0100)]
test-tool: Refresh libguestfs-test-tool man page.
Richard Jones [Wed, 14 Sep 2011 12:00:34 +0000 (13:00 +0100)]
test-tool: Make the default timeout be 600 seconds (10 minutes).
We could sometimes hit the 120 second timeout, eg. if the appliance
needed to be rebuilt and the machine was very slow and/or under heavy
I/O load. 10 minutes should be enough for any reasonable situation.
Richard Jones [Wed, 14 Sep 2011 11:58:43 +0000 (12:58 +0100)]
test-tool: Document the -t command line option.
Richard Jones [Wed, 14 Sep 2011 11:58:30 +0000 (12:58 +0100)]
test-tool: Use B<...> for command line options in man page.
Richard Jones [Mon, 12 Sep 2011 10:36:00 +0000 (11:36 +0100)]
po-docs: Make podfiles sort stable.
Richard Jones [Mon, 12 Sep 2011 10:33:19 +0000 (11:33 +0100)]
Stable OCaml dependencies.
Richard W.M. Jones [Wed, 7 Sep 2011 14:21:37 +0000 (15:21 +0100)]
docs: Add a section explaining the appliance boot process.
Richard W.M. Jones [Thu, 1 Sep 2011 13:55:18 +0000 (14:55 +0100)]
Version 1.13.11.
Richard W.M. Jones [Thu, 1 Sep 2011 12:37:20 +0000 (13:37 +0100)]
Remove old regression test that mainly tested a buggy API.
The guestfs_ll command currently lists files in the appliance if you
prefix filenames with "/..". However this is a bug, not a feature,
and we should not be testing it.
Richard W.M. Jones [Thu, 1 Sep 2011 12:15:13 +0000 (13:15 +0100)]
debian: Missing build dependency on db4.8-util.
Richard W.M. Jones [Thu, 1 Sep 2011 11:59:15 +0000 (12:59 +0100)]
daemon: Factor out name of virtio serial channel.
This is just code motion.