search for: guestfs_add_drive_opts_protocol

Displaying 20 results from an estimated 24 matches for "guestfs_add_drive_opts_protocol".

2018 Apr 05
2
[nbdkit PATCH] tests: Skip guestfs tests on CentOS 6
...s/test-xz.c | 5 +++++ 16 files changed, 82 insertions(+) diff --git a/tests/test-connect.c b/tests/test-connect.c index 32ba79a..06c6163 100644 --- a/tests/test-connect.c +++ b/tests/test-connect.c @@ -62,6 +62,10 @@ main (int argc, char *argv[]) exit (EXIT_FAILURE); } +#ifndef GUESTFS_ADD_DRIVE_OPTS_PROTOCOL + printf ("libguestfs too old to support nbd disk, skipping\n"); + exit (77); +#else r = guestfs_add_drive_opts (g, "", GUESTFS_ADD_DRIVE_OPTS_READONLY, 1, GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", @@ -70,6...
2018 Apr 06
2
Re: [nbdkit PATCH] tests: Skip guestfs tests on CentOS 6
...a local file. The guestfs plugin can still be built, so no >> configure changes are needed; but skip the tests that fail to >> compile so that 'make check' can at least complete. >> >> Signed-off-by: Eric Blake <eblake@redhat.com> > > >> +#ifndef GUESTFS_ADD_DRIVE_OPTS_PROTOCOL > > There's a symbol defined for this kind of test: > > #ifndef GUESTFS_HAVE_ADD_DRIVE_OPTS > ... > > (from <guestfs.h>). The libguestfs on CentOS 6 does define GUESTFS_HAVE_ADD_DRIVE_OPTS (and the function family guestfs_add_drive_opts*), however, it only suppo...
2018 Apr 06
0
Re: [nbdkit PATCH] tests: Skip guestfs tests on CentOS 6
...an still be built, so no > >> configure changes are needed; but skip the tests that fail to > >> compile so that 'make check' can at least complete. > >> > >> Signed-off-by: Eric Blake <eblake@redhat.com> > > > > > >> +#ifndef GUESTFS_ADD_DRIVE_OPTS_PROTOCOL > > > > There's a symbol defined for this kind of test: > > > > #ifndef GUESTFS_HAVE_ADD_DRIVE_OPTS > > ... > > > > (from <guestfs.h>). > > The libguestfs on CentOS 6 does define GUESTFS_HAVE_ADD_DRIVE_OPTS (and > the function famil...
2013 Apr 04
2
launch failure of appliance with nbd drive
...etup the device with an offset into the image. Using libguestfs version 1.21.22 Code for adding the drive: char *server[] = { "localhost:3000", NULL }; if (guestfs_add_drive_opts (g, "" /* export name - see below */, GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "nbd", GUESTFS_ADD_DRIVE_OPTS_SERVER, server, -1) Here is some of the stdout. A mix of libguestfs and qemu-nbd messages. qemu-nbd -v -n -o 77824 -t -p 3000 -c /dev/nbd0 /home/skippy/mnt/mnt0/win7x64amdHP.vdi NBD device /dev/nbd0 is now connected to /home/skippy/mnt/mnt0/win...
2018 Apr 06
0
Re: [nbdkit PATCH] tests: Skip guestfs tests on CentOS 6
...an nbd drive instead > of a local file. The guestfs plugin can still be built, so no > configure changes are needed; but skip the tests that fail to > compile so that 'make check' can at least complete. > > Signed-off-by: Eric Blake <eblake@redhat.com> > +#ifndef GUESTFS_ADD_DRIVE_OPTS_PROTOCOL There's a symbol defined for this kind of test: #ifndef GUESTFS_HAVE_ADD_DRIVE_OPTS ... (from <guestfs.h>). However in this case I wonder if it would be better to test for this in the ./configure script and disable the HAVE_LIBGUESTFS automake conditional (but probably not error out...
2020 Mar 13
0
Re: Use libguestfs with SAS URI of a disk image
...ows.net", NULL }; > int addDriveRet = guestfs_add_drive_opts (g, "/<container>/<VMDiskImage>?sv=2017-04-17&sr=b&si=<guid>&sig=<secret>", > GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", > GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "https", > GUESTFS_ADD_DRIVE_OPTS_SERVER, servers, > GUESTFS_ADD_DRIVE_OPTS_READONLY, 1, > -1); Since you say you got it to work with guestfish, one trick is to run ‘guestfish -x’ (or the ‘trace true’ co...
2018 Apr 06
3
[nbdkit PATCH v2] tests: Skip guestfs code on CentOS 6
...mentation merely states the function was available since 0.3, without saying which later releases added new options); causing a compilation failure during 'make check'. Maybe the guestfs plugin should still be built, even though the tests that use guestfs can't work without support for GUESTFS_ADD_DRIVE_OPTS_PROTOCOL; but it's easier to just declare that on this old platform, we'll just disable guestfs integration altogether. With that in place, 'make check' now runs to completion, passing 14 and skipping 5 remaining tests. Signed-off-by: Eric Blake <eblake@redhat.com> --- configure.ac...
2019 Jan 21
0
[PATCH nbdkit v2 3/4] tests: Implement a better nbdkit-partition-filter test.
...- perror ("guestfs_create"); - exit (EXIT_FAILURE); - } - - r = guestfs_add_drive_opts (g, "", - GUESTFS_ADD_DRIVE_OPTS_READONLY, 1, - GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", - GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "nbd", - GUESTFS_ADD_DRIVE_OPTS_SERVER, server, - -1); - if (r == -1) - exit (EXIT_FAILURE); - - if (guestfs_launch (g) == -1) - exit (EXIT_FAILURE); - - /* Because we're using the partition filter, the device should...
2019 Jan 22
0
[PATCH nbdkit v3 2/5] tests: Implement a better nbdkit-partition-filter test.
...- perror ("guestfs_create"); - exit (EXIT_FAILURE); - } - - r = guestfs_add_drive_opts (g, "", - GUESTFS_ADD_DRIVE_OPTS_READONLY, 1, - GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", - GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "nbd", - GUESTFS_ADD_DRIVE_OPTS_SERVER, server, - -1); - if (r == -1) - exit (EXIT_FAILURE); - - if (guestfs_launch (g) == -1) - exit (EXIT_FAILURE); - - /* Because we're using the partition filter, the device should...
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
2020 Mar 17
2
[PATCH nbdkit v3] New tmpdisk plugin.
v2 was here: https://www.redhat.com/archives/libguestfs/2020-March/msg00154.html v3: - Micro-optimize tmpdir. - Quote $disk in default command shell fragment. - Don't redirect mkfs output to /dev/null. Instead use exec </dev/null >/dev/null before the shell fragment. We may want to do this in other places where we run external shell scripts, or more generally for all
2017 Nov 20
3
[nbdkit PATCH 0/2] Add nbd forwarder test coverage
To avoid bitrot, any new feature needs testsuite coverage ;) Still to come: once I get my work on parallel nbd finished, I will add a test-parallel-nbd.sh that closely mirrors what my other series added in test-parallel-file.sh. If desired, it might be a fun exercise to tweak test-nbd into using a for-loop of user-controlled depth for how deep you want to nest the forwarding tree, to see where
2013 Apr 05
3
[PATCH] Add support for SSH (Secure Shell) block device.
Note this patch requires a non-upstream qemu patch that I've been experimenting with. See qemu-devel list. Rich.
2020 Mar 17
2
[PATCH nbdkit v2] New tmpdisk plugin.
...if (g1 == NULL) { + perror ("guestfs_create"); + exit (EXIT_FAILURE); + } + guestfs_set_identifier (g1, "g1"); + + r = guestfs_add_drive_opts (g1, "", + GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", + GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "nbd", + GUESTFS_ADD_DRIVE_OPTS_SERVER, server, + -1); + if (r == -1) + exit (EXIT_FAILURE); + + if (guestfs_launch (g1) == -1) + exit (EXIT_FAILURE); + + g2 = guestfs_create (); + if (g2 == NULL) { + perror ("gu...
2016 Jan 11
1
[PATCH] Add support for newstyle NBD protocol (RHBZ#1297100).
Experimental and only very lightly tested so far. Rich.
2019 Apr 01
1
[PATCH nbdkit v2] Add readahead filter.
Simpler, and including tests. Rich.
2014 Jan 23
7
[PATCH 0/7] Various fixes for Ceph drives and parsing libvirt XML.
Miscellaneous fixes to: - Handling of Ceph drives now works end-to-end (RHBZ#1026688). - In particular, you can now use rbd:/// URIs in guestfish (and they work). - Parse Ceph & NBD network drives from libvirt XML correctly, so that existing domains with Ceph/NBD drives can be added (eg. using guestfish -d option). - Add more testing of the above.
2018 Jun 07
4
[PATCH nbdkit 0/4] plugins: Add new "ext2" plugin, for accessing ext2, ext3 or ext4 filesystems.
There is a small test provided. I tested this a lot more locally and it seems pretty robust. Rich.
2019 Jan 22
7
[PATCH nbdkit v3 0/5] partition filter: Support MBR logical partitions.
I think this addresses everything in Eric's v2 review. Note that the first patch is best viewed using ‘-w’ to ignore whitespaces changes. Rich.
2013 May 07
7
[PATCH 0/5] rbd improvements
This series improves ceph rbd support in libguestfs. It uses the servers list, adds support for a custom username, and starts to add support for custom secret.