| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Release the Python global interpreter lock while running libguestfs
calls.
We don't release it around guestfs_create() because that is a short
call that just allocates memory. We do release it around
guestfs_close() since that is a potentially long-running (it can call
wait(2) amongst other things). We also release it around all the
other generated Python calls.
We don't yet support callbacks into Python code (ie. the new event
API). But when we do in future, we will need to also handle the GIL
around those callbacks.
This code is adapted from libvirt's python/typewrappers.h. Thanks to
Dan Berrange for showing us how to do this properly.
(cherry picked from commit 08dc4a87b92435678780e9c49fe3bc1e7465d99f)
|
|
|
|
| |
(cherry picked from commit a3cce465570bf192e993a67feedfbab7e662c75a)
|
|
|
|
| |
(cherry picked from commit 4c2bb8b301970e8853a8feaa95e3698224640fba)
|
|
|
|
| |
(cherry picked from commit 34d9fed24ad6a2d2e13bb817820e31373f6756e1)
|
|
|
|
|
| |
Also use 'exec' to run the program.
(cherry picked from commit 5d139fa8a4a7f9ff65e7b936fd7376f661c72f48)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the hack that let you run ./fish/guestfish or
./fuse/guestmount. You now have to do:
./run ./fish/guestfish
or
./run ./fuse/guestmount
to run these programs without installing.
(cherry picked from commit 33a2c184e12c0bdbf061a9f36c87d76c28444712)
|
|
|
|
|
|
| |
Remove all the run*locally scripts and replace with a single top level
./run shell script.
(cherry picked from commit 5790f5bfafb12cc2ed9365461bf66e0fdfde7150)
|
|
|
|
| |
(cherry picked from commit 0108d7861d4cc9a1f0d87d89080d1be7750e54b5)
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out that db_load incrementally updates the database (instead
of writing a new one). Remove the old database to force db_load to
write a new one.
This also ensures that we handle write failure gracefully.
Cherry picked from commit 67493bfca44d436143d825b155bf2bc38990ea82
and backported to stable-1.10 branch.
|
|
|
|
| |
(cherry picked from commit 36d3a4ce53317b104d48b60c9fe1ed679065d1d4)
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit a986e8dadb0c70634f6d1d89dd3e7bb5d9af3078)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
(cherry picked from commit 3336b5448f12c9eb25bf7a0cecda1315c4cf07ea)
|
|
|
|
|
| |
This is just moving code around.
(cherry picked from commit 439a42efdb052748c8457f866b2c68a581034826)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During inspection we download various files such as the Windows
'software' and 'system' registries. Previously these were downloaded
as temporary files and discarded immediately after use. This meant
that the 'software' registry was being downloaded twice by
virt-inspector (it's required once for basic OS inspection, and a
second time to list Windows applications).
This commit changes this so that these files are cached in g->tmpdir,
and thus the second time we just reuse the file we've already
downloaded.
Callers shouldn't be relying on inspect-list-applications to reread
the actual registry from the VM (unless you close and reopen the
handle). It says in the documentation that the results of inspection
may be cached in the handle.
(cherry picked from commit 3c1f762abed92f7a358f3bc93e3396d0606b18ad)
|
|
|
|
|
|
|
|
|
| |
In preparation for caching inspection information in the temporary
directory (g->tmpdir), allow the temporary directory to contain
arbitrary files, and remove all of them when the handle is closed.
This just generalizes the previous method of cleaning up the tmpdir.
(cherry picked from commit 70975981bed8e0c01b5966c10b507bb82086e5f8)
|
|
|
|
|
|
|
|
|
|
| |
* df/df.c: As above.
* df/main.c: As above.
* df/output.c: As above.
* fuse/guestmount.c: As above.
* inspector/virt-inspector.c: As above.
* rescue/virt-rescue.c: As above.
(cherry picked from commit 6740028b333840eec5e8e46e8512f8155728b037)
|
|
|
|
|
|
|
| |
* cat/virt-cat.c: Include string.h and libintl.h.
* cat/virt-filesystems.c: Likewise.
* cat/virt-ls.c: Likewise.
(cherry picked from commit ace1795d1045be96f92a68e6b61ffdee60431fef)
|
|
|
|
| |
(cherry picked from commit 173c374bd01e84deafdaf1f9aa65b0f623e86470)
|
|
|
|
|
|
|
| |
* fish/config.c: Include string.h, for use of strlen.
* fish/keys.c: Likewise, but for use of memcpy.
* fish/man.c: Likewise, but for use of memset.
(cherry picked from commit 0db662eae54b21fccadabe817afbc0fa89d980b2)
|
|
|
|
|
| |
* src/events.c: Include <string.h>, for use of strlen.
(cherry picked from commit a53833fdd21cd573fe8fd02d7a11a3a5e9764ce0)
|
|
|
|
| |
(cherry picked from commit 6ec2ed20cbbad871a8b48389cbe5785bb929c99f)
|
|
|
|
| |
(cherry picked from commit 0d9f2c7311b005b2cfe2ecb3ff9fb57d4576ef7b)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
We can now get drive letter mappings through the inspection API.
|
|
|
|
| |
Found using valgrind.
|
|
|
|
|
|
| |
This allows you to mount disks on (eg) /c and /e and have the
guestfish win:... path mechanism map drive letters to the
right places.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a fairly straightforward translation of Perl virt-resize into
OCaml. It is bug-for-bug and feature-for-feature identical to the
Perl version, except as noted below.
The motivation is to have a more solid, high-level, statically safe
compiled language to go forwards with fixing some of the harder bugs
in virt-resize. In particular contracts between different parts of
the program are now handled by statically typed structures checked at
compile time, instead of the very ad-hoc unchecked hash tables used by
the Perl version.
OCaml and the ocaml-pcre library (Perl-Compatible Regular Expressions
bindings for OCaml) are required.
Extra features in this version:
- 32 bit hosts are now supported.
- We try hard to handle the case where the target disk is not "clean"
(ie. all zeroes). It usually works for this case, whereas the
previous version would usually fail. However it is still
recommended that the system administrator creates a fresh blank disk
for the target before running the program.
- User messages are a bit more verbose and helpful. You can turn
these off with the -q (--quiet) option.
There is one lost feature:
- Ability to specify >= T (terabytes) sizes in command line size
expressions has been removed. This probably didn't work in the Perl
version.
Other differences:
- The first partition on the target is no longer aligned; instead we
place it at the same sector as on the source. I suspect that
aligning it was causing the bootloader failures.
- Because it's easier, we do more sanity checking on the source disk.
This might lead to more failures, but they'd be failures you'd want
to know about.
- The order in which operations are performed has been changed to make
it more logical. The user should not notice any functional
difference, but debug messages will be quite a bit different.
- virt-resize is a compiled binary, not a script.
|
|
|
|
|
| |
rpcgen generates source which can't be safely compiled with strict-aliasing
enabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This simplifies the libguestfs-test-tool program down to essentials.
Bugs most commonly occur when starting the appliance, so what we
should concentrate on test is just that.
Previously the test tool built a special static binary helper program,
packaged it up in an ISO, then ran this inside the appliance. None of
this really tested useful failure modes, but they did make the test
tool itself harder to build, harder for users to run, and more
brittle.
This change also adds some more debugging of libguestfs state.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This returns the drive mappings from the Windows Registry.
virt-inspector displays the drive mappings, giving output
similar to this:
<drive_mappings>
<drive_mapping name="C">/dev/sda2</drive_mapping>
<drive_mapping name="E">/dev/sdb1</drive_mapping>
</drive_mappings>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This returns the actual registry key corresponding to
CurrentControlSet (eg. it might be "ControlSet001").
Previously the inspection code was hard-coding ControlSet001. Now we
use the correct control set, and also make it available to callers
through the API.
This commit also updates the virt-dhcp-address example so it uses this
new API.
virt-inspector displays the current control set when available.
|