Commit Graph

235 Commits

Author SHA1 Message Date
Richard W.M. Jones
9d205f1c28 New API: selinux_relabel - SELinux relabel parts of the filesystem. 2016-07-14 15:28:10 +01:00
Richard W.M. Jones
55e5150106 todo: Use query-qmp-schema. 2016-05-26 11:36:20 +01:00
Richard W.M. Jones
cbeb127a5d todo: Remove virt-p2v --inject-ssh-identity as it has been implemented. 2015-11-08 20:36:47 +00:00
Richard W.M. Jones
afe3c77014 p2v: Add a test for the PXE boot path (RHBZ#1256222).
Build the P2V disk image and boot it.  We don't actually use PXE
specifically, but we do test the whole PXE / kernel command line path
much more thoroughly.

This is a 'check-slow' test because it takes ages to run.
2015-08-27 15:42:55 +01:00
Richard W.M. Jones
c3566da409 python: Call PyErr_Clear() on non-error paths out of the Python bindings.
We also need to be more careful about PyString_FromString and similar
functions returning NULL on failure.  Currently we don't check this
every time.  This commit adds more checks, but is still not complete.
2015-02-14 18:46:05 +00:00
Richard W.M. Jones
98aa470bc6 Update TODO.
Remove some things which have been implemented already.
2015-02-14 18:46:04 +00:00
Richard W.M. Jones
8664337cc3 New APIs: Implement stat calls that return nanosecond timestamps (RHBZ#1144891).
The existing APIs guestfs_stat, guestfs_lstat and guestfs_lstatlist
return a stat structure that contains atime, mtime and ctime fields
that store only the timestamp in seconds.

Modern filesystems can store timestamps down to nanosecond
granularity, and the ordinary glibc stat(2) wrapper will return these
in "hidden" stat fields:

  struct timespec st_atim;            /* Time of last access.  */
  struct timespec st_mtim;            /* Time of last modification.  */
  struct timespec st_ctim;            /* Time of last status change.  */

with the following macros defined for backwards compatibility:

  #define st_atime st_atim.tv_sec
  #define st_mtime st_mtim.tv_sec
  #define st_ctime st_ctim.tv_sec

It is not possible to redefine guestfs_stat to return a longer struct
guestfs_stat with room for the extra nanosecond fields, because that
would break the ABI of guestfs_lstatlist as it returns an array
containing consecutive stat structs (not pointers).  Changing the
return type of guestfs_stat would break API.  Changing the generator
to support symbol versioning is judged to be too intrusive.

Therefore this adds a new struct (guestfs_statns) and new APIs:

  guestfs_statns
  guestfs_lstatns
  guestfs_lstatnslist

which return the new struct (or array of structs in the last case).

The old APIs may of course still be used, forever, but are deprecated
and shouldn't be used in new programs.

Because virt tools are compiled with -DGUESTFS_WARN_DEPRECATED=1, I
have updated all the places calling the deprecated functions.  This
has revealed some areas for improvement: in particular virt-diff and
virt-ls could be changed to print the nanosecond fields.

FUSE now returns nanoseconds in stat calls where available, fixing
https://bugzilla.redhat.com/show_bug.cgi?id=1144891

Notes about the implementation:

- guestfs_internal_lstatlist has been removed and replaced by
  guestfs_internal_lstatnslist.  As the former was an internal API no
  one should have been calling it, or indeed can call it unless they
  start defining their own header files.

- guestfs_stat and guestfs_lstat have been changed into library-side
  functions.  They, along with guestfs_lstatlist, are now implemented
  as wrappers around the new functions which just throw away the
  nanosecond fields.
2014-09-22 15:47:48 +01:00
Richard W.M. Jones
fb546eaee0 New tool: virt-log: It lists log files from within the guest.
See 'TODO' file for suggested future improvements.
2014-06-14 13:58:45 +01:00
Richard W.M. Jones
40cac10b62 Update TODO with Python bindings suggestion. 2014-03-25 13:11:45 +00:00
Richard W.M. Jones
e982c0a2f5 Update TODO: Remove some things that we've done. 2013-11-07 14:06:00 +00:00
Richard W.M. Jones
5b9ac57d4e builder: Update TODO file with some more ideas. 2013-11-01 15:10:11 +00:00
Richard W.M. Jones
dd5959cd88 builder: Copy-editing on documentation.
Plus some ideas added to TODO file.
2013-10-25 14:05:34 +01:00
Richard W.M. Jones
3cce894f1b Update TODO. 2013-10-17 15:42:38 +01:00
Richard W.M. Jones
57956ce790 Update TODO with more ideas. 2013-10-08 12:34:33 +01:00
Richard W.M. Jones
7dfc67cb12 builder: Add section on debugging and other documentation fixes. 2013-10-07 10:02:57 +01:00
Richard W.M. Jones
80da8b19e0 builder: Use progress bar for large template downloads that are not in the cache. 2013-10-05 16:00:21 +01:00
Richard W.M. Jones
f532ca96dc todo: Some items to do in virt-builder. 2013-10-05 11:54:01 +01:00
Richard W.M. Jones
7c463ac477 sparsify: Get free space on TMPDIR and give a warning if we estimate it is too little. 2013-08-06 13:23:04 +01:00
Richard W.M. Jones
f6b2efcdff Update TODO file. 2013-08-06 12:20:31 +01:00
Richard W.M. Jones
038ed0a08e launch: direct: Specify -cpu host,+kvmclock.
'-cpu host' makes the CPU look like the host CPU.  This is useful
because it means the appliance can use all the host CPU's features,
eg. for fast checksumming or MD XORing.

'kvmclock' is the paravirtualized clock for qemu/KVM.  It's much more
stable than relying on tsc or a virtualized device such as HPET, and
clock instability is one of the problems we have encountered when
running libguestfs on a heavily loaded machine, especially in a nested VM.

Note that we require qemu >= 1.2 (and have for a while) which has long
supported both of these options.
2013-08-05 16:39:24 +01:00
Richard W.M. Jones
68990840b6 "attach method" is from now on known as "backend".
This large, but mainly mechanical commit, renames "attach method"
everywhere to "backend".

Backwards compatibility of the API (guestfs_{set,get}_attach_method)
and environment (LIBGUESTFS_ATTACH_METHOD) is maintained, but in new
code use guestfs_{set,get}_backend and LIBGUESTFS_BACKEND instead.

The default backend (launching qemu directly) is now called 'direct'
instead of 'appliance', although you can still use 'appliance' as a
synonym.
2013-04-01 11:16:18 +01:00
Richard W.M. Jones
a0a4ee5245 Use 'supermin' and 'supermin-helper' in preference to febootstrap.
Febootstrap has been renamed upstream to 'supermin':
https://www.redhat.com/archives/libguestfs/2013-February/msg00004.html

This commit changes libguestfs so it can use either program to build
the supermin appliance.
2013-02-05 15:31:05 +00:00
Richard W.M. Jones
fae8d7cafb New APIs: Implement Linux filesystem capabilities.
This adds the following new APIs:
 - cap_get_file
 - cap_set_file
2012-11-22 16:45:32 +00:00
Richard W.M. Jones
218b39acae New APIs: Implement POSIX ACLs.
This adds the following new APIs:
 - acl_get_file
 - acl_set_file
 - acl_delete_def_file
2012-11-22 16:19:21 +00:00
Richard W.M. Jones
2f321ced21 todo: We must implement ACLs and filesystem capabilities for SCAP.
Thanks Steve Grubb.
2012-11-15 15:35:46 +00:00
Richard W.M. Jones
f56bc8edd5 New API: mklost_and_found 2012-11-02 14:35:41 +00:00
Richard W.M. Jones
4cfc277674 todo: General updates. 2012-11-02 14:09:28 +00:00
Wanlong Gao
978d16ec76 TODO: remove the already implemented yum cache clean feature
The cleanup of package managers cache is already implemented
by sprep_operation_package_manager_cache.ml, so remove this
TODO item.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
2012-10-17 10:27:38 +01:00
Richard W.M. Jones
25ec619a46 todo: Implement Ruby blocking calls. 2012-10-16 09:12:18 +01:00
Wanlong Gao
45d459f402 Fix tests/bigdirs/test-big-dirs.pl to use mke2fs
Let tests/bigdirs/test-big-dirs.pl uses mke2fs to create small
inode ratio files.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

RWMJ:
 - Fix invocation of mke2fs with optional arguments.
 - Run the test to check it works.
2012-09-24 16:41:07 +01:00
Richard W.M. Jones
2cac8d490e syntax: Remove trailing whitespace.
Found by 'make syntax-check'.
2012-09-15 13:36:02 +01:00
Wanlong Gao
c659cf8ea6 TODO: remove the implemented hostname removing feature
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
2012-09-03 10:32:18 +01:00
Richard W.M. Jones
11d655ab83 TODO: Suggest removing hostname from ifcfg-eth* files. 2012-09-02 19:47:33 +01:00
Richard W.M. Jones
b2378a81bb Update inspection and example programs to use new hivex* APIs (RHBZ#852394).
I tested this by comparing the output of virt-inspector over Windows
guests before and after the change, which was identical:

$ md5sum `ls -1 /tmp/*.before /tmp/*.after`
c292d6629b5a761eccb4a279754399b4  /tmp/Win2003.after
c292d6629b5a761eccb4a279754399b4  /tmp/Win2003.before
eb1e1ff29208a9ee46e9c100dfec26b2  /tmp/Win2012.after
eb1e1ff29208a9ee46e9c100dfec26b2  /tmp/Win2012.before
d060a95d7ffe5dce6c4e66feb80c2837  /tmp/Win7x32.after
d060a95d7ffe5dce6c4e66feb80c2837  /tmp/Win7x32.before
8914eee70ac4f8a0317659e09e00dcdc  /tmp/Win7x32Dynamic.after
8914eee70ac4f8a0317659e09e00dcdc  /tmp/Win7x32Dynamic.before
a2dcdfc0f9d64054640875aa791889e0  /tmp/Win7x32TwoDisks.after
a2dcdfc0f9d64054640875aa791889e0  /tmp/Win7x32TwoDisks.before
5ed49568a5147dce7517c99de41ebf2e  /tmp/Win8previewx64.after
5ed49568a5147dce7517c99de41ebf2e  /tmp/Win8previewx64.before
fdfc7d272b79a665ae3313ae1ae30660  /tmp/WinXP.after
fdfc7d272b79a665ae3313ae1ae30660  /tmp/WinXP.before
3c705444be664f1316b21c5d8d3cb0be  /tmp/WinXPRecConsole.after
3c705444be664f1316b21c5d8d3cb0be  /tmp/WinXPRecConsole.before
2012-08-29 17:08:01 +01:00
Richard W.M. Jones
99cfc1f36e sysprep: Add --firstboot functionality.
This allows you to add scripts that run in the context of
the guest the first time it boots.
2012-08-18 11:47:19 +01:00
Richard W.M. Jones
d6e1d82267 todo: Suggest full mke2fs API call. 2012-08-17 16:08:14 +01:00
Richard W.M. Jones
6952505694 guestfs_readdir: Note that this suffers from protocol limits. 2012-08-17 16:08:14 +01:00
Richard W.M. Jones
8ee5190768 guestfs_readlinklist: Reimplement to avoid protocol limits. 2012-08-17 16:08:13 +01:00
Richard W.M. Jones
dc66dd32c2 guestfs_lstatlist, guestfs_lxattrlist: Reimplement to avoid protocol limits.
Note that the code to do this was already in virt-ls, so this is
change is mostly just moving the code into the core library.
2012-08-17 16:08:13 +01:00
Richard W.M. Jones
118932fbea guestfs_write, guestfs_write_append: Reimplement to avoid protocol limits.
Note that we keep the old daemon calls, but rename them as
"internal_write" and "internal_write_append".  This lets us implement
the new library-side calls more efficiently in the common case when
the uploaded content is smaller than the message buffer.  In most
cases the new calls won't end up using a temporary file.
2012-08-17 16:08:13 +01:00
Richard W.M. Jones
735ce57cda guestfs_read_lines: Reimplement to avoid protocol limits.
This also makes a larger test suite for this command.
2012-08-17 16:08:13 +01:00
Richard W.M. Jones
96d3ac28d6 guestfs_read_file: Reimplement to avoid protocol limits. 2012-08-17 16:08:13 +01:00
Richard W.M. Jones
9d85eba3c3 guestfs_find: Reimplement to avoid protocol limits.
This also reimplements the virt-ls -R option to use the replacement
guestfs_find API, which is simpler (though actually less efficient).
2012-08-17 16:08:13 +01:00
Richard W.M. Jones
294bee38bc guestfs_cat: Reimplement to avoid protocol limits. 2012-08-17 16:08:13 +01:00
Richard W.M. Jones
6f5447abe3 Update TODO. 2012-08-16 18:21:07 +01:00
Richard W.M. Jones
d23293db7e todo: Suggestion: Add sh-in, sh-out, debug sh-in, debug sh-out. 2012-08-14 10:01:40 +01:00
Richard W.M. Jones
981c7b7310 Reviewed and revised TODO file. 2012-07-31 22:55:58 +01:00
Richard W.M. Jones
42bf3274e4 sysprep: Generate new random UUIDs for LVM2 PVs and VGs (thanks Kazuo Moriwaka). 2012-07-25 14:47:15 +01:00
Wanlong Gao
e68336d72a sysprep: remove the local machine ID
remove the local machine ID, leave it empty, let it be generated
during next booting.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

RWMJ:
 - Whitespace change.
 - Remove completed items from TODO.
2012-07-25 08:56:38 +01:00
Richard W.M. Jones
97aeaa86d0 todo: More suggestions for virt-sysprep (thanks Kazuo Moriwaka). 2012-07-24 13:42:06 +01:00