| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
CD/DVD/ISOs (RHBZ#803650, RHBZ#805417).
|
|
|
|
| |
This is just a whitespace change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Try to get the host's loops_per_jiffy value and pass this on the
command line to the guest. In theory this should avoid the appliance
having to recalculate this value in a VM with TCG (which is generally
error-prone). This should avoid timing issues.
We only do this when we are certain that the guest will be TCG.
Currently we only have enough information to do this from the libvirt
attach-method. So mostly this will only affect people using Fedora in
a VM.
The host loops_per_jiffy value is not exported by the kernel. It is
only printed by the kernel early during boot, so if boot messages have
"scrolled off" the kernel ring buffer, it won't be available. Some
operating systems save early kernel messages in /var/log/dmesg but (a)
Fedora 18+ seem to have abandoned this file and (b) on Ubuntu this
file is unreadable for spurious "security" reasons.
I have submitted a patch to make lpj available through /proc/cpuinfo.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This file had grown by accretion to include:
- code related to handles (now in src/handle.c)
- safe allocation (src/alloc.c)
- debug, errors, warnings (src/errors.c)
- private data (src/private-data.c)
- miscellaneous functions (src/canonical-name.c, src/utils.c)
This commit also removes about a dozen #include files which were
probably not really used.
This is just code motion.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New APIs: set-tmpdir, get-tmpdir, set-cachedir, get-cachedir.
The current code has evolved over time and has a number of problems:
(a) A single environment variable ($TMPDIR) controls the
location of several directories.
(b) It's hard for the library user to predict which directory
libguestfs will use, unless the user simulates the same internal steps
that libguestfs performs.
This commit fixes these issues.
(a) Now three environment variables control the location of all small
temporary files, and the appliance cache:
For temporary files: $LIBGUESTFS_TMPDIR or $TMPDIR or /tmp.
For the appliance cache: $LIBGUESTFS_CACHEDIR or $TMPDIR or /var/tmp.
The user can also set these directories explicitly through API calls
(guestfs_set_tmpdir and guestfs_set_cachedir).
(b) The user can also retrieve the actual directories that libguestfs
will use, by calling guestfs_get_tmpdir and guestfs_get_cachedir.
These functions are also used internally.
This commit also:
- reworks the internal tmpdir code
- removes the internal (undocumented) guestfs_tmpdir call (replacing
it with calls to the documented guestfs_get_tmpdir API instead)
- changes the ./run script to set LIBGUESTFS_TMPDIR and
LIBGUESTFS_CACHEDIR
- adds a test
- fixes a few places like libguestfs-make-fixed-appliance which
depended on $TMPDIR
|
|
|
|
|
|
|
|
| |
Split the functions according to a simple hash across
C.nr_actions_files files (this number can be increased later if
necessary).
This is just code motion.
|
|
|
|
| |
This is just code motion.
|
|
|
|
| |
This is just code motion.
|
|
|
|
| |
This is just code motion.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a wrapper or mini-library for running external command,
loosely based on libvirt's virCommand interface.
Amongst the advantages are:
- Can redirect errors into the error log (RHBZ#713678).
- Can redirect output into a callback function.
- Handles shell quoting properly.
- Safely resets signal handlers, closes file descriptors, etc.
- Single place where we can implement other improvements in future.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit models libvirt authentication events through the API,
adding one new event (GUESTFS_EVENT_LIBVIRT_AUTH) and several new
APIs:
guestfs_set_libvirt_supported_credentials
guestfs_get_libvirt_requested_credentials
guestfs_get_libvirt_requested_credential_prompt
guestfs_get_libvirt_requested_credential_challenge
guestfs_get_libvirt_requested_credential_defresult
guestfs_set_libvirt_requested_credential
See the documentation and example which shows how to use the new API.
This commit also changes existing calls to virConnectOpen* within the
library so that the new API is used.
Also included is an example (but not a test, because it's hard to see
how to automatically test the libvirt API).
|
|
|
|
| |
No change, just code motion.
|
|
|
|
|
| |
It is slightly dangerous to use @PATTERNS@, since these might
be substituted by autoconf when they appear in Makefile.am files.
|
|
|
|
| |
Detect the disk image format of a file, in a secure way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
The library doesn't actually use libaugeas, except indirectly via the
libguestfs API. The libguestfs API implements this in the daemon, so
there's no need for the library to link to augeas at all.
|
|
|
|
|
|
|
|
|
|
| |
libguestfs fails to build with --enable-fuse on openSuSE 11.4 and
earlier because the included fuse version does not include
libulockmgr.so. configure already used pkgconfig to retrieve the correct
CFLAGS, so there is no need to hardcode -lulockmgr.
With this change the build succeeds again.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
|
|
|
|
|
|
|
|
|
| |
This adds standard LICENSE and BUGS sections to all of the man pages
that are processed by podwrapper.
Modify all the calls to $(PODWRAPPER) to add the right --license
parameter according to the content. Note that this relaxes the
license on some code example pages, making them effectively BSD-style
licensed.
|
| |
|
|
|
|
|
|
|
| |
Signed-off-by: Masami HIRATA <msmhrt@gmail.com>
RWMJ:
Fixed whitespace in generator_xdr.ml
|
|
|
|
|
|
|
|
|
|
|
|
| |
Complete the attach-method libvirt backend.
This backend uses libvirt to create a transient KVM domain to run the
appliance.
Note that this still will only work with local libvirt URIs since the
<kernel>, <initrd> and appliance links in the libvirt XML refer to
local files, and virtio serial only works locally (limitation of
libvirt). Remote support will be added later.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
launch-appliance.c contains the code associated with the 'appliance'
attach-method. Mostly. In fact there are a few APIs which don't fit
so nicely:
- config: deprecated API which fiddles with the qemu command
line directly
- max-disks: depends on the qemu implementation (virtio-scsi
or not)
- debug-drives: used for testing only
launch-unix.c contains the code associated with 'unix:<path>'.
launch.c is the common code for launching, along with a few other APIs
such as guestfs_add_drive_opts.
This commit also reduces the number of headers to just those
which are required.
|
|
|
|
|
|
|
| |
This is just code motion.
Some files cannot be renamed. Notably rpcgen input and output files
must not contain dash characters, else rpcgen breaks.
|
|
|
|
|
| |
This file contains the code implementing guestfs_add_domain
(for adding a libvirt domain) so this name is less confusing.
|
| |
|
|
|
|
|
| |
This will allow us to easily change the location of this
script in future.
|
|
|
|
|
|
|
|
|
|
|
|
| |
gettextize provides a local file called "gettext.h". Remove this and
use <libintl.h> from glibc headers instead.
Most of this change is mechanical: #include <libintl.h> in every C
file which uses any gettext function. But also we remove the
gettext.h file, and adjust the "_" macros.
Note that this effectively removes the ./configure --disable-nls
option, although we don't know if that ever worked.
|
|
|
|
| |
Since it describes the C library, it's better in the src/ directory.
|
|
|
|
|
|
|
|
|
|
| |
Add FUSE support directly to the API. Instead of needing to use the
external 'guestmount' command, you can mount the libguestfs filesystem
space on a local mountpoint using an API call from any language.
Note that although mount-local-run is marked as Cancellable, the
current implementation does not support it, but it would be relatively
simple to add it.
|
|
|
|
| |
http://gcc.gnu.org/wiki/Visibility
|
| |
|
|
|
|
|
|
|
|
| |
documentation
Since some modules (`getopt', for example) may copy files
into the build directory, `top_builddir/lib' is needed as well as
`top_srcdir/lib'. -- GNU Gnulib manual, section 2.2 Initial import
|
| |
|
| |
|
| |
|
|
|
|
| |
This updates the previous two commits.
|
|
|
|
|
| |
We don't use this library (it is only used in the daemon),
but we need to add this to make the linker happy.
|
|
|
|
|
|
|
|
|
|
| |
This API returns the guest's favicon if found, else an icon
representing the guest operating system. Currently supported by this
patch: Fedora, RHEL and derivatives, Debian (but not Ubuntu),
Windows XP, Windows 7.
This also updates virt-inspector to include an <icon> element
containing the icon in base64 encoding.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
There are two changes here:
(1) The code for listing RPM applications ran db_dump and parsed the
output. We abstract out that parsing code into a separate reusable
module (src/dbdump.c).
(2) The old db_dump parsing code used db_dump -p (printable) format.
Instead use db_dump -k (hex) format so we can read binary fields.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The src/inspect.c file had grown rather large -- 3,500 lines. Split
it across several files according to function.
This is just moving code.
After the split the files are more evenly divided:
536 src/inspect_apps.c
766 src/inspect.c
537 src/inspect_fs.c
404 src/inspect_fs_cd.c
785 src/inspect_fs_unix.c
535 src/inspect_fs_windows.c
3563 total
|
|
|
|
| |
This is just moving code around.
|
|
|
|
|
| |
rpcgen generates source which can't be safely compiled with strict-aliasing
enabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This API allows more than one callback to be registered for each
event, makes it possible to call the API from other languages, and
allows [nearly all] log, debug and trace messages to be rerouted from
stderr.
An older version of this API was discussed on the mailing list here:
https://www.redhat.com/archives/libguestfs/2010-December/msg00081.html
https://www.redhat.com/archives/libguestfs/2011-January/msg00012.html
This also updates guestfish to use the new API for its progress bars.
|
|
|
|
|
|
|
| |
With the new package building system, it is no longer dangerous to run
'configure', 'make' or 'make check' as root (although it is still not
necessary and not advisable). In any case we don't need to check
this.
|
| |
|
| |
|
|
|
|
|
| |
This removes the 'not-quite-separate' guestfs-actions.h and
guestfs-structs.h files.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This new API allows you to add the disks from a libvirt
domain.
In guestfish you can use the 'domain' command to access the
API, eg:
><fs> domain Fedora14 libvirturi:qemu:///system
1
The returned number is the number of disks that were added.
Also here is a proposed (but commented out) low-level API
which would allow you to add a domain from a virDomainPtr.
However there are several problems with this API -- see discussion
on the list:
https://www.redhat.com/archives/libguestfs/2010-November/thread.html#00028
|