Re: [Libguestfs] virt-df for KVM
by Richard W.M. Jones
On Sat, Nov 30, 2019 at 06:49:29PM +0800, zxs11289 wrote:
> I face a problem on KVM using virt-df。 I have two computer,they
> have installed tools for KVM. The computer(ip 15)has no virtual
> machine and computer(ip 33)has two virtual machines。on the
> computer(ip33), i run the command “virt-df” if on the computer(ip15),
> i run the command “virt-df --connect qemu+ssh://10.0.0.33/system”,
> ERROR:No such file or directory。But i have the file。why?
Unfortunately the --connect parameter doesn't let you access a disk on
a remote machine:
http://libguestfs.org/guestfs-faq.1.html#remote-libvirt-guests-cannot-be-...
It's not really possible the way you are doing it now. You will have
to run virt-df on the local machine. Perhaps use a tool like Ansible
(https://www.ansible.com/)?
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
4 years, 11 months
[PATCH 0/2] Move ocaml-augeas copy to libguestfs repo
by Pino Toscano
ocaml-augeas is used only by virtlibguestfs, so move it to this
repository, instead of having it around in the common submodule.
The removal from common will happen later.
Pino Toscano (2):
Bundle the ocaml-augeas library for use by libguestfs
build: switch embedded copy of ocaml-augeas
.gitignore | 1 +
3rdparty/ocaml-augeas/COPYING.LIB | 515 +++++++++++++++++++++++++
3rdparty/ocaml-augeas/Makefile.am | 82 ++++
3rdparty/ocaml-augeas/augeas-c.c | 579 ++++++++++++++++++++++++++++
3rdparty/ocaml-augeas/augeas.README | 8 +
3rdparty/ocaml-augeas/augeas.ml | 99 +++++
3rdparty/ocaml-augeas/augeas.mli | 164 ++++++++
Makefile.am | 6 +-
configure.ac | 2 +-
daemon/Makefile.am | 4 +-
docs/guestfs-hacking.pod | 19 +-
ocaml-dep.sh.in | 2 +-
12 files changed, 1469 insertions(+), 12 deletions(-)
create mode 100644 3rdparty/ocaml-augeas/COPYING.LIB
create mode 100644 3rdparty/ocaml-augeas/Makefile.am
create mode 100644 3rdparty/ocaml-augeas/augeas-c.c
create mode 100644 3rdparty/ocaml-augeas/augeas.README
create mode 100644 3rdparty/ocaml-augeas/augeas.ml
create mode 100644 3rdparty/ocaml-augeas/augeas.mli
--
2.23.0
4 years, 11 months
[v2v PATCH 0/2] Move libvirt-ocaml copy to v2v repo
by Pino Toscano
libvirt-ocaml is used only by virt-v2v, so move it to this repository,
instead of having it around in the common submodule.
The removal from common will happen later.
Pino Toscano (2):
common: Bundle the libvirt-ocaml library for use by virt-v2v
build: switch embedded copy of libvirt-ocaml
.gitignore | 2 +
3rdparty/libvirt-ocaml/Makefile.am | 93 ++
3rdparty/libvirt-ocaml/generator.pl | 890 ++++++++++
3rdparty/libvirt-ocaml/libvirt.README | 12 +
3rdparty/libvirt-ocaml/libvirt.ml | 1683 +++++++++++++++++++
3rdparty/libvirt-ocaml/libvirt.mli | 1652 +++++++++++++++++++
3rdparty/libvirt-ocaml/libvirt_c.h | 167 ++
3rdparty/libvirt-ocaml/libvirt_c_common.c | 464 ++++++
3rdparty/libvirt-ocaml/libvirt_c_oneoffs.c | 1716 ++++++++++++++++++++
Makefile.am | 2 +-
configure.ac | 2 +-
test-harness/Makefile.am | 2 +-
v2v/Makefile.am | 4 +-
13 files changed, 6684 insertions(+), 5 deletions(-)
create mode 100644 3rdparty/libvirt-ocaml/Makefile.am
create mode 100755 3rdparty/libvirt-ocaml/generator.pl
create mode 100644 3rdparty/libvirt-ocaml/libvirt.README
create mode 100644 3rdparty/libvirt-ocaml/libvirt.ml
create mode 100644 3rdparty/libvirt-ocaml/libvirt.mli
create mode 100644 3rdparty/libvirt-ocaml/libvirt_c.h
create mode 100644 3rdparty/libvirt-ocaml/libvirt_c_common.c
create mode 100644 3rdparty/libvirt-ocaml/libvirt_c_oneoffs.c
--
2.23.0
4 years, 11 months
[PATCH 0/2] tests: simpler way to use configure results
by Pino Toscano
Add a single shell script to hold results of configure.
Pino Toscano (2):
build: add an empty config.sh
tests: switch to config.sh for xmllint
.gitignore | 4 +---
config.sh.in | 22 +++++++++++++++++++
configure.ac | 7 +-----
...luks.sh.in => test-virt-inspector-luks.sh} | 2 +-
...inspector.sh.in => test-virt-inspector.sh} | 2 +-
.../{test-xmllint.sh.in => test-xmllint.sh} | 2 +-
tests/test-functions.sh | 3 +++
7 files changed, 30 insertions(+), 12 deletions(-)
create mode 100644 config.sh.in
rename inspector/{test-virt-inspector-luks.sh.in => test-virt-inspector-luks.sh} (94%)
rename inspector/{test-virt-inspector.sh.in => test-virt-inspector.sh} (95%)
rename inspector/{test-xmllint.sh.in => test-xmllint.sh} (93%)
--
2.23.0
4 years, 11 months
[v2v PATCH 0/3] tests: simpler way to use configure results
by Pino Toscano
Add a single shell script to hold results of configure.
Pino Toscano (3):
build: add an empty config.sh
Revert "tests: rhv-upload: Fix skip test of nbdkit python plugin."
tests: use the right nbdkit python3 plugin
.gitignore | 2 +-
config.sh.in | 22 +++++++++++++++++++
configure.ac | 3 +--
tests/Makefile.am | 1 +
tests/test-functions.sh | 3 +++
...-upload.sh.in => test-v2v-o-rhv-upload.sh} | 3 +--
6 files changed, 29 insertions(+), 5 deletions(-)
create mode 100644 config.sh.in
rename tests/{test-v2v-o-rhv-upload.sh.in => test-v2v-o-rhv-upload.sh} (95%)
--
2.23.0
4 years, 11 months
Long running nbdkit tests
by Richard W.M. Jones
The nbdkit tests take a long time to run especially on armv7. To try
to get an idea of which tests take the most time, and since I happen
to have a qemu aarch64 *TCG* guest available, I ran the tests on that
guest.
A TCG guest is about the worst case for libguestfs, used by some
tests, since it uses double-nested TCG, and as you can see below there
are tests taking over 6 hours.
In fact I didn't complete the run yet. test-cow.sh is still running
(after 2+ hours) and there may be further tests to come.
Results:
06:43:00 PASS: test-cache.sh
06:37:48 PASS: test-cache-on-read.sh
[ test-cow.sh possibly here ]
00:35:41 PASS: test-partitioning3.sh
00:34:29 PASS: test-partitioning5.sh
00:34:03 PASS: test-linuxdisk-copy-out.sh
00:33:58 PASS: test-floppy.sh
00:30:45 PASS: test-partitioning2.sh
00:28:41 PASS: test-linuxdisk.sh
00:28:34 PASS: test-iso.sh
00:02:59 PASS: test-cache-max-size.sh
00:02:58 PASS: test-partitioning6.sh
00:02:55 PASS: test-partitioning4.sh
00:02:51 PASS: test-eflags.sh
00:01:11 PASS: test-export-name.sh
00:01:01 PASS: test-parallel-sh.sh
00:00:54 PASS: test-python.sh
00:00:44 PASS: test-sh-errors.sh
00:00:44 PASS: test-cacheextents.sh
00:00:41 PASS: test-sh-extents.sh
00:00:35 PASS: test-info-base64.sh
Ignoring the ones which take mere minutes (those run in seconds on
more reasonable hardware), here is a summary of how the tests are
implemented:
test-cache.sh Gx2 F D
test-cache-on-read.sh Gx2 F D
test-cow.sh Gx3 F
test-partitioning3.sh G
test-partitioning5.sh G F
test-linuxdisk-copy-out.sh G Dx4
test-floppy.sh G Dx2
test-partitioning2.sh G F
test-linuxdisk.sh G D
test-iso.sh G
D = using libguestfs download or similar APIs
F = using libguestfs "fill" APIs which write lots of data
G = guestfish
xN = runs multiple times
So there's quite a strong correlation between multiple runs of
guestfish, and using those two APIs, and time taken.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
4 years, 11 months
[v2v PATCH 0/7] Various build fixes
by Pino Toscano
Just like the similar series that already went in for libguestfs [1],
do similar fixes also for virt-v2v, with additional fixes for the
builddir!=srcdir case.
This will also need the fix to subdir-rules.mk.
[1] https://www.redhat.com/archives/libguestfs/2019-December/msg00062.html
Pino Toscano (7):
Update common to latest
build: stop shipping files generated by configure
build: use the mlv2v library
build: do not ship generated sources
build: drop HAVE_OCAML conditionals
build: actually require libvirt
build: hopefully fix dependencies on generated files
.gitignore | 2 --
common | 2 +-
m4/guestfs-libraries.m4 | 22 ++-------------------
ocaml-dep.sh.in | 1 +
po/POTFILES-ml | 1 -
test-harness/Makefile.am | 4 ----
tests/Makefile.am | 2 --
v2v/Makefile.am | 42 ++++++++++++++--------------------------
8 files changed, 19 insertions(+), 57 deletions(-)
--
2.23.0
4 years, 11 months
[PATCH v2 0/6] Various small build fixes
by Pino Toscano
*** BLURB HERE? ***
Pino Toscano (6):
build: stop shipping files generated by configure
docs: fix out-of-source documentation build
generator: do not generate mlv2v files when not needed
perl: fix path to Build.PL
rust: fix path to lib.rs
rust: fix list of generator-built files
daemon/Makefile.am | 8 ++++++--
docs/Makefile.am | 4 ++--
generator/main.ml | 11 +++++++----
perl/Makefile.am | 2 +-
python/Makefile.am | 3 ++-
rust/Makefile.am | 5 ++---
tests/daemon/Makefile.am | 1 -
7 files changed, 20 insertions(+), 14 deletions(-)
--
2.23.0
4 years, 11 months
[common PATCH] mlv2v: build as OCaml library
by Pino Toscano
While there is only one OCaml source, build it as small library: this
way it is easier to use, and there is no need to copy the sources from
here.
---
.gitignore | 1 +
mlv2v/Makefile.am | 71 ++++++++++++++++++++++++++++++++++++++++++++---
mlv2v/dummy.c | 2 ++
3 files changed, 70 insertions(+), 4 deletions(-)
create mode 100644 mlv2v/dummy.c
diff --git a/.gitignore b/.gitignore
index 88c1c63..a788c55 100644
--- a/.gitignore
+++ b/.gitignore
@@ -60,6 +60,7 @@ Makefile.in
/mlutils/.depend
/mlutils/c_utils_unit_tests
/mlutils/oUnit-*
+/mlv2v/.depend
/mlvisit/.depend
/mlvisit/visit_tests
/mlxml/.depend
diff --git a/mlv2v/Makefile.am b/mlv2v/Makefile.am
index 9e82148..945f981 100644
--- a/mlv2v/Makefile.am
+++ b/mlv2v/Makefile.am
@@ -18,11 +18,74 @@
include $(top_srcdir)/subdir-rules.mk
EXTRA_DIST = \
- $(generator_built)
+ $(generator_built) \
+ $(SOURCES_MLI) \
+ $(SOURCES_ML) \
+ $(SOURCES_C)
-# Note: These are not compiled into a library. They are used directly
-# by virt-v2v and are only located here because the files are
-# generated (since the split).
generator_built = \
uefi.mli \
uefi.ml
+
+SOURCES_MLI = \
+ uefi.mli
+
+SOURCES_ML = \
+ uefi.ml
+
+SOURCES_C = \
+ dummy.c
+
+# We pretend that we're building a C library. automake handles the
+# compilation of the C sources for us. At the end we take the C
+# objects and OCaml objects and link them into the OCaml library.
+# This C library is never used.
+
+noinst_LIBRARIES = libmlv2v.a
+
+if !HAVE_OCAMLOPT
+MLV2V_CMA = mlv2v.cma
+else
+MLV2V_CMA = mlv2v.cmxa
+endif
+
+noinst_DATA = $(MLV2V_CMA)
+
+libmlv2v_a_SOURCES = $(SOURCES_C)
+libmlv2v_a_CPPFLAGS = \
+ -DCAML_NAME_SPACE \
+ -I. \
+ -I$(top_builddir) \
+ -I$(shell $(OCAMLC) -where)
+libmlv2v_a_CFLAGS = \
+ $(WARN_CFLAGS) $(WERROR_CFLAGS) \
+ -fPIC
+
+BOBJECTS = $(SOURCES_ML:.ml=.cmo)
+XOBJECTS = $(BOBJECTS:.cmo=.cmx)
+
+OCAMLPACKAGES = \
+ -package str,unix \
+ -I $(builddir)
+OCAMLPACKAGES_TESTS = $(MLV2V_CMA)
+
+OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)'
+
+if !HAVE_OCAMLOPT
+OBJECTS = $(BOBJECTS)
+else
+OBJECTS = $(XOBJECTS)
+endif
+
+libmlv2v_a_DEPENDENCIES = $(OBJECTS)
+
+$(MLV2V_CMA): $(OBJECTS) libmlv2v.a
+ $(OCAMLFIND) mklib $(OCAMLPACKAGES) \
+ $(OBJECTS) $(libmlv2v_a_OBJECTS) -o mlv2v
+
+# OCaml dependencies.
+.depend: $(srcdir)/*.mli $(srcdir)/*.ml
+ $(top_builddir)/ocaml-dep.sh $^
+-include .depend
+
+.PHONY: docs
diff --git a/mlv2v/dummy.c b/mlv2v/dummy.c
new file mode 100644
index 0000000..ebab619
--- /dev/null
+++ b/mlv2v/dummy.c
@@ -0,0 +1,2 @@
+/* Dummy source, to be used for OCaml-based tools with no C sources. */
+enum { foo = 1 };
--
2.23.0
4 years, 11 months
[common PATCH] build: stop shipping files generated by configure
by Pino Toscano
They will be generated by configure.
---
mlstdutils/Makefile.am | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/mlstdutils/Makefile.am b/mlstdutils/Makefile.am
index d29255e..2b4aed8 100644
--- a/mlstdutils/Makefile.am
+++ b/mlstdutils/Makefile.am
@@ -19,9 +19,12 @@ include $(top_srcdir)/subdir-rules.mk
EXTRA_DIST = \
$(SOURCES_MLI) \
- $(SOURCES_ML) \
+ $(filter-out $(CONFIGURE_GENERATED_ML),$(SOURCES_ML)) \
std_utils_tests.ml
+CONFIGURE_GENERATED_ML = \
+ guestfs_config.ml
+
SOURCES_MLI =
if HAVE_BYTES_COMPAT_ML
@@ -41,7 +44,7 @@ SOURCES_ML += bytes.ml
endif
SOURCES_ML += \
- guestfs_config.ml \
+ $(CONFIGURE_GENERATED_ML) \
stringMap.ml \
stringSet.ml \
std_utils.ml
--
2.23.0
4 years, 11 months