search for: inspect_mount_root

Displaying 20 results from an estimated 32 matches for "inspect_mount_root".

2016 Mar 03
1
[PATCH] mllib: factor out mounting of guest root
Introduce and use a new inspect_mount_root function to mount all the mountpoints of a root in the guest, replacing the same code doing that in different tools. inspect_mount_root_ro is inspect_mount_root with readonly mount option. --- builder/builder.ml | 10 +--------- customize/customize_main.ml | 9 +-------...
2016 Jul 07
0
[PATCH 1/3] mllib: add checking for btrfs subvolume
...evice is needed. --- mllib/common_utils.ml | 10 ++++++++++ mllib/common_utils.mli | 3 +++ 2 files changed, 13 insertions(+) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 77b9acd..30fc5cd 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -922,3 +922,13 @@ let inspect_mount_root g ?mount_opts_fn root = let inspect_mount_root_ro = inspect_mount_root ~mount_opts_fn:(fun _ -> "ro") + +let is_btrfs_subvolume g fs = + let device = g#mountable_device fs in + let subvol = + try + g#mountable_subvolume fs + with Guestfs.Error msg as exn -> +...
2016 Jul 08
0
[PATCHv2 1/3] mllib: add checking for btrfs subvolume
...ere device is needed. --- mllib/common_utils.ml | 7 +++++++ mllib/common_utils.mli | 3 +++ 2 files changed, 10 insertions(+) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 77b9acd..35f6545 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -922,3 +922,10 @@ let inspect_mount_root g ?mount_opts_fn root = let inspect_mount_root_ro = inspect_mount_root ~mount_opts_fn:(fun _ -> "ro") + +let is_btrfs_subvolume g fs = + try + ignore (g#mountable_subvolume fs); true + with Guestfs.Error msg as exn -> + if g#last_errno () = Guestfs.Errno.errno_EINVAL t...
2016 Mar 07
0
[PATCH] inspector: add --no-applications and --no-icon
...s: unknown long option: %s (%d)\n"), guestfs_int_program_name, @@ -479,30 +489,35 @@ output_root (xmlTextWriterPtr xo, char *root) /* We need to mount everything up in order to read out the list of * applications and the icon, ie. everything below this point. */ - inspect_mount_root (g, root); - - output_applications (xo, root); + if (inspect_apps || inspect_icon) { + inspect_mount_root (g, root); + + if (inspect_apps) + output_applications (xo, root); + + if (inspect_icon) { + /* Don't return favicon. RHEL 7 and Fedora have crappy 16x16 + * fav...
2016 Jul 08
4
[PATCHv2 0/3] fix btrfs subvolume procession in tools
sparsify case: modified guestfs_is_lv mllib: fixed is_btrfs_subvolume Maxim Perevedentsev (3): mllib: add checking for btrfs subvolume lvm: modify guestfs_is_lv to take mountable sysprep: fix btrfs subvolume processing in fs-uuids daemon/lvm.c | 6 ++++-- generator/actions.ml | 6 +++--- mllib/common_utils.ml | 7 +++++++
2016 Jul 07
2
Re: [PATCH 1/3] mllib: add checking for btrfs subvolume
....ml | 10 ++++++++++ > mllib/common_utils.mli | 3 +++ > 2 files changed, 13 insertions(+) > > diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml > index 77b9acd..30fc5cd 100644 > --- a/mllib/common_utils.ml > +++ b/mllib/common_utils.ml > @@ -922,3 +922,13 @@ let inspect_mount_root g ?mount_opts_fn root = > > let inspect_mount_root_ro = > inspect_mount_root ~mount_opts_fn:(fun _ -> "ro") > + > +let is_btrfs_subvolume g fs = > + let device = g#mountable_device fs in > + let subvol = > + try > + g#mountable_subvolume fs &g...
2016 Jul 07
7
[PATCH 0/3] fix btrfs subvolume procession in tools
This patcheset fixes errors in virt-sysprep and virt-sparsify. Here we have a common functionality: is_btrfs_subvolume. Doesn't it make sense to turn it into guestfs API? Also I found an issue. In 'virt-sysprep fs-uuids', the uuids for ALL filesystems are regenerated as many times as many roots are in guest. Is it done intentionally? Maxim Perevedentsev (3): mllib: add checking
2016 Jul 07
0
Re: [PATCH 1/3] mllib: add checking for btrfs subvolume
...mmon_utils.mli | 3 +++ > > 2 files changed, 13 insertions(+) > > > > diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml > > index 77b9acd..30fc5cd 100644 > > --- a/mllib/common_utils.ml > > +++ b/mllib/common_utils.ml > > @@ -922,3 +922,13 @@ let inspect_mount_root g ?mount_opts_fn root = > > > > let inspect_mount_root_ro = > > inspect_mount_root ~mount_opts_fn:(fun _ -> "ro") > > + > > +let is_btrfs_subvolume g fs = > > + let device = g#mountable_device fs in > > + let subvol = > > + try...
2018 Oct 04
0
[PATCH v2 3/4] inspector: Use libxml writer macros.
...- - output_mountpoints (xo, root); - - output_filesystems (xo, root); - - output_drive_mappings (xo, root); - - /* We need to mount everything up in order to read out the list of - * applications and the icon, ie. everything below this point. - */ - if (inspect_apps || inspect_icon) { - inspect_mount_root (g, root); - - if (inspect_apps) - output_applications (xo, root); - - if (inspect_icon) { - /* Don't return favicon. RHEL 7 and Fedora have crappy 16x16 - * favicons in the base distro. - */ - str = guestfs_inspect_get_icon (g, root, &size, -...
2016 Sep 26
3
[PATCH 1/3] build: remove extra libconfig linkage
Some of the C tools were building also config.c as part of the shared sources from guestfish, and thus bringing a dependency on libconfig. Since none of them actually read the libguestfs configuration at all, then exclude fish/config.c from their build, and stop linking to libconfig. --- align/Makefile.am | 3 --- df/Makefile.am | 3 --- edit/Makefile.am | 3 ---
2017 Oct 05
2
Re: [PATCH] inspector: Fix virt-inspector on *BSD guests (RHBZ#1144138).
On Thu, Oct 05, 2017 at 06:55:53PM +0200, Pino Toscano wrote: > On Thursday, 5 October 2017 17:36:09 CEST Richard W.M. Jones wrote: > > --- > > inspector/inspector.c | 12 +++++++++++- > > 1 file changed, 11 insertions(+), 1 deletion(-) > > > > diff --git a/inspector/inspector.c b/inspector/inspector.c > > index 3583c61df..30d279987 100644 > > ---
2017 Oct 06
0
Re: [PATCH] inspector: Fix virt-inspector on *BSD guests (RHBZ#1144138).
...itions can fail, without particular mount options: $ ./run virt-inspector -a freebsd-10.qcow2 libguestfs: error: mount_ro: mount exited with status 32: mount: /sysroot: wrong fs type, bad option, bad superblock on /dev/sda2, missing codepage or helper program, or other error. (this happens in inspect_mount_root, when mounting it to get the icon of the guest, and to list the applications) > - libguestfs inspection doesn't > know anything about apps and icons from *BSD as far as I can see. > This patch just (temporarily) makes it so that virt-inspection acts > like --no-applications --no-ic...
2018 Nov 02
7
[PATCH v3 0/4] common/utils: Move libxml2 writer macros to a common header file.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html v2 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00051.html v3: - Back to using string/string_format and attribute/attribute_format. - Add both single_element and single_element_format. - Rebased and retested. Rich.
2018 Oct 04
2
[PATCH 0/2] Use common macros to help with libxml2 writer.
Consolidate and extend the use of funky start_element() etc macros. Rich.
2018 Oct 04
6
[PATCH v2 0/4] common/utils: Move libxml2 writer macros to a common header file.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html However it was broken in a few ways. First of all the documentation was broken because "/**" enhanced comments were not permitted on macros. This is fixed in the new 1/4 patch. Secondly we didn't use single_element() everywhere possible, which is fixed in the new 4/4 patch. Lastly I've
2017 Oct 05
2
[PATCH] inspector: Fix virt-inspector on *BSD guests (RHBZ#1144138).
...ecause the Linux kernel + * driver cannot just mount a UFS filesystem, we must disable this + * for all *BSD operating systems. We cannot read the apps or icon + * from *BSD anyway. */ - if (inspect_apps || inspect_icon) { + if ((inspect_apps || inspect_icon) && !is_bsd) { inspect_mount_root (g, root); if (inspect_apps) -- 2.13.2
2016 Sep 19
0
[PATCH 1/3] fish: move disk decryption helpers in own file
...ain.c */ extern int add_libvirt_drives (guestfs_h *g, const char *guest); @@ -124,7 +127,6 @@ extern void print_inspect_prompt (void); #if COMPILING_VIRT_INSPECTOR /* (low-level inspection functions, used by virt-inspector only) */ -extern void inspect_do_decrypt (guestfs_h *g); extern void inspect_mount_root (guestfs_h *g, const char *root); #endif diff --git a/format/Makefile.am b/format/Makefile.am index d196910..0e881a5 100644 --- a/format/Makefile.am +++ b/format/Makefile.am @@ -26,6 +26,7 @@ bin_PROGRAMS = virt-format SHARED_SOURCE_FILES = \ ../fish/config.c \ + ../fish/decrypt.c \ ../fi...
2017 Oct 06
2
Re: [PATCH] inspector: Fix virt-inspector on *BSD guests (RHBZ#1144138).
...cular mount options: > > $ ./run virt-inspector -a freebsd-10.qcow2 > libguestfs: error: mount_ro: mount exited with status 32: mount: /sysroot: wrong fs type, bad option, bad superblock on /dev/sda2, missing codepage or helper program, or other error. Correct. > (this happens in inspect_mount_root, when mounting it to get the icon > of the guest, and to list the applications) > > > - libguestfs inspection doesn't > > know anything about apps and icons from *BSD as far as I can see. > > This patch just (temporarily) makes it so that virt-inspection acts > >...
2016 Sep 19
6
[PATCH 0/3] add crypto/LUKS support in some OCaml-based tools
Hi, this series refactors some guestfish code (not much), and exposes it via Common_utils, so it is possible to decrypt LUKS partitions when using virt-customize, virt-get-kernel, virt-sparsify, and virt-sysprep. This brings them closer in features with C tools. Most probably a couple more of other OCaml-based tools (virt-v2v to convert encrypted guests, and virt-builder to use encrypted
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...lt;stdlib>*) + (* Annoyingly Sys.is_directory throws an exception on failure * (RHBZ#1022431). *) @@ -995,6 +1095,8 @@ let is_regular_file path = (* NB: follows symlinks. *) try (Unix.stat path).Unix.st_kind = Unix.S_REG with Unix.Unix_error _ -> false +(*</stdlib>*) + let inspect_mount_root g ?mount_opts_fn root = let mps = g#inspect_get_mountpoints root in let cmp (a,_) (b,_) = diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli index ad43345..7b142d4 100644 --- a/mllib/common_utils.mli +++ b/mllib/common_utils.mli @@ -16,6 +16,12 @@ * 51 Franklin Street, Fifth Floor...