Displaying 20 results from an estimated 81 matches for "guestfs_debug".
2015 Sep 15
1
Re: Question: running appliance commands over guest fs (resize2fs -P).
...ot
>> require anything to exists on partition.
>>
>> In API I found only the 'command' command which requires the
>> partition to be mounted and have kernel image on it. This cannot
>> operate on empty or non-mounted partition.
> You probably want to use the guestfs_debug API, ie:
>
> char *cmd[] = { "resize2fs", "-P", ..., NULL };
> char *ret = guestfs_debug (g, "sh", cmd);
Yeah! This is just what I was looking for. Thank you :-)
> It's better to add a new API however, and not difficult either:
>
> http:/...
2015 Sep 15
4
Question: running appliance commands over guest fs (resize2fs -P).
Hello everyone!
I am working on resizing qcow2 images using virt-resize+liguestfs. E.g.
I when shrinking a partition, I have to resize filesystem using
resize2fs-size. The problem is that I cannot find out minimal partition
size (aka resize2fs -P). The only way is calling "resize2fs-size 1K",
wait for resize2fs to claim "resize2fs: New size smaller than minimum
(510050)"
2018 Apr 05
5
[nbdkit PATCH 0/3] Test zero callback of python plugin
I'm planning on tweaking the language callbacks to support fua;
first up is the python bindings. I want to move from:
def zero(h, count, offset, may_trim):
to a nicer:
def zero(h, count, offset, may_trim=False, fua=False):
where the C code passes keywords for the flags (we can add new
flags as needed), perhaps by using introspection to learn
whether the plugin has a mandatory may_trim
2015 Sep 15
0
Re: Question: running appliance commands over guest fs (resize2fs -P).
...run by daemon and do not
> require anything to exists on partition.
>
> In API I found only the 'command' command which requires the
> partition to be mounted and have kernel image on it. This cannot
> operate on empty or non-mounted partition.
You probably want to use the guestfs_debug API, ie:
char *cmd[] = { "resize2fs", "-P", ..., NULL };
char *ret = guestfs_debug (g, "sh", cmd);
It's better to add a new API however, and not difficult either:
http://libguestfs.org/guestfs.3.html#adding-a-new-api-action
Rich.
--
Richard Jones, Virtu...
2018 Apr 05
0
[nbdkit PATCH 2/3] tests: Add coverage of zero in language bindings
...he plugin's zero callback. Recent Linux kernels are now
smart enough to turn fallocate(2) with FALLOC_FL_ZERO_RANGE
into a SCSI WRITE SAME request, which qemu in turn converts
into an NBD_CMD_WRITE_ZEROES. Since libguestfs does not
directly have an API for this, we have to use the backdoor
of guestfs_debug and fallocate(1). But inspecting logs such
as tests/test-python.log, this change DOES prove that we
got a client request for write zeroes, and that the fallback
to pwrite due to test.py lacking a zero callback works.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
tests/test-lang-plugins...
2017 Mar 03
1
[PATCH] rescue: Implement --mount and -i options.
Depends on the previous 5 patches that modified virt-rescue
to work without direct mode:
https://www.redhat.com/archives/libguestfs/2017-March/msg00017.html
Rich.
2016 Dec 06
0
[PATCH 4/5] inspect: fix existance check of /dev/mapper devices
...06,19 @@ resolve_fstab_device_diskbyid (guestfs_h *g, const char *part,
return 0;
}
+static bool
+dev_mapper_exists (guestfs_h *g, const char *device)
+{
+ CLEANUP_FREE char *ret = NULL;
+ const char *const args[] = { device, NULL };
+
+ guestfs_push_error_handler (g, NULL, NULL);
+ ret = guestfs_debug (g, "exists", (char **) args);
+ guestfs_pop_error_handler (g);
+
+ return ret && ret[0] != 0;
+}
+
/* Resolve block device name to the libguestfs device name, eg.
* /dev/xvdb1 => /dev/vdb1; and /dev/mapper/VG-LV => /dev/VG/LV. This
* assumes that disks were added in...
2017 Feb 09
1
Re: ntfs-3g data deduplication support in guestmount for creating file based back-ups on visualization platform
Hi Richard,
Is there a way I can access the /var/log/syslog of an running guestmount
instance to get the grep ntfs-3g /var/log/syslog information?
I managed to get the plug-in to load in my questmount instances by using:
echo '/usr/lib/x86_64-linux-gnu/ntfs-3g/ntfs-plugin-*.so' >
/usr/lib/guestfs/supermin.d/zz-ntfs-plugins
rm -rf /var/tmp/.guestfs-*
Kind regards,
Jelle de Jong
2012 Dec 03
2
sample code for guestfs_hivex_node_set_value
Is there any sample code available to demonstrate the use of the
guestfs_hivex_node_set_value API?
I have no problem traversing and reading keys using libguestfs hivex
wrappers - but continue to fail on any write attempts.
The return is always -1 and errno is unchanged.
I've set the environment variable HIVEX_DEBUG to 1 on a chance that
this may help - but it doesn't.
The only sample I
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of
local disk.
Rich.
2017 Mar 03
6
[PATCH v2 0/6] Fix virt-rescue.
This supersedes the two previous patch series:
https://www.redhat.com/archives/libguestfs/2017-March/msg00017.html
https://www.redhat.com/archives/libguestfs/2017-March/msg00046.html
Rich.
2018 Aug 20
1
[PATCH nbdkit] tests: Add a root only test of the file plugin with
In libguestfs we have a few tests that require root privileges and
they are skipped by default (normally you should not build or test as
root), but you can do this to run them:
sudo make check-root
In nbdkit I wanted to check that the file plugin works with block
devices (this is not tested), and the only way I can sensibly think to
do this is using a loopback device and root. This commit
2018 Nov 14
5
[PATCH nbdkit v3 0/4] build: Replace ./nbdkit with a C program.
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-November/msg00147.html
v2 was here:
https://www.redhat.com/archives/libguestfs/2018-November/msg00152.html
v3:
- Use optarg != NULL as a sentinel for has_arg.
- Moved some variable decls into the inner loop.
- Make nbdkit wrapper depend on config.status, so if srcdir or
builddir changes then we rebuild the wrapper. It
2017 Mar 04
7
[PATCH v3] Fix virt-rescue.
Version 3:
- Tidies up the code further.
- Implements correct handling of SIGTSTP and SIGCONT.
- Adds: ^] s - sync filesystems
- Adds: ^] z - suspend virt-rescue
Rich.
2016 Dec 06
9
[PATCH 0/5] Improve inspection of /usr filesystems
Hi,
this patch series improves the way /usr filesystems are handled: tag
them appropriately, so later on we can find them and merge results they
contain directly back for the root filesystem.
The series includes also a new private debug API, and its usage to fix
the resolution of /dev/mapper/.. devices found in fstab; without it,
LVM /usr filesystems are not recognized as belonging to their
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
...name = "debug";
style = RString "result", [String "subcmd"; StringList "extraargs"], [];
proc_nr = Some 76;
- in_docs = false;
+ visibility = VDebug;
shortdesc = "debugging and internals";
longdesc = "\
The C<guestfs_debug> command exposes some internals of
@@ -6825,7 +6830,7 @@ yourself (Augeas support makes this relatively easy)." };
name = "internal_lstatlist";
style = RStructList ("statbufs", "stat"), [Pathname "path"; StringList "names"], [];...
2011 Jan 04
0
builder-debian libguestfs success 7ce627fce02eae8c7db36b4090fa0ce1bf69bf44
...ter type
../src/guestfs.h:492: note: expected 'char * const*' but argument is of type 'const char **'
com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1debug':
com_redhat_et_libguestfs_GuestFS.c:3619: warning: passing argument 3 of 'guestfs_debug' from incompatible pointer type
../src/guestfs.h:503: note: expected 'char * const*' but argument is of type 'const char **'
com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1vg_1activate':
com_redhat_et_libguestfs_GuestFS.c:4205: w...
2011 Jan 25
0
builder-debian libguestfs success 36fe0acf8a2e72c223d7a9f7a93815ff276a3cc1
...ter type
../src/guestfs.h:492: note: expected 'char * const*' but argument is of type 'const char **'
com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1debug':
com_redhat_et_libguestfs_GuestFS.c:3694: warning: passing argument 3 of 'guestfs_debug' from incompatible pointer type
../src/guestfs.h:503: note: expected 'char * const*' but argument is of type 'const char **'
com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1vg_1activate':
com_redhat_et_libguestfs_GuestFS.c:4280: w...
2010 Dec 10
0
builder-debian libguestfs success 363978fa7fc055da380d31103c7de378a08b71fb
...ter type
../src/guestfs.h:492: note: expected 'char * const*' but argument is of type 'const char **'
com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1debug':
com_redhat_et_libguestfs_GuestFS.c:3619: warning: passing argument 3 of 'guestfs_debug' from incompatible pointer type
../src/guestfs.h:503: note: expected 'char * const*' but argument is of type 'const char **'
com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1vg_1activate':
com_redhat_et_libguestfs_GuestFS.c:4205: w...
2011 Jan 04
0
builder-ubuntu libguestfs success 7ce627fce02eae8c7db36b4090fa0ce1bf69bf44
...ype
../src/guestfs.h:492:15: note: expected 'char * const*' but argument is of type 'const char **'
com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1debug':
com_redhat_et_libguestfs_GuestFS.c:3619:3: warning: passing argument 3 of 'guestfs_debug' from incompatible pointer type
../src/guestfs.h:503:14: note: expected 'char * const*' but argument is of type 'const char **'
com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1vg_1activate':
com_redhat_et_libguestfs_GuestFS.c:4205...