Commit Graph

1759 Commits

Author SHA1 Message Date
Richard Jones
a96d70113f fish: In 'reopen' copy trace setting to new handle. 2010-05-08 09:14:00 +01:00
Richard Jones
2064e43bcf Ignore test1.img file in directory. 2010-05-08 09:10:00 +01:00
Richard Jones
846238a031 fish -N option unconditionally overwrites test*.img files.
This is more convenient and makes it consistent with the
'alloc' and 'sparse' commands.
2010-05-08 09:09:24 +01:00
Richard Jones
8e007581c9 fish: Make '-x' option enable traces instead of using separate echo path.
Previously we had separate code paths for echoing commands (-x)
and tracing (guestfs_set_trace).  This just unifies that so that
the guestfish -x option enables tracing.
2010-05-08 09:04:28 +01:00
Richard Jones
94775c53f1 inspector: Support filesystem-on-image VMs (RHBZ#590167).
$ virt-df /tmp/dbroot.img
Filesystem                           1K-blocks       Used  Available  Use%
/tmp/dbroot.img:/dev/vda               3096336     593628    2345424   20%
2010-05-07 23:15:40 +01:00
Richard Jones
f606a79ed7 daemon: Use 'error' instead of 'perror' before calling 'abort'. 2010-05-07 22:51:20 +01:00
Richard Jones
b52ef0b021 daemon: gnulib module 'error' is used directly by the daemon. 2010-05-07 22:51:20 +01:00
Richard Jones
63882fb220 daemon: Use parens around code section for safety. 2010-05-07 22:51:20 +01:00
Richard Jones
fc6dd9daa1 If qemu dies during launch, set an error message (RHBZ#588851). 2010-05-07 22:37:55 +01:00
Richard Jones
a3eb97d637 Version 1.3.10. 1.3.10 2010-05-07 16:34:08 +01:00
Richard Jones
42f59b28f1 daemon: Fix read-file so it fails gracefully for large files (RHBZ#589039).
Pengzhen Cao noticed that read-file would fail for files
larger than the protocol size; this is *not* the bug.  However
it would also lose protocol synchronization after this.

The reason was that functions which return RBufferOut in the
generator must not 'touch' the *size_r parameter along error
return paths.

I fixed read-file and initrd-cat, and I checked that pread was
doing the right thing.

This also adds regression tests for read-file with various categories
of large file.
2010-05-07 15:27:29 +01:00
Richard Jones
a84f136049 daemon: Fix wc* commands to work on absolute symbolic links (RHBZ#579608). 2010-05-07 15:27:28 +01:00
Richard Jones
26991ebb81 daemon: Fix strings to work on absolute symbolic links (RHBZ#579608). 2010-05-07 15:27:28 +01:00
Richard Jones
deee8e2b4e daemon: Fix head and tail commands to work on absolute symbolic links (RHBZ#579608). 2010-05-07 15:27:28 +01:00
Richard Jones
7d8e5886a6 daemon: Fix grep and related to work on absolute symbolic links (RHBZ#579608). 2010-05-07 15:27:28 +01:00
Richard Jones
00fae9fe88 daemon: Fix checksum to work on absolute symbolic links (RHBZ#579608). 2010-05-07 15:27:28 +01:00
Richard Jones
7a4ec57e54 daemon: Fix hexdump to work on absolute symbolic links (RHBZ#579608). 2010-05-07 15:27:28 +01:00
Richard Jones
07369cb77a daemon: Fix for commands working on absolute symbolic links (RHBZ#579608).
The original idea (suggested by Al Viro) was to fork and chroot
into the sysroot and read the file from there.  Because of the
separate process being chrooted, absolute links would be resolved
correctly.  The slightly modified idea is to open the file in the
daemon process (but temporarily chrooted, so symlinks resolve
correctly), fork, and have the subprocess just be responsible for
copying the file.  (Strictly speaking we don't need to fork, but
this implementation is simpler).

This commit just includes the changes needed to the command*()
functions in daemon/guestfsd.c and adds an absolute symlink to
the test ISO for testing it.  Later commits will fix the broken
daemon commands themselves.
2010-05-07 15:27:28 +01:00
Richard Jones
34067b5c36 daemon: Change command to abort() on resource problems.
The comment in the code describes it thus:

  /* Note: abort is used in a few places along the error paths early
   * in this function.  This is because (a) cleaning up correctly is
   * very complex at these places and (b) abort is used when a
   * resource problem is indicated which would be due to much more
   * serious issues - eg. memory or file descriptor leaks.  We
   * wouldn't expect fork(2) or pipe(2) to fail in normal
   * circumstances.
   */
2010-05-07 15:27:28 +01:00
Matthew Booth
4839d5142c Warn instead of dying if grub refers to non-existent kernel 2010-05-07 15:23:37 +01:00
Richard Jones
01c1d82823 Update to latest gnulib. 2010-05-06 18:57:25 +01:00
Richard Jones
fbf29976b3 Use link-local addresses between appliance and host (RHBZ#588763). 2010-05-04 17:01:34 +01:00
Richard Jones
8a9f2ca655 Change network configuration to use macros.
Change the network configuration so everything is set using
some macros at the top of src/guestfs.c.

Also, rename the macros used in the daemon so they are not the
same.  It was a very long time since these sets of macros had to
match the ones defined in src/guestfs.c, despite what the comment
said.

Note that this commit should not change the semantics of the
program at all.
2010-05-04 15:26:20 +01:00
Daniel Cabrera
7d005a9ae8 Update Spanish translations (RHBZ#588733). 2010-05-04 13:35:01 +01:00
Richard Jones
097266e01c tests: In verbose mode, print dashes between each test.
Only affects tests when run with LIBGUESTFS_DEBUG=1.  Lets you easily
see when each test starts and ends.
2010-04-30 23:12:34 +01:00
Richard Jones
a0a394a461 Version 1.3.9. 1.3.9 2010-04-30 18:27:37 +01:00
Richard Jones
fd2d10d6ed Document that guestfs_mount implies -o sync and performance problem (RHBZ#587582). 2010-04-30 13:56:11 +01:00
Richard Jones
90b4e24df6 contrib: Add dependency diagram of libguestfs ecosystem. 2010-04-30 12:27:00 +01:00
Richard Jones
2f9f337502 contrib: Add header to README file. 2010-04-30 11:34:21 +01:00
Richard Jones
c24de46d06 lvresize: Use --force so it can make LVs smaller (RHBZ#587484).
This also adds a regression test for this bug.
2010-04-30 10:51:49 +01:00
Richard Jones
25c1526125 tools: Fix documentation for CurrentControlSet (thanks Yuval Kashtan). 2010-04-30 09:46:40 +01:00
Richard Jones
55641f5d1e guestfs(3): Documentation on protocol gotchas. 2010-04-29 13:55:52 +01:00
Richard Jones
d3be0facdd Version 1.3.8. 1.3.8 2010-04-27 15:48:38 +01:00
Daniel Cabrera
467268bc32 Update Spanish translation (RHBZ#585961). 2010-04-26 15:57:45 +01:00
Richard Jones
78d2523ec8 fish: Add 'man' command which opens the manual. 2010-04-24 09:11:37 +01:00
Richard Jones
ce95be8b18 docs: Routine refresh of the documentation for guestfs(3) and guestfish(1). 2010-04-24 08:50:40 +01:00
Richard Jones
b054e33db6 Version 1.3.7 - note: fixes a segfault in guestfish 1.3.6. 1.3.7 2010-04-23 14:43:13 +01:00
Richard Jones
7c285ea84f todo docs: Discuss shrinking filesystems and specifying sizes in guestfish. 2010-04-23 14:29:56 +01:00
Richard Jones
41ee105aab New API: checksums-out for checksumming many files.
Useful API for verifying the integrity of virtual machines.
2010-04-23 14:15:13 +01:00
Richard Jones
89a707aac5 generator: Update docs for checksum to point to checksum-device. 2010-04-23 14:15:13 +01:00
Richard Jones
af29c84cef daemon: Split out checksum type to program name mapping into function.
This shouldn't change the semantics of the program.
2010-04-23 14:15:12 +01:00
Richard Jones
d054dfb2f9 fish: Fix segfault in '-a' option.
This fixes a segfault in the guestfish -a option which you would
get when using guestfish 1.3.6.
2010-04-23 14:15:12 +01:00
Richard Jones
6e269c6e51 todo docs: Integrate with host intrusion detection systems. 2010-04-23 10:25:35 +01:00
Richard Jones
2ed549e95c todo docs: Mapping filesystems to and from disk blocks. 2010-04-23 10:23:45 +01:00
Richard Jones
dfe539d764 Version 1.3.6. 1.3.6 2010-04-22 22:29:25 +01:00
Richard Jones
4a9b979a31 fish: Add -N option for making prepared disk images.
Previously you might have typed:

$ guestfish
><fs> alloc test1.img 100M
><fs> run
><fs> part-disk /dev/sda mbr
><fs> mkfs ext4 /dev/sda1

now you can do the same with:

$ guestfish -N fs:ext4

Some tests have also been updated to use this new
functionality.
2010-04-22 18:07:11 +01:00
Richard Jones
89486c50ea fish docs: Be consistent about using I<-..> for options. 2010-04-22 17:16:13 +01:00
Richard Jones
e3e67f63b0 fish docs: Use L</...> for internal links in the man page. 2010-04-22 17:16:13 +01:00
Matthew Booth
75d9c056b2 Whitelist the loop kernel module
loop is sometimes a module, for example on RHEL 5.
2010-04-22 17:16:13 +01:00
Matthew Booth
39416cdb11 Don't die during inspection if rpm -qa or dpkg-query fails
If a problem in the package database prevented package enumeration from working,
inspection would die. This change makes it emit a warning and continue.
2010-04-21 16:51:20 +01:00