Displaying 20 results from an estimated 2000 matches similar to: "[PATCH] lib: Pick up qemu-img path at build time."
2018 Aug 22
1
[PATCH] lib: create: avoid one extra string allocation
When creating the qemu-img command, use the guestfs_int_cmd_add_arg &
guestfs_int_cmd_add_arg_format APIs to add the proper filename directly,
without creating a string for it.
This should cause no functional change.
---
lib/create.c | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/lib/create.c b/lib/create.c
index 60e467fb6..fcc5855e0 100644
2017 Dec 15
0
[PATCH v2] lib/info: Remove /dev/fd hacking and pass a true filename to qemu-img info.
It obscures what's really going on and is no longer necessary
for the original purpose.
This reverts commit d50cb7bbb4cc18f69ea1425e9f5cee9685825f95.
See also:
https://www.redhat.com/archives/libguestfs/2017-November/thread.html#00226
https://www.redhat.com/archives/libguestfs/2017-December/thread.html#00044
---
lib/info.c | 34 ++++++++--------------------------
1 file changed, 8
2018 Oct 02
0
Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
+1 LGTM.
Thanks Richard.
On Fri, Sep 21, 2018 at 12:53 PM Richard W.M. Jones <rjones@redhat.com>
wrote:
> https://bugs.launchpad.net/qemu/+bug/1740364
> ---
> lib/guestfs-internal.h | 3 +++
> lib/handle.c | 2 ++
> lib/info.c | 39 +++++++++++++++++++++++++++++++++++++++
> 3 files changed, 44 insertions(+)
>
> diff --git
2018 Sep 21
4
[PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
https://bugs.launchpad.net/qemu/+bug/1740364
---
lib/guestfs-internal.h | 3 +++
lib/handle.c | 2 ++
lib/info.c | 39 +++++++++++++++++++++++++++++++++++++++
3 files changed, 44 insertions(+)
diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h
index adeb9478a..c66c55e70 100644
--- a/lib/guestfs-internal.h
+++ b/lib/guestfs-internal.h
@@ -510,6 +510,9 @@ struct
2018 Sep 12
1
[PATCH] lib: Use qemu-img info -U option to avoid locking error.
https://bugs.launchpad.net/qemu/+bug/1740364
---
lib/info.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/info.c b/lib/info.c
index 442a9755b..86044855e 100644
--- a/lib/info.c
+++ b/lib/info.c
@@ -149,6 +149,7 @@ get_json_output (guestfs_h *g, const char *filename)
guestfs_int_cmd_add_arg (cmd, QEMU_IMG);
guestfs_int_cmd_add_arg (cmd, "info");
+
2017 Dec 12
1
Re: failure to virt-sysprep (FC27?)
Well the patch is attached ... but ... it doesn't solve the problem
at all:
libguestfs: trace: disk_virtual_size "test1.vmdk"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ info
libguestfs: command: run: \ --output json
libguestfs: command: run: \ test1.vmdk
qemu-img: Could not open 'test1.vmdk': Failed to get shared "write" lock
Is
2015 May 26
0
[PATCH] lib: Limit space and time used by 'qemu-img info' subprocess.
After fuzzing 'qemu-img info' I found that certain files can cause the
command to use lots of memory and time. Modify the command
mini-library to allow us to place resource limits on subprocesses, and
use these to limit the amount of space and time used by 'qemu-img info'.
---
configure.ac | 3 +++
src/command.c | 53
2017 Sep 19
0
[PATCH 6/6] lib: Use guestfs_int_make_temp_path in a few more places.
There were various places in the library where we open coded making
temporary filenames. This uses the utility function instead.
---
lib/appliance-uefi.c | 4 +++-
lib/command.c | 5 +++--
lib/drives.c | 4 +++-
lib/inspect-icon.c | 12 +++++++++---
lib/launch-direct.c | 5 ++---
lib/launch-libvirt.c | 5 ++---
lib/launch-uml.c | 5 ++---
7 files changed, 24
2017 Jun 08
1
[PATCH] lib: create: Allow any [[:alnum:]]+ string as a backingfmt parameter.
If you use the libguestfs tools which open disk images read-only
(eg. virt-df), with formats such as 'vdi', then you will see an error:
error: invalid value for backingformat parameter 'vdi'
This is because opening a disk image read-only will try to create a
qcow2 file with the original image as a backing file. However the
list of permitted backing formats was very restrictive
2017 Jun 25
0
Re: [PATCH 1/2] launch: add support for autodetection of appliance image format
On Fri, Jun 23, 2017 at 04:12:35PM +0300, Pavel Butsykin wrote:
> This feature allows you to use different image formats for the fixed
> appliance. The raw format is used by default.
>
> Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
> ---
> lib/create.c | 5 +++--
> lib/guestfs-internal.h | 2 ++
> lib/launch-direct.c | 2 ++
>
2020 Feb 06
3
[PATCH] lib: Autodetect backing format and specify it explicitly.
In the guestfs_disk_create API we have traditionally allowed you to
set backingfile without setting backingformat. The meaning of this is
to let qemu autodetect the backing format when opening the overlay
disk.
However libvirt >= 6.0 refuses to even pass such disks to qemu (see
https://bugzilla.redhat.com/show_bug.cgi?id=1798148).
For this reason, move the autodetection earlier and make it
2017 Oct 06
0
Re: [PATCH] lib: Pick up qemu-img path at build time.
On Friday, 6 October 2017 15:59:42 CEST Richard W.M. Jones wrote:
> The main purpose of this change is two-fold:
>
> (1) Ensure that we run the same version of qemu-img that we are
> built against.
>
> (2) Allow the qemu-img path to be overridden at build time in case
> it's on a nonstandard path or (like RHV) has a nonstandard name.
> ---
As I mentioned in other
2017 Sep 12
0
[PATCH v2 2/5] lib: qemu: Factor out common code for reading and writing cache files.
The previous code duplicated a lot of common code for reading and
writing the cache file per data field. This change simply factors out
that common code. This makes it simpler to add new tests in future.
This is just refactoring, it should have no effect.
---
lib/qemu.c | 375 +++++++++++++++++++++++++++++++++++++++----------------------
1 file changed, 238 insertions(+), 137 deletions(-)
2015 Oct 14
2
[PATCH 1/2] lib: info: Move common code for setting child rlimits.
This is almost just refactoring, but I also set the memory
limit to really 1 GB, and not 1×10⁹.
---
src/info.c | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/src/info.c b/src/info.c
index d7f45f0..616ef50 100644
--- a/src/info.c
+++ b/src/info.c
@@ -56,6 +56,7 @@ static yajl_val get_json_output (guestfs_h *g, const char *filename);
static char
2014 Nov 23
0
[PATCH 1/3] lib: guestfs_disk_create: Allow vmdk as a valid backingformat.
Commit 588af1953e5f7ab74009b9175cc5d3efb8bb651a started with a very
conservative list of permitted backing formats (just "raw" or
"qcow2"). We can allow almost any format permitted by qemu, but this
commit just adds "vmdk" to this whitelist.
---
src/create.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/create.c b/src/create.c
index
2018 Jan 12
1
Re: [PATCH v2] lib/info: Remove /dev/fd hacking and pass a true filename to qemu-img info.
On Friday, 15 December 2017 09:26:29 CET Richard W.M. Jones wrote:
> It obscures what's really going on and is no longer necessary
> for the original purpose.
>
> This reverts commit d50cb7bbb4cc18f69ea1425e9f5cee9685825f95.
>
> See also:
>
> https://www.redhat.com/archives/libguestfs/2017-November/thread.html#00226
>
2020 Aug 12
0
[PATCH] appliance: extract UUID from QCOW2 disk image
For the appliance of the QCOW2 format, get the UUID of the disk by
reading the first 256k bytes with 'qemu-img dd' command. Then pass the
read block to the 'file' command. In case of failure, run the 'file'
command again directly.
Suggested-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
---
2020 Aug 13
0
Re: [PATCH v3] appliance: extract UUID from QCOW2 disk image
On Thu, Aug 13, 2020 at 07:48:52AM +0300, Andrey Shinkevich wrote:
> For the appliance of the QCOW2 format, the function get_root_uuid()
> fails to get the UUID of the disk image.
> In this case, let us read the first 256k bytes of the disk image with
> the 'qemu-img dd' command. Then pass the read block to the 'file'
> command.
>
> Suggested-by: Denis V.
2020 Aug 12
0
Re: [PATCH] appliance: extract UUID from QCOW2 disk image
On Wed, Aug 12, 2020 at 03:52:34PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> 12.08.2020 15:39, Andrey Shinkevich wrote:
> >For the appliance of the QCOW2 format, get the UUID of the disk by
> >reading the first 256k bytes with 'qemu-img dd' command. Then pass the
> >read block to the 'file' command. In case of failure, run the 'file'
> >command
2020 Aug 12
0
Re: [PATCH] appliance: extract UUID from QCOW2 disk image
On Wed, Aug 12, 2020 at 04:12:28PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> 12.08.2020 15:52, Vladimir Sementsov-Ogievskiy wrote:
> >12.08.2020 15:39, Andrey Shinkevich wrote:
> >>For the appliance of the QCOW2 format, get the UUID of the disk by
> >>reading the first 256k bytes with 'qemu-img dd' command. Then pass the
> >>read block to the