Displaying 20 results from an estimated 178 matches for "guestfs_add_drive_opt".
Did you mean:
guestfs_add_drive_opts
2018 Apr 05
2
[nbdkit PATCH] tests: Skip guestfs tests on CentOS 6
CentOS 6 has libguestfs-devel 1.20.11, which predates the support
in guestfs_add_drive_opts() for requesting 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>
---
Even with this p...
2018 Apr 06
2
Re: [nbdkit PATCH] tests: Skip guestfs tests on CentOS 6
On 04/06/2018 04:26 AM, Richard W.M. Jones wrote:
> On Thu, Apr 05, 2018 at 03:03:41PM -0500, Eric Blake wrote:
>> CentOS 6 has libguestfs-devel 1.20.11, which predates the support
>> in guestfs_add_drive_opts() for requesting 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 <...
2020 Feb 11
0
[PATCH 1/1] tools: add '--blocksize' option for C-based tools
...cksize>
+
+This parameter sets the sector size of the disk image. Similar to
+I<--format> option it affects all subsequent I<-a> options. Using
+I<--blocksize> with no argument switches disk sector size to the
+default value which usually 512 bytes. See also
+L<guestfs(3)/guestfs_add_drive_opts>.
+
=item B<-P> nr_threads
Since libguestfs 1.22, virt-alignment-scan is multithreaded and
diff --git a/cat/cat.c b/cat/cat.c
index 4f0d7035e..eb070877a 100644
--- a/cat/cat.c
+++ b/cat/cat.c
@@ -70,6 +70,8 @@ usage (int status)
" -d|--domain guest Add disks fr...
2020 Feb 11
2
[PATCH 0/1] tools: add '--blocksize' option for C-based tools
From: Nikolay Ivanets <stenavin@gmail.com>
This patch depends on changes in 'common' sub-module posted here:
https://www.redhat.com/archives/libguestfs/2020-February/msg00096.html
Nikolay Ivanets (1):
tools: add '--blocksize' option for C-based tools
align/scan.c | 8 ++++++++
align/virt-alignment-scan.pod | 12 ++++++++++++
cat/cat.c
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 Feb 19
0
[PATCH 1/1] virt-make-fs: add '--blocksize' option support
From: Nikolay Ivanets <stenavin@gmail.com>
This patch adds '--blocksize' command line option for virt-make-fs
tool. This option allows specifying disk sector size as described in
'guestfs_add_drive_opts' libguestfs API.
---
make-fs/make-fs.c | 28 ++++++++++++++++++++++++++--
make-fs/test-virt-make-fs.sh | 5 ++++-
make-fs/virt-make-fs.pod | 10 ++++++++++
3 files changed, 40 insertions(+), 3 deletions(-)
diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c
index 5d8c3a385..81...
2020 Feb 24
1
[PATCH v2] virt-make-fs: add '--blocksize' option support
From: Nikolay Ivanets <stenavin@gmail.com>
This patch adds '--blocksize' command line option for virt-make-fs
tool. This option allows specifying disk sector size as described in
'guestfs_add_drive_opts' libguestfs API.
---
make-fs/make-fs.c | 30 ++++++++++++++++++++++++++++--
make-fs/test-virt-make-fs.sh | 5 ++++-
make-fs/virt-make-fs.pod | 10 ++++++++++
3 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c
index 5d8c3a385.....
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 Server200...
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 Apr 06
0
Re: [nbdkit PATCH] tests: Skip guestfs tests on CentOS 6
On Fri, Apr 06, 2018 at 09:02:01AM -0500, Eric Blake wrote:
> On 04/06/2018 04:26 AM, Richard W.M. Jones wrote:
> > On Thu, Apr 05, 2018 at 03:03:41PM -0500, Eric Blake wrote:
> >> CentOS 6 has libguestfs-devel 1.20.11, which predates the support
> >> in guestfs_add_drive_opts() for requesting 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.
> >>
> >> Signe...
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 th...
2011 Jun 16
1
Comment on libguestfs code in https://bitbucket.org/swamiyeswanth/pyti
...ction has a potential vulnerability, although it will only affect
you if you are modifying untrusted raw-format guests. The suggested
replacement is 'add_drive_opts' (which also has more features).
http://libguestfs.org/guestfs.3.html#guestfs_add_drive
http://libguestfs.org/guestfs.3.html#guestfs_add_drive_opts
https://bugzilla.redhat.com/642934
(3) Instead of using 'mount', use 'mount_options'. The 'mount' call
adds some flags to the mountpoint which are not very useful and also
make disk writes very slow.
http://libguestfs.org/guestfs.3.html#guestfs_mount
http://libguestfs.or...
2017 Oct 02
1
relaunching libguestfs with the same overlay
...https://github.com/libguestfs/libguestfs/blob/master/lib/drives.c#L68
https://github.com/libguestfs/libguestfs/blob/master/lib/launch-direct.c#L78
However you can simply create your own overlay and use that. Run
something like:
qemu-img create -b orig_disk -f qcow2 my_overlay
and change the guestfs_add_drive_opts call to use ?my_overlay? and
don't use the readonly flag.
> I'm talking about read-only mode so the real disks are not touched.
The above won't touch the original disk, as long as you do _not_ run
any commands such as ?qemu-img commit?.
Rich.
--
Richard Jones, Virtualization Gr...
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 Feb 17
1
[PATCH] virt-get-kernel: add '--blocksize' option support
From: Nikolay Ivanets <stenavin@gmail.com>
This patch adds '--blocksize' command line option for virt-get-kernel
tool. This option allows specifying disk sector size as described in
'guestfs_add_drive_opts' libguestfs API.
---
get-kernel/get_kernel.ml | 22 ++++++++++++----------
get-kernel/virt-get-kernel.pod | 8 ++++++++
2 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/get-kernel/get_kernel.ml b/get-kernel/get_kernel.ml
index ab6b2d55e..d29d0ef7f 100644
--- a/get-kerne...
2020 Mar 13
0
Re: Use libguestfs with SAS URI of a disk image
...h has shared access
> token/secret on the URL.
>
> The URL likes like this:
> 'https://<account>.blob.core.windows.net/<container>/<VMDiskImage>?sv=2017-04-17&sr=b&si=<guid>&sig=<secret>'
> I try to use this API:
>
> int
> guestfs_add_drive_opts (guestfs_h *g,
> const char *filename,
> ...);
>
>
> My code looks like this:
> char const *servers[] = { (char const *)"<account>.blob.core.windows.net", NULL };
> int addDriveRet = guestfs_add_drive_opts (g...
2014 Jul 04
2
iSCSI initiator iqn
Hi,
I could not find any option to set iSCSI initiator iqn while using
guestfish, although the underlying qemu command has this option.
It appears that each time guestfish tries to connect to iSCSI LUN, a
randomly generated initiator iqn is being used. This is preventing
guestfish to connect to the iSCSI target in our environment as the target
allows incoming connection based on the preconfigured
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...
2020 Feb 11
2
[PATCH v2] lib: add support for disks with 4096 bytes sector size
...uot; };
{ defaults with
@@ -558,6 +568,10 @@ Disks with the E<lt>readonly/E<gt> flag are skipped.
=back
+If present, the value of C<logical_block_size> attribute of E<lt>blockio/E<gt>
+tag in libvirt XML will be passed as C<blocksize> parameter to
+C<guestfs_add_drive_opts>.
+
The other optional parameters are passed directly through to
C<guestfs_add_drive_opts>." };
@@ -597,6 +611,10 @@ The optional C<readonlydisk> parameter controls what we do for
disks which are marked E<lt>readonly/E<gt> in the libvirt XML.
See C<guestfs_...
2014 Jan 28
0
[PATCH 05/10] examples: Update various examples to use new disk-create API.
...tfs_set_trace (g, 1);
+ /* Create a raw-format sparse disk 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...