Re: [Libguestfs] nbdkit & qemu 2.12: qemu-img: Protocol error: simple reply when structured reply chunk was expected

2019-03-25 Thread Richard W.M. Jones
[Removed public mailing list] On Mon, Mar 25, 2019 at 01:45:32PM -0400, John Snow wrote: > > > On 3/23/19 8:21 AM, Richard W.M. Jones wrote: > > On Sat, Mar 23, 2019 at 06:57:14AM -0500, Eric Blake wrote: > >> On 3/23/19 6:42 AM, Richard W.M. Jones wrote: > >>> (b) Try and get it fixed in RHEL.

Re: [Libguestfs] nbdkit & qemu 2.12: qemu-img: Protocol error: simple reply when structured reply chunk was expected

2019-03-25 Thread John Snow
On 3/23/19 8:21 AM, Richard W.M. Jones wrote: > On Sat, Mar 23, 2019 at 06:57:14AM -0500, Eric Blake wrote: >> On 3/23/19 6:42 AM, Richard W.M. Jones wrote: >>> (b) Try and get it fixed in RHEL. I filed a BZ already but I guess it >>> won't be fixed any time soon: https://bugzilla.redhat.com/16

Re: [Libguestfs] [PATCH nbdkit 8/8] file: Implement extents.

2019-03-25 Thread Richard W.M. Jones
On Sat, Mar 23, 2019 at 02:45:44PM -0500, Eric Blake wrote: > On 3/20/19 5:11 PM, Richard W.M. Jones wrote: > > This uses lseek SEEK_DATA/SEEK_HOLE to search for allocated data and > > holes in the underlying file. > > --- > > plugins/file/file.c | 139

Re: [Libguestfs] [PATCH nbdkit 7/8] vddk: Implement extents.

2019-03-25 Thread Richard W.M. Jones
On Sat, Mar 23, 2019 at 02:29:54PM -0500, Eric Blake wrote: > On 3/20/19 5:11 PM, Richard W.M. Jones wrote: ... > > +for (i = 0; i < block_list->numBlocks; ++i) { > > + uint64_t offset, length; > > + > > + offset = block_list->blocks[i].offset * VIXDISKLIB_SECTOR_SIZE; > > + leng

Re: [Libguestfs] [PATCH nbdkit 6/8] data, memory: Implement extents.

2019-03-25 Thread Richard W.M. Jones
On Sat, Mar 23, 2019 at 12:05:51PM -0500, Eric Blake wrote: > On 3/20/19 5:11 PM, Richard W.M. Jones wrote: > > These plugins are both based on the same sparse array structure which > > supports a simple implementation of extents. > > --- > > > +int > > +sparse_array_extents (struct sparse_array *

Re: [Libguestfs] [PATCH nbdkit 4/8] offset: Implement mapping of extents.

2019-03-25 Thread Richard W.M. Jones
On Sat, Mar 23, 2019 at 11:58:26AM -0500, Eric Blake wrote: > On 3/20/19 5:11 PM, Richard W.M. Jones wrote: > > Allows you to safely use nbdkit-offset-filter on top of a plugin > > supporting extents. > > --- > > filters/offset/offset.c | 35 +++ > > 1 file changed,

Re: [Libguestfs] [PATCH nbdkit 3/8] server: Implement Block Status requests to read allocation status.

2019-03-25 Thread Richard W.M. Jones
On Sat, Mar 23, 2019 at 11:51:15AM -0500, Eric Blake wrote: > > + /* Send each block descriptor. */ > > + for (i = 0; i < nr_extents; ++i) { > > Where does the list terminate after 1 extent if REQ_ONE was set? Also, > if REQ_ONE is set but the plugin provided coalesced status beyond the > reques

Re: [Libguestfs] [PATCH nbdkit 1/8] server: Implement extents/can_extents calls for plugins and filters.

2019-03-25 Thread Eric Blake
On 3/25/19 12:01 PM, Richard W.M. Jones wrote: >>> +This callback is not required. If omitted, then we return true iff a >>> +C<.extents> callback has been defined. >> >> Should we default this to returning true always, _because_ we have the >> sane fallback of treating the entire image as alloca

Re: [Libguestfs] [PATCH nbdkit 1/8] server: Implement extents/can_extents calls for plugins and filters.

2019-03-25 Thread Richard W.M. Jones
On Mon, Mar 25, 2019 at 05:10:12PM +, Richard W.M. Jones wrote: > However there is still the question of if we should always advertise > base:allocation, and I think the answer there is yes we should always > advertise that (to clients that ask for it). This is what I've implemented in the nex

Re: [Libguestfs] [PATCH nbdkit 1/8] server: Implement extents/can_extents calls for plugins and filters.

2019-03-25 Thread Richard W.M. Jones
On Mon, Mar 25, 2019 at 05:01:39PM +, Richard W.M. Jones wrote: > > > +=head2 C<.can_extents> [...] > There is definitely a case for removing can_extents completely, and > relying on the fallback. Would this affect language bindings? I > think no because in the language bindings we can also e

Re: [Libguestfs] [PATCH nbdkit 1/8] server: Implement extents/can_extents calls for plugins and filters.

2019-03-25 Thread Richard W.M. Jones
On Sat, Mar 23, 2019 at 11:25:06AM -0500, Eric Blake wrote: > On 3/20/19 5:11 PM, Richard W.M. Jones wrote: > > + myfilter_extents (...) > > + { > > + size_t i; > > + struct nbdkit_extents *extents2; > > + struct nbdkit_extent e; > > + > > + extents2 = nbdkit_extents_new (offset); > > + n

Re: [Libguestfs] [PATCH] v2v: windows: save log file from rhev-apt installer

2019-03-25 Thread Richard W.M. Jones
On Thu, Feb 14, 2019 at 02:38:21PM +0100, Tomáš Golembiovský wrote: > Store log from MSI installer. Log file will be located in firstboot > scripts-done directory with name rhev-apt.log. The path has to be > double-quoted to handle spaces in path name properly. > > Hopefully this can help resolve

Re: [Libguestfs] [PATCH] inspect: fix icon of RHEL

2019-03-25 Thread Richard W.M. Jones
On Mon, Feb 11, 2019 at 07:33:29PM +0100, Pino Toscano wrote: > Use a better icon for RHEL guests, still provided by redhat-logos (or > equivalent in downstream distributions), and which fits a better > definition of logo for the distribution. > > Thanks to Ray Strode for the hints. > --- > lib/i

Re: [Libguestfs] [PATCH] v2v: -o libvirt: write win2k19 osinfo ID

2019-03-25 Thread Richard W.M. Jones
On Thu, Feb 28, 2019 at 11:12:19AM +0100, Pino Toscano wrote: > When writing the libosinfo metadata in the libvirt XML, use the newly > added (in osinfo-db) ID for Windows Server 2019; sadly, this version of > Windows has the same version as Windows Server 2016, so distinguish it > by looking at it

Re: [Libguestfs] [PATCH v2] inspect: return osinfo short IDs for recent Windows versions

2019-03-25 Thread Richard W.M. Jones
On Thu, Feb 28, 2019 at 11:11:44AM +0100, Pino Toscano wrote: > Return the right osinfo short IDs for the majority of Windows versions > since Windows XP. > --- > Changes from v1: > - used the new win2k19 osinfo ID > > > lib/inspect-osinfo.c | 63 > 1

Re: [Libguestfs] [PATCH] v2v: linux: do not uninstall open-vm-tools w/ ubuntu-server

2019-03-25 Thread Richard W.M. Jones
On Wed, Feb 27, 2019 at 06:00:08PM +0100, Pino Toscano wrote: > On Wednesday, 27 February 2019 17:57:08 CET Pino Toscano wrote: > > ubuntu-server depends on open-vm-tools on Ubuntu, so if v2v tries to > > uninstall open-vm-tools then dpkg will (rightfully) fail with a > > dependency issue. > > > >

Re: [Libguestfs] [PATCH 3/3] v2v: add -o json output mode

2019-03-25 Thread Richard W.M. Jones
If we pushed the baseline of OCaml up by (I think) just a single version then most of this code could be generated automatically from the description in the Types module. It would rely on the "new" (actually rather old) feature called extension points (ppx) which I think was added in 4.02. Howeve

Re: [Libguestfs] [PATCH 2/3] v2v: add Var_expander

2019-03-25 Thread Richard W.M. Jones
On Mon, Feb 25, 2019 at 05:22:51PM +0100, Pino Toscano wrote: [...] After being burned a few times with custom parsing (hello, guestfish) I'm not a big fan. Is there not an existing C or OCaml library/facility we could use here? It's a shame we can't use Perl Template Toolkit because it would be

Re: [Libguestfs] [PATCH 1/3] common/mlpcre: add offset flag for PCRE.matches

2019-03-25 Thread Richard W.M. Jones
On Mon, Feb 25, 2019 at 05:22:50PM +0100, Pino Toscano wrote: > diff --git a/common/mlpcre/pcre_tests.ml b/common/mlpcre/pcre_tests.ml > index 346019c40..f199ad63a 100644 > --- a/common/mlpcre/pcre_tests.ml > +++ b/common/mlpcre/pcre_tests.ml > @@ -18,6 +18,10 @@ > > open Printf > > +let optge

Re: [Libguestfs] [PATCH 4/4] OCaml tools: output messages into JSON for machine readable

2019-03-25 Thread Richard W.M. Jones
On Fri, Mar 22, 2019 at 04:33:43PM +0100, Pino Toscano wrote: > When the machine readable mode is enabled, print all the messages > (progress, info, warning, and errors) also as JSON in the machine > readable stream: this way, users can easily parse the status of the > OCaml tool, and report that b

Re: [Libguestfs] virt-v2v: default graphics driver for SUSE guests

2019-03-25 Thread Richard W.M. Jones
On Thu, Feb 28, 2019 at 04:38:14PM -0700, Mike Latimer wrote: > Hi Pino, > > On 2/26/19 5:52 PM, Mike Latimer wrote: > > On 2/21/19 3:07 AM, Pino Toscano wrote: > >> My question is: is using cirrus still the best choice for SUSE guests? > >> If not, what about using qxl as well, as done for any no

Re: [Libguestfs] [PATCH] inspect: return osinfo short IDs for recent Windows versions

2019-03-25 Thread Richard W.M. Jones
On Mon, Feb 25, 2019 at 01:36:40PM +0100, Pino Toscano wrote: > Return the right osinfo short IDs for the majority of Windows versions > since Windows XP. > --- > lib/inspect-osinfo.c | 60 > 1 file changed, 60 insertions(+) > > diff --git a/lib/inspec

Re: [Libguestfs] [PATCH 3/4] common/mltools: allow fd for machine readable output

2019-03-25 Thread Richard W.M. Jones
On Fri, Mar 22, 2019 at 04:33:42PM +0100, Pino Toscano wrote: > Allow to specify a file descriptor for the machine readable output. > > Sadly, the OCaml C glue for the channels is not public API, so enable > the internals for this... > --- > common/mltools/tools_utils-c.c | 17 + >

Re: [Libguestfs] [PATCH 2/4] common/mltools: make sure machine readable output is flushed

2019-03-25 Thread Richard W.M. Jones
On Fri, Mar 22, 2019 at 04:33:41PM +0100, Pino Toscano wrote: > Enhance the helper printf function for machine readable output to always > flush after each string: this way, readers of the machine readable > stream can get the output as soon as it is outputted. > --- > common/mltools/tools_utils.m