Displaying 20 results from an estimated 44 matches for "guestfs_add_drive_opts_format".
2018 Apr 05
2
[nbdkit PATCH] tests: Skip guestfs tests on CentOS 6
...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 +74,7 @@ main (int argc, char *argv[])
-1);
if (r == -1)
exit (EXIT_FAILURE);
+#endif
if (guestfs_launch (g) == -1)
exit (EXIT_FAILURE);
diff --git a/tests/test-delay.c b/tests/test-delay.c
index 47bf380..f037097 100644
---...
2012 Dec 14
3
inspect_os error with Win7 image
The error message:
hivex_close: do_hivex_close: you must call 'hivex-open' first to
initialize the hivex handle
This is the process flow:
g = guestfs_create ();
guestfs_add_drive_opts (g, diskFile,GUESTFS_ADD_DRIVE_OPTS_FORMAT,
"raw",-1);
guestfs_launch (g)
char **roots = guestfs_inspect_os (g);
guestfs_inspect_os returns NULL, guestfs_last_error(g) returns message above.
And guestfs_last_errno(g) returns 0.
However this same code works fine with a Server2008 image and an XP image.
I copied the verbo...
2013 Mar 14
1
guestfs_list_partitions with vdi
I'm using a Windows raw disk image that is "converted" to the VDI
format by custom code that prepends a header to the image.
I use 'vdi' for GUESTFS_ADD_DRIVE_OPTS_FORMAT of
guestfs_add_drive_opts().
After launching the appliance, the call to guestfs_list_partitions()
results in an empty list.
Is there a way to add the drive but have an offset into the image
file as a "starting point"?
So that it could skip the header which apparently is causing the
issue....
2013 Apr 04
2
launch failure of appliance with nbd drive
I'm using qemu-nbd to setup 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...
2014 Jan 28
0
[PATCH 05/10] examples: Update various examples to use new disk-create API.
...isk image, 512 MB in size. */
+ if (guestfs_disk_create (g, "disk.img", "raw", UINT64_C(512)*1024*1024,
+ -1) == -1)
+ exit (EXIT_FAILURE);
+
/* Add the disk image to libguestfs. */
if (guestfs_add_drive_opts (g, "disk.img",
GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", /* raw format */
diff --git a/examples/mount-local.c b/examples/mount-local.c
index 18970d0..291cb26 100644
--- a/examples/mount-local.c
+++ b/examples/mount-local.c
@@ -43,7 +43,7 @@ int
main (int argc, char *argv[])
{
guestfs_h *g;
- int fd, r;
+ int r;
char tempdir[]...
2020 Feb 19
2
[PATCH 0/1] virt-make-fs: add '--blocksize' option support
From: Nikolay Ivanets <stenavin@gmail.com>
This patch adds 4096 bytes sector size for output disk.
Side notes:
While working on this patch I reveal long standing issue: virt-make-fs can fail
if source directory/archive contains certain amount of really small or empty
files or wide tree of directories. That is because of lack of available inodes
on a small file system to keep files
2020 Mar 13
0
Re: Use libguestfs with SAS URI of a disk image
...; char const *servers[] = { (char const *)"<account>.blob.core.windows.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...
2020 Feb 19
0
[PATCH 1/1] virt-make-fs: add '--blocksize' option support
...at least 4096 blocks. Default block size is 4096 bytes. */
+ estimate += 4096 * 4096;
+ }
+
/* Add 10%, see above. */
estimate *= 1.10;
@@ -718,6 +741,7 @@ do_make_fs (const char *input, const char *output_str)
if (guestfs_add_drive_opts (g, output,
GUESTFS_ADD_DRIVE_OPTS_FORMAT, format,
+ GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE, blocksize,
-1) == -1)
return -1;
diff --git a/make-fs/test-virt-make-fs.sh b/make-fs/test-virt-make-fs.sh
index 79d058b6a..01c332b1d 100755
--- a/make-fs/test-virt-make-fs.sh
+++ b/make-f...
2015 May 06
0
Re: libguestfs init problem
...if (guestfs_disk_create (g, "disk.img", "raw", UINT64_C(512)*1024*1024,
> -1) == -1)
> exit (EXIT_FAILURE);
>
> /* Add the disk image to libguestfs. */
> if (guestfs_add_drive_opts (g, "disk.img",
> GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", /* raw format */
> GUESTFS_ADD_DRIVE_OPTS_READONLY, 0, /* for write */
> -1) /* this marks end of optional arguments */
> == -1)
> exit (EXIT_FAILURE);
>
> /* Run the libguestfs back-end. */
> if (guestfs_launch (g) == -1)...
2020 Feb 24
1
[PATCH v2] virt-make-fs: add '--blocksize' option support
...ocks. By default block size
+ * is 4096 bytes.
+ */
+ estimate += 4096 * 4096;
+ }
+
/* Add 10%, see above. */
estimate *= 1.10;
@@ -718,6 +743,7 @@ do_make_fs (const char *input, const char *output_str)
if (guestfs_add_drive_opts (g, output,
GUESTFS_ADD_DRIVE_OPTS_FORMAT, format,
+ GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE, blocksize,
-1) == -1)
return -1;
diff --git a/make-fs/test-virt-make-fs.sh b/make-fs/test-virt-make-fs.sh
index 79d058b6a..01c332b1d 100755
--- a/make-fs/test-virt-make-fs.sh
+++ b/make-f...
2012 Feb 15
2
[PATCH 0/2] Make appliance building thread-safe (RHBZ#790721).
These two patches make appliance building thread-safe. The first adds
a test which easily demonstrates the problem. The second fixes the
issue.
For more information see Ian McLeod's analysis of the bug here:
https://bugzilla.redhat.com/show_bug.cgi?id=790528#c5
Rich.
2019 Jan 21
0
[PATCH nbdkit v2 3/4] tests: Implement a better nbdkit-partition-filter test.
...-1)
- exit (EXIT_FAILURE);
-
- g = guestfs_create ();
- if (g == NULL) {
- 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_F...
2015 Oct 07
2
[PATCH 0/2] New APIs: set-identifier, get-identifier
This is very useful for debugging multithreaded programs.
Rich.
2019 Jan 22
0
[PATCH nbdkit v3 2/5] tests: Implement a better nbdkit-partition-filter test.
...-1)
- exit (EXIT_FAILURE);
-
- g = guestfs_create ();
- if (g == NULL) {
- 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_F...
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
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...git a/examples/create-disk.c b/examples/create-disk.c
index 4326a45..81e4dbd 100644
--- a/examples/create-disk.c
+++ b/examples/create-disk.c
@@ -29,9 +29,9 @@ main (int argc, char *argv[])
/* Add the disk image to libguestfs. */
if (guestfs_add_drive_opts (g, "disk.img",
- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", /* raw format */
- GUESTFS_ADD_DRIVE_OPTS_READONLY, 0, /* for write */
- -1) /* this marks end of optional arguments */
+ GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw", /* raw format */
+ GUESTFS_ADD_DRIVE_OPTS_READONLY, 0, /* for write */
+...
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
2015 May 05
3
libguestfs init problem
Hi ,all :
thanks for helping me ! I am using libguestfs-1.28.1 on ubuntu
12.04 to manage vm disk created by KVM. I downloaded
libguestfs-1.28.1.tar.gz ,and then executed
(1) ./autogen.sh (2) ./configure (3) make (4) make check .there is
the error.
/usr/Libvmi/libguestfs-1.28.1/run --test guest-aux/make-fedora-img.pl
md_create: feature 'mdadm' is not available in this
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.