Commit Graph

1981 Commits

Author SHA1 Message Date
Richard Jones
133a92be69 Add progress messages to zero-device command. 2010-09-01 10:00:40 +01:00
Richard Jones
88ab203e61 Add progress messages to zero command. 2010-09-01 10:00:37 +01:00
Richard Jones
55938405cc Add progress messages to fill-pattern command. 2010-09-01 10:00:34 +01:00
Richard Jones
7f1ecfc87e Add progress messages to fill command. 2010-09-01 10:00:30 +01:00
Richard Jones
41512f498b Add progress messages to copy-size command. 2010-08-31 19:27:35 +01:00
Richard Jones
e776a46ffc Implement progress messages in the daemon and library.
This implements progress notification messages in the daemon, and
adds a callback in the library to handle them.

No calls are changed so far, so in fact no progress messages can
be generated by this commit.

For more details, see:
https://www.redhat.com/archives/libguestfs/2010-July/msg00003.html
https://www.redhat.com/archives/libguestfs/2010-July/msg00024.html
2010-08-31 19:27:34 +01:00
Richard Jones
a8a44cecba ocaml: Remove old entry from .gitignore file. 2010-08-31 19:27:34 +01:00
Richard Jones
377926be5b Version 1.5.6. 1.5.6 2010-08-27 22:01:23 +01:00
Richard Jones
d46230f94e Requires febootstrap >= 2.9. 2010-08-27 21:47:49 +01:00
Richard Jones
d89a88d67e daemon: Set O_CLOEXEC flag on the virtio-serial file descriptor. 2010-08-27 15:29:33 +01:00
Richard Jones
4932fdca3c build: Don't add version extra string to the version number.
If this string was non-empty, then it broke a lot of things because
autoconf and other parts of the build system were expecting this
string to contain a simple MAJOR.MINOR.RELEASE version number.

This requires changes to guestfish and guestmount so they use the
guestfs_version API to fetch the version from the library.  (The
Perl tools were already doing it this way).  In a way this is more
accurate, because it's no longer hard-coded in the binary, but
fetched from the dynamically linked libguestfs.so.
2010-08-27 13:38:49 +01:00
Richard Jones
1c523760d3 Update BUGS, PO files. 1.5.5 2010-08-26 16:43:50 +01:00
Daniel Cabrera
b59aff0bae Update Spanish translations (RHBZ#627556). 2010-08-26 16:40:44 +01:00
Daniel Cabrera
3f7965b6de Updated Spanish translations (RHBZ#626843). 2010-08-26 16:39:39 +01:00
Piotr Drąg
9bc72e2f9b Update Polish translation (RHBZ#502533). 2010-08-26 16:38:11 +01:00
Richard Jones
92876a49db Prepare for version 1.5.5. 2010-08-26 16:37:24 +01:00
Richard Jones
daead56fae rescue: Fix typo in comment. 2010-08-26 15:55:34 +01:00
Matthew Booth
c3194e4d37 Ignore launch() error in virt-rescue. (RHBZ#618556)
launch() expects guestfsd to start, which it never does in virt-rescue, so it
always returns an error about the appliance shutting down unexpectedly.
2010-08-26 15:53:25 +01:00
Matthew Booth
d3fc7e1e4d Shut down the appliance cleanly
When guestfsd exits, or the user exits the virt-rescue shell, the init script
exits which causes the kernel to panic. This isn't really a functional issue, as
all useful work is done by this point. However, it does cause virt-rescue to
display an unsightly error message.

This patch causes the appliance to power off cleanly before the init script
exits. Note it actually does a reboot rather than a poweroff. This is because
ACPI is disabled in the appliance, meaning poweroff doesn't work, but qemu is
configured not to restart on reboot.
2010-08-26 15:04:38 +01:00
Matthew Booth
c0b38fbb27 Call sync after guestfsd exits
Core files are not reliably written to disk if guestfsd dumps core. This patch
makes libguestfs do the same appliance cleanup for guestfsd and virt-rescue,
which seems to fix the matter.

It also removes a redundant sleep and additional sync when exiting virt-rescue.
2010-08-26 15:04:35 +01:00
Matthew Booth
a45302cb8a Add a core_pattern debug command
This adds a new debug command, core_pattern, which writes a new pattern for
coredump files to the appliance kernel, and sets the daemon's hard and soft core
limits to infinity.
2010-08-26 14:00:57 +01:00
Richard Jones
a0d514f13d Include statically linked binaries in the binary distribution. 2010-08-25 17:22:54 +01:00
Richard Jones
27ef6f9171 Rename global 'xdr_str'.
Two bits of XDR both contained a definition called 'str' which
means that 'xdr_str' was being exported globally twice.  Because
of the linker script this didn't affect us.  But it's best to
rename this global so that conflicts cannot arise.
2010-08-25 11:41:17 +01:00
Daniel Berrange
6d15d4e7c2 Add -nodefconfig command line option to qemu.
Without this option, qemu will read some defaults from /etc/qemu/
configuration files.
2010-08-24 14:27:15 +01:00
Richard Jones
e503b31c15 Version 1.5.4. 1.5.4 2010-08-24 13:28:52 +01:00
Richard Jones
4963be8500 New APIs: set-network and get-network to enable network support.
guestfs_set_network (g, true) enables network support in the appliance.
2010-08-24 12:37:54 +01:00
Richard Jones
10d1aa3b64 build: Add 'bindist' rule for building binary distribution. 2010-08-24 11:54:42 +01:00
Richard Jones
5c1346dae7 Don't print debug messages when not in verbose mode.
Don't print them because no one's listening ...
2010-08-24 11:54:42 +01:00
Richard Jones
831b1fc180 Change protocol to send Linux errno from daemon to library.
This changes the protocol so that the Linux errno (if available)
is sent back to the library.  Note that the errno is not yet
made available to callers, since it is not clear how best to
present this Linux-specific number.
2010-08-24 11:54:42 +01:00
Richard Jones
90d06e2888 Raise error message max size to 64K.
This commit removes one of the protocol limits, by raising the
maximum error message size from 256 bytes to 64K.

Although we could consider raising this further, since the
error messages are currently stored in fixed sized buffers on
the stack, that would require more invasive code changes.
2010-08-24 11:54:41 +01:00
Richard Jones
866ec00d1f Use virtio-serial, remove other vmchannel methods.
This adds support for virtio-serial, and removes all other
vmchannel methods.

Virtio-serial is faster than other methods, and is now widely
available.

I tested this by using the guestfs_upload API on an 83 MB file:
  before: 6.12 seconds (14.1 MB/sec)
   after: 4.20 seconds (20.6 MB/sec)
(note this is with the current 8K chunk size)
2010-08-24 11:54:37 +01:00
Richard Jones
5c31f6126b Change to using ext2-based, cached supermin appliance.
This changes the method used to build the supermin appliance
to use the new ext2-based appliance supported by latest febootstrap.
The appliance can also be cached, so we avoid rebuilding it
each time it is used.

Mailing list discussion goes into the rationale and details:
https://www.redhat.com/archives/libguestfs/2010-August/msg00028.html

Requires febootstrap >= 2.8.
2010-08-23 16:00:39 +01:00
Richard Jones
4b753c6208 Make print_timestamped_message into a cross-module function.
This is just code movement.
2010-08-23 12:56:54 +01:00
Richard Jones
a2d4a8bf07 Factor out code for locating the temporary directory.
This is just code movement.
2010-08-23 12:56:14 +01:00
Richard Jones
4d2f1632ad Whitespace change: Add blank line between structures and functions. 2010-08-21 12:45:51 +01:00
Richard Jones
c56fa58721 appliance: Remove some obsolete testing rules from Makefile.am
This haven't been used -- and haven't worked -- for a long time.
2010-08-21 10:39:39 +01:00
Richard Jones
83c221764d Version 1.5.3 1.5.3 2010-08-17 14:30:58 +01:00
Richard Jones
ad373a4d6c Remove old ocaml-inspector code.
Not used by anyone, didn't work well, and replaced now by the
C inspection APIs.
2010-08-17 14:09:26 +01:00
Richard Jones
4440e22f4f fish: Reimplement -i option using new C-based inspection.
Don't shell out to virt-inspector.  Instead, use the new C-based
inspection APIs.

This is much faster.

The new syntax is slightly different:

  guestfish -a disk.img -i
  guestfish -d guest -i

However, the old syntax still works.
2010-08-17 14:09:25 +01:00
Richard Jones
1a9aa565b3 fish: Add -c/--connect and -d/--domain options.
The -d option lets you specify libvirt domains.  The disks from
these domains are found and added, as if you'd named them with -a.

The -c option lets you specify a libvirt URI, which is needed
when we consult libvirt to implement the above.
2010-08-17 14:09:25 +01:00
Richard Jones
8289aa1ad6 New APIs for guest inspection.
This commit converts (some of) the Perl inspection code to C and
makes it available through core APIs.  The new APIs are:

inspect-os        - Does the inspection, returns list of OSes
inspect-get-*     - Get results of the inspection

where '*' is one of:

  type            - 'windows' or 'linux'
  distro          - Linux distro
  arch            - architecture
  product-name    - long product name string
  major-version
  minor-version   - major.minor version of OS
  mountpoints     - get a list of the mountpoints
  filesystems     - get all filesystems associated with the OS

This works for all existing supported Linux and Windows OSes.
2010-08-17 14:09:25 +01:00
Richard Jones
65e9ac4595 New APIs: findfs-label and findfs-uuid
These two calls wrap up the /sbin/findfs command, allowing you
to find a filesystem by only knowing its label or UUID.

This is especially useful when resolving LABEL=... or UUID=...
entries in /etc/fstab.

Sample guestfish session:

><fs> vfs-uuid /dev/vda1
277dd61c-bf34-4253-a8dc-df500a05e7df
><fs> findfs-uuid 277dd61c-bf34-4253-a8dc-df500a05e7df
/dev/vda1
><fs> vfs-label /dev/vda1
/boot
><fs> findfs-label /boot
/dev/vda1
><fs> vfs-uuid /dev/VolGroup00/LogVol00
40ce7c36-82ce-4a12-a99d-48f5e054162c
><fs> findfs-uuid 40ce7c36-82ce-4a12-a99d-48f5e054162c
/dev/mapper/VolGroup00-LogVol00
><fs> findfs-uuid 12345678
libguestfs: error: findfs_uuid: findfs: unable to resolve 'UUID=12345678'
2010-08-17 14:09:25 +01:00
Richard Jones
ad4cff2625 New API: file-architecture
This change simply converts the existing Perl-only function
file_architecture into a core API call.  The core API call is
written in C and available in all languages and from guestfish.
2010-08-17 14:09:25 +01:00
Richard Jones
3cd272fc6a generator: No need to redefine safe_* macros.
These are already defined in "guestfs-internal.h" which is
included in the .c file.
2010-08-17 14:09:25 +01:00
Richard Jones
3905cc7ab4 Add safe_strndup call. 2010-08-17 14:09:25 +01:00
Matthew Booth
64d70228c7 Send trace output to stderr.
Trace output sent to stdout can be lost in the event of a crash due to
buffering.  This patch sends it to stderr instead.
2010-08-17 12:19:05 +01:00
Richard Jones
834077946a Python: Use new PyCapsule API where supported.
See:
http://lists.fedoraproject.org/pipermail/devel/2010-August/141064.html
2010-08-17 10:31:39 +01:00
Richard Jones
29925244c1 generator: Fix typo in error message for RConstOptString. 2010-07-31 14:35:07 +01:00
Richard Jones
6280ac9b98 New API: is-lv: check if a block device is a logical volume (RHBZ#619793)
This adds a new API, guestfs_is_lv (g, device), which returns true iff
the named device is an LVM2 logical volume.

A sample guestfish session:

><fs> lvs
/dev/vg_f13x64/lv_root
/dev/vg_f13x64/lv_swap
><fs> list-devices
/dev/vda
><fs> list-partitions
/dev/vda1
/dev/vda2
><fs> is-lv /dev/vg_f13x64/lv_root
true
><fs> is-lv /dev/vg_f13x64/lv_swap
true
><fs> is-lv /dev/vda
false
><fs> is-lv /dev/vda1
false
><fs> is-lv /dev/vda2
false
2010-07-30 16:32:35 +01:00
Richard Jones
737181bcd7 Rename internal functions.
This is an update to commit 41f25ab3df.

Internal functions should be named guestfs___* (3 underscores) to
avoid clashing with the implementation of actions (2 underscores).
2010-07-28 12:41:29 +01:00