Re: [Libguestfs] missing file from 'supermin' git repository
by Richard W.M. Jones
On Thu, Sep 18, 2014 at 08:01:28PM -0400, Assaf Gordon wrote:
>
> I really like to potential of libguestfs, if it only worked for
> those darn BSDs :)
>
> Anyhow, I'm now trying to recompile libguestfs, which requires
> 'supermin' and ton of other packages...
Make sure you read the README closely.
> In the "supermin" git repository on github, there's at least one
> missing file "lib/Makefile.am" - it is references in "configure.ac",
> and so "autogen.sh/bootstrap/autoreconf" fail - which in turn
> prevents "./configure" from completing.
This is probably a gnulib file. If you run ./bootstrap and/or
./autogen.sh it should appear.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
10 years, 2 months
Need Help
by Priyanka Ranjan
Hello Experts,
I need a help from you . I am using CentOS 6.4 and using guestfish to
modify an ESX image.
I am adding a disk, executing "run" command and mounting it. the "run"
command is taking around 50 seconds . Is there any way to minimize it. If
we can not minimize it then Can we create and keep the guestfish virtual
shell open so that we can just add a disk , mount and modify the image in
few seconds.
Need your expert advice. Many Thanks in advance.
Thanks & Best Regards,
Priyanka.
10 years, 2 months
IRC question: is there a list of supported guest OSes and filesystems
by Richard W.M. Jones
00:48 < agn> Hello libguestFS developers
00:48 < agn> a question: is there a list of supported guest OSes and filesystems for 'libguestfs' ?
00:49 < agn> I'm trying to use it on some non-linux guests (under KVM with qcow2 images), and it doesn't seem to work.
00:49 < agn> Just wanted to make sure I'm not spending time on something that's officially not supported
[ As the topic says .. stay in the channel! ]
Libguestfs supports every filesystem that Linux supports (assuming it
is enabled either compiled in or as a module in your host kernel).
The only significant filesystem I'm aware of which is not supported is
Windows ReFS, only because no one has reverse engineered and
implemented a Linux driver for it yet.
Inspection supports a subset of all operating systems. We aim to
support all of them.
If you find an OS / filesystem which doesn't work, please file a bug.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
10 years, 2 months
[PATCH 0/3] tests: Introduce test harness for running tests.
by Richard W.M. Jones
These are my thoughts on adding a test harness to run tests instead of
using automake. The aim of this exercise is to allow us to run the
full test suite on an installed copy of libguestfs. Another aim is to
allow us to work around all the limitations and problems of automake.
The first patch makes an observation that since the ./run script sets
up $PATH to contain all the directories containing binaries, we can
change all the test scripts to use (eg) 'guestfish' instead of
'../fish/guestfish'. This allows the test scripts to be reused to
test the installed binary, simply by not invoking the ./run script.
Note this change is completely compatible with the current test
system.
The second patch is just preparation.
The third patch adds (or rather, generates) a shell script in the top
level directory called 'test-harness'. This script is what will run
the tests (replacing automake).
The test-harness script can be used both to run the tests on the built
tree, using:
./run test-harness [subdirectory]
or on an installed tree. The plan would be to install all the test
scripts and data files required into @libdir@/guestfs/tests, and then
you could run the test suite by doing:
cd /usr/lib/guestfs/tests
./test-harness
./test-harness --fast
./test-harness --slow --valgrind
The test-harness script is wired into the existing Makefile.am's by
having the generator also generate 'tests.mk' fragments which are
included in the existing Makefile.am's. They contain rules for
'check', 'check-valgrind' etc which were previously written by hand.
The aim here is to have commands like:
make check
make -C inspector check-valgrind
just work as they do currently.
Some unfinished business in the current patch set:
- Some tests need data files (tests/data and tests/guests) but these
are probably too large to ship around with the test suite, and have
to be generated because we don't want the test suite to require the
appliance. Exactly how this will work is not fully decided.
- Only the inspector/ subdirectory has been converted. All the other
tests and directories would have to be converted. Although this is
quite a lot of compatibility, it's still going to be a long and
painful process.
Rich.
10 years, 2 months
[PATCH 0/2] supermin: use librpm for rpm support
by Pino Toscano
Hi,
this work makes supermin use the rpm library instead of invoking rpm
directly. This, together with a needed refactoring of the dependency
resolution, should help in make supermin faster on rpm-based systems.
Surely the patches will still need polishing, especially for behaviours
of newly added stuff, but at least it's a good starting point.
Noting that you need rpm-devel on most of rpm systems, feedback of any
kind is more than welcome.
Pino Toscano (2):
package handlers: add possibility for final teardown
rpm: use the rpm library instead of invoking rpm
configure.ac | 4 +
src/Makefile.am | 7 +-
src/dpkg.ml | 1 +
src/librpm-c.c | 463 ++++++++++++++++++++++++++++++++++++++++++++++++
src/librpm.ml | 51 ++++++
src/librpm.mli | 48 +++++
src/package_handler.ml | 10 ++
src/package_handler.mli | 10 ++
src/pacman.ml | 1 +
src/rpm.ml | 218 +++++++++++------------
src/supermin-link.sh.in | 2 +-
src/supermin.ml | 4 +-
12 files changed, 702 insertions(+), 117 deletions(-)
create mode 100644 src/librpm-c.c
create mode 100644 src/librpm.ml
create mode 100644 src/librpm.mli
--
1.9.3
10 years, 2 months
[PATCH] Use open_process_full in compressed file reading
by Pino Toscano
Since only few bytes of the compressed file are read, closing the stdout
of the process will cause it to complain about that.
Switch to open_process_full instead of open_process_in, so we can close
also stderr and avoid that harmless error message.
---
src/build.ml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/build.ml b/src/build.ml
index 7011731..500ce33 100644
--- a/src/build.ml
+++ b/src/build.ml
@@ -322,13 +322,13 @@ and get_file_content file buf len =
and get_compressed_file_content zcat file =
let cmd = sprintf "%s %s" zcat (quote file) in
- let chan = open_process_in cmd in
+ let chan_out, chan_in, chan_err = open_process_full cmd [||] in
let buf = String.create 512 in
- let len = input chan buf 0 (String.length buf) in
+ let len = input chan_out buf 0 (String.length buf) in
(* We're expecting the subprocess to fail because we close the pipe
* early, so:
*)
- ignore (close_process_in chan);
+ ignore (Unix.close_process_full (chan_out, chan_in, chan_err));
get_file_content file buf len
--
1.9.3
10 years, 2 months
virt-resize: support to MBR logical partitions and some question
by Hu Tao
Hi,
I'm adding support to resizing logical partitions(patch is in progess).
But encounter an error when adding a logical partition in dest image:
virt-resize: libguestfs error: part_add: parted: /dev/sdb: Warning: The resulting partition is not properly aligned for best performance.
Error: Error informing the kernel about modifications to partition /dev/sdb5 -- Device or resource busy. This means Linux won't know about any changes you made to /dev/sdb5 until you reboot -- so you shouldn't mount it or use it in any way before rebooting.
Error: Failed to add partition 5 (Device or resource busy)
The error is actually no harm since the logical partition has been added
successfully, and I don't want to inform kernel at all. But it prevents
virt-resize from adding further logical partitions.
I can ignore the error when adding logical partitions manually using parted.
The question is, is there any way to ignore such errors in virt-resize?
Regards,
Hu Tao
10 years, 2 months
external call to v2v (vdsm integration)
by Shahar Havivi
Hi,
I have several question regarding error handling when we call v2v from vdsm:
1. do you have return code values table?
2. how can vdsm determine if operations success/fail assuming vdsm crushed or
the service restarted.
3. what is the best strategy to cancel blocked I/O calls?
Thanks,
Shahar.
10 years, 2 months
Cached filesystem data
by Doug Winter
I am trying to use guestfs to mount, read-only, a VDI filesystem that is
also open, read-write, by a separate Oracle VirtualBox VM.
Opening the filesystem works fine, however changes made to the
filesystem in the VirtualBox VM are not reflected in guestfs.
Even unmounting and then mounting the drive again does not show the
changes made since the first mount.
However, shutdown() and then launch() of the guests does then show the
changes.
I have tried the drop_caches() call, but this doesn't help either (which
is kind of unsurprising if unmounting is insufficient).
Is there any way of causing guestfs to see the changes made to the
filesystem without going through the slow shutdown/launch process?
Cheers,
Doug.
10 years, 2 months