Re: [Libguestfs] Fwd: virt-v2v creating image that does not install guest agent on first boot

2023-09-11 Thread Richard W.M. Jones


If we suspect that the whole firstboot mechanism might not be working
with the new version of Windows, one way to test it (on this one, or a
freshly installed Windows VM) would be:

  $ virt-customize -a windows.img --firstboot-command 'echo hello'

and see if "hello" is written in some form to the log.txt file inside
the guest after it boots.

If that doesn't work then it's likely some change in Windows which is
breaking firstboot support.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] Fwd: virt-v2v creating image that does not install guest agent on first boot

2023-09-11 Thread Lee Garrett

Hi,

On 11.09.23 15:13, Richard W.M. Jones wrote:

On Sun, Sep 10, 2023 at 11:34:22AM +0100, Richard W.M. Jones wrote:

This message got caught in moderation because the attachment
was large.  I put the attachment here:

http://oirase.annexia.org/tmp/2023-lgarrett-virt-v2v-debug-output.txt

- Forwarded message from Lee Garrett  -

Date: Sun, 10 Sep 2023 00:09:17 +0200
From: Lee Garrett 
To: libguestfs@redhat.com
Subject: virt-v2v creating image that does not install guest agent on first
  boot

Hi,

rwmjones from #guestfs on libera IRC pointed me to this mail address.

I've noticed that converting the latest Windows 11 trial image via
virt-v2v does not install the guest agent any more on first boot. I
have let the machine settle for ~10 minutes to ensure it's not just
because I'm too impatient. I can see C:\qemu-ga-x86-64.msi, and also a
bunch of files in  "C:\Program Files\Guestfs\Firstboot\" and
.\Scripts, so the files are definitely copied onto the VM image, just
not executed for some reason.


I can see from the log that these are installed in the image.


The vmware image was downloaded from 
https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/.
The issue should be 100% reproducible (at least for me). I recall that
an older image from two, three weeks ago downloaded from the same
location did not have this issue. There guest agent was installed and
working on the first boot. Unfortunately I overwrote the image so I
cannot verify this.

I have attached the debug output of the virt-v2v run of the latest
image where this issue is apparent (guest agent not being installed).

Please let me know if there's anything else I can check, or if you
need any further info.


The main thing to look for is any debugging output which should appear
in c:\program files\guestfs\firstboot\log.txt

It would be interesting to know if this file is present at all, and
what exactly it contains.


There is unfortunately no log.txt in that or related paths.



I've CC'd my colleague Ming on this to see if she has noticed anything
with recent Windows 11.

Rich.


Cheers,
Lee

- End forwarded message -

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs




___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 10/10] XXX docs: Remove references to -U - when it is implicit

2023-09-11 Thread Richard W.M. Jones


This series, minus the delayed documentation patch, plus the
--dump-config patch, was pushed as:

ff3c9eb0e..868954b23

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 10/10] XXX docs: Remove references to -U - when it is implicit

2023-09-11 Thread Richard W.M. Jones
On Mon, Sep 11, 2023 at 09:34:50AM -0500, Eric Blake wrote:
> On Sat, Sep 09, 2023 at 02:57:58PM +0100, Richard W.M. Jones wrote:
> > XXX NOTE XXX
> > 
> > I would not apply this patch immediately, since online documentation
> > will get updated as soon as I do that.  Best to wait until after 1.36
> > is released at least.
> 
> At the earliest, on the day that we are ready to cut 1.36 (I don't see
> a problem with the docs being updated once the tarball will be ready,
> rather than having to wait yet longer to 1.36.1).  But I agree that we
> aren't quite ready for the stable release yet.
> 
> > 
> > XXX END NOTE XXX
> > ---
> >  docs/nbdkit-captive.pod   | 6 +++---
> >  filters/cacheextents/nbdkit-cacheextents-filter.pod   | 2 +-
> >  filters/checkwrite/nbdkit-checkwrite-filter.pod   | 6 +++---
> >  filters/pause/nbdkit-pause-filter.pod | 2 +-
> >  filters/retry/nbdkit-retry-filter.pod | 2 +-
> >  plugins/linuxdisk/nbdkit-linuxdisk-plugin.pod | 4 ++--
> >  plugins/nbd/nbdkit-nbd-plugin.pod | 2 +-
> >  plugins/random/nbdkit-random-plugin.pod   | 2 +-
> >  plugins/sparse-random/nbdkit-sparse-random-plugin.pod | 2 +-
> >  plugins/torrent/nbdkit-torrent-plugin.pod | 6 +++---
> >  plugins/vddk/nbdkit-vddk-plugin.pod   | 4 ++--
> >  BENCHMARKING  | 4 ++--
> 
> Unless I'm mistaken, BENCHMARKING is the only file in this list that
> is not live on the website, and therefore which could be hoisted into
> 9/10 if desired.  But I see no harm in leaving it here.
> 
> Obviously, we'd better not forget to apply this at the correct later
> date, and you'll have to touch up the commit message at that point.
> But once we are ready, feel free to add
> 
> Reviewed-by: Eric Blake 

I now have a special local branch called
'2023-run-U-push-after-1.36-is-released' :-)

Thanks for the reviews.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 10/10] XXX docs: Remove references to -U - when it is implicit

2023-09-11 Thread Eric Blake
On Sat, Sep 09, 2023 at 02:57:58PM +0100, Richard W.M. Jones wrote:
> XXX NOTE XXX
> 
> I would not apply this patch immediately, since online documentation
> will get updated as soon as I do that.  Best to wait until after 1.36
> is released at least.

At the earliest, on the day that we are ready to cut 1.36 (I don't see
a problem with the docs being updated once the tarball will be ready,
rather than having to wait yet longer to 1.36.1).  But I agree that we
aren't quite ready for the stable release yet.

> 
> XXX END NOTE XXX
> ---
>  docs/nbdkit-captive.pod   | 6 +++---
>  filters/cacheextents/nbdkit-cacheextents-filter.pod   | 2 +-
>  filters/checkwrite/nbdkit-checkwrite-filter.pod   | 6 +++---
>  filters/pause/nbdkit-pause-filter.pod | 2 +-
>  filters/retry/nbdkit-retry-filter.pod | 2 +-
>  plugins/linuxdisk/nbdkit-linuxdisk-plugin.pod | 4 ++--
>  plugins/nbd/nbdkit-nbd-plugin.pod | 2 +-
>  plugins/random/nbdkit-random-plugin.pod   | 2 +-
>  plugins/sparse-random/nbdkit-sparse-random-plugin.pod | 2 +-
>  plugins/torrent/nbdkit-torrent-plugin.pod | 6 +++---
>  plugins/vddk/nbdkit-vddk-plugin.pod   | 4 ++--
>  BENCHMARKING  | 4 ++--

Unless I'm mistaken, BENCHMARKING is the only file in this list that
is not live on the website, and therefore which could be hoisted into
9/10 if desired.  But I see no harm in leaving it here.

Obviously, we'd better not forget to apply this at the correct later
date, and you'll have to touch up the commit message at that point.
But once we are ready, feel free to add

Reviewed-by: Eric Blake 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 09/10] tests: Remove references to -U - when it is implicit

2023-09-11 Thread Eric Blake
On Sat, Sep 09, 2023 at 02:57:57PM +0100, Richard W.M. Jones wrote:
> In tests where we used 'nbdkit -U - ... --run', remove -U - as that is
> now implicit.
> ---
>  tests/Makefile.am|  2 +-

Also big, but likewise useful.  (We'll still have to use explicit -U-
in libnbd for a while longer, but that shouldn't hold up this patch in
nbdkit).

>  tests/test-zero.sh   |  2 +-
>  133 files changed, 232 insertions(+), 232 deletions(-)

After doing git grep -e '-U -', I see the remaining files are in patch
10/10 (where changing them now before the stable release is imminent
could cause confusion).

Reviewed-by: Eric Blake 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 08/10] tests: Be punctilious about using requires_run in tests that use --run

2023-09-11 Thread Eric Blake
On Sat, Sep 09, 2023 at 02:57:56PM +0100, Richard W.M. Jones wrote:
> This requires that nbdkit is built with the --run feature, which
> (currently) is not true for Windows.  (In some tests we separately
> checked for !Windows, but let's favour consistency.)
> ---
>  plugins/rust/test-ramdisk.sh | 2 ++
>  tests/test-S3.sh | 1 +

>  tests/test-vsock.sh  | 1 +
>  75 files changed, 76 insertions(+)

Big, but mechanical and makes sense.

Reviewed-by: Eric Blake 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 04/10] server: Calculate $uri in one place

2023-09-11 Thread Richard W.M. Jones
On Mon, Sep 11, 2023 at 09:19:12AM -0500, Eric Blake wrote:
> On Mon, Sep 11, 2023 at 03:09:21PM +0100, Richard W.M. Jones wrote:
> > > > -  case SERVICE_MODE_UNIXSOCKET:
> > > > -fprintf (fp, "nbd%s+unix://", tls == 2 ? "s" : "");
> > > > -if (export_name && strcmp (export_name, "") != 0) {
> > > > -  putc ('/', fp);
> > > > -  uri_quote (export_name, fp);
> > > > -}
> > > > -fprintf (fp, "\\?socket=");
> > > > -uri_quote (unixsocket, fp);
> > > 
> > > Beforehand, we were manually shell-quoting the ? in the Unix URI...
> > 
> > The shell quoting here was only marginally useful before this change.
> > In theory there might be a file in a subdirectory called
> > 'nbd+unix:/Xsocket=' which would match :-)
> 
> > > > +  switch (service_mode) {
> > > > +  case SERVICE_MODE_UNIXSOCKET:
> > > > +fprintf (fp, "nbd%s+unix://", tls == 2 ? "s" : "");
> > > > +if (export_name && strcmp (export_name, "") != 0) {
> > > > +  putc ('/', fp);
> > > > +  uri_quote (export_name, fp);
> > > > +}
> > > > +fprintf (fp, "?socket=");
> > > > +uri_quote (unixsocket, fp);
> > > 
> > > ...where the manual shell-quoting is no longer injected.  Yes, this
> > > looks correct (the appearance of the quoting, using '' instead of \,
> > > may be different, but the resulting string as parsed by the shell is
> > > the same).
> 
> My point was that pre-patch, we had:
> 
> nbd+unix://\?socket=...
> 
> and post-patch, we have:
> 
> 'nbd+unix://?socket=...'
> 
> but both forms are equally quoted; after the shell removes \ or ''
> quoting, we are left with:
> 
> nbd+unix://?socket=...
> 
> and neither form allowed the glob expansion of the (unlikely) file
> nbd+unix:/Xsocket=...
> 
> My comment was more about why changing the fprintf("\\?socket=")
> pre-patch to fprintf("?socket=") post-patch was correct.

Agreed, thanks!

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 07/10] tests/test-parallel-*.sh: Remove redundant comment

2023-09-11 Thread Eric Blake
On Sat, Sep 09, 2023 at 02:57:55PM +0100, Richard W.M. Jones wrote:
> ---
>  tests/test-parallel-file.sh | 1 -
>  tests/test-parallel-nbd.sh  | 1 -
>  tests/test-parallel-sh.sh   | 1 -
>  3 files changed, 3 deletions(-)

Reviewed-by: Eric Blake 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 06/10] server: Make --run imply -U -

2023-09-11 Thread Eric Blake
On Sat, Sep 09, 2023 at 02:57:54PM +0100, Richard W.M. Jones wrote:
> Almost always when you used nbdkit --run you should also use -U - (to
> use a private Unix domain socket).  Otherwise nbdkit listened on TCP
> port 10809, which had two bad side effects: It permitted other
> processes to interfere with your --run command, and it reserved a
> public TCP port which would stop two instances of nbdkit running at
> the same time.  This was a frequent cause of bugs in test cases.

Indeed, I can easily find a number of commits where we added -U- after
the fact because of testsuite failures ;)

> 
> Switch the default so now --run implies -U -
> 
> You can still get the old behaviour by using --port explicitly, but
> that is almost certainly a bad idea.  (Using --run and --vsock works
> the same way as before too.  It is also usually a bad idea, although
> we use it in one test.)
> ---
>  docs/nbdkit-captive.pod | 7 ---
>  docs/nbdkit.pod | 9 -
>  server/main.c   | 9 +
>  3 files changed, 17 insertions(+), 8 deletions(-)
>

Reviewed-by: Eric Blake 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 04/10] server: Calculate $uri in one place

2023-09-11 Thread Eric Blake
On Mon, Sep 11, 2023 at 03:09:21PM +0100, Richard W.M. Jones wrote:
> > > -  case SERVICE_MODE_UNIXSOCKET:
> > > -fprintf (fp, "nbd%s+unix://", tls == 2 ? "s" : "");
> > > -if (export_name && strcmp (export_name, "") != 0) {
> > > -  putc ('/', fp);
> > > -  uri_quote (export_name, fp);
> > > -}
> > > -fprintf (fp, "\\?socket=");
> > > -uri_quote (unixsocket, fp);
> > 
> > Beforehand, we were manually shell-quoting the ? in the Unix URI...
> 
> The shell quoting here was only marginally useful before this change.
> In theory there might be a file in a subdirectory called
> 'nbd+unix:/Xsocket=' which would match :-)

> > > +  switch (service_mode) {
> > > +  case SERVICE_MODE_UNIXSOCKET:
> > > +fprintf (fp, "nbd%s+unix://", tls == 2 ? "s" : "");
> > > +if (export_name && strcmp (export_name, "") != 0) {
> > > +  putc ('/', fp);
> > > +  uri_quote (export_name, fp);
> > > +}
> > > +fprintf (fp, "?socket=");
> > > +uri_quote (unixsocket, fp);
> > 
> > ...where the manual shell-quoting is no longer injected.  Yes, this
> > looks correct (the appearance of the quoting, using '' instead of \,
> > may be different, but the resulting string as parsed by the shell is
> > the same).

My point was that pre-patch, we had:

nbd+unix://\?socket=...

and post-patch, we have:

'nbd+unix://?socket=...'

but both forms are equally quoted; after the shell removes \ or ''
quoting, we are left with:

nbd+unix://?socket=...

and neither form allowed the glob expansion of the (unlikely) file
nbd+unix:/Xsocket=...

My comment was more about why changing the fprintf("\\?socket=")
pre-patch to fprintf("?socket=") post-patch was correct.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 05/10] server: Add the NBD URI to debug output

2023-09-11 Thread Richard W.M. Jones
On Mon, Sep 11, 2023 at 09:04:13AM -0500, Eric Blake wrote:
> Do we also want to output a debug statement when a URI is not
> possible, such as under -s?

Yes, I'll add something for those two cases.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 04/10] server: Calculate $uri in one place

2023-09-11 Thread Richard W.M. Jones
On Mon, Sep 11, 2023 at 09:01:47AM -0500, Eric Blake wrote:
> On Sat, Sep 09, 2023 at 02:57:52PM +0100, Richard W.M. Jones wrote:
> > Move the calculation of $uri to the main function (well, inlined
> > there), and out of --run code.
> > 
> > This is largely code motion.  In theory it changes the content of $uri
> > since we now shell quote it after generating it, but this ought not to
> > have any practical effect.
> > ---
> >  server/internal.h |  1 +
> >  server/captive.c  | 41 ++--
> >  server/main.c | 79 +++
> >  3 files changed, 82 insertions(+), 39 deletions(-)
> > 
> 
> > +++ b/server/captive.c
> > @@ -75,45 +75,8 @@ run_command (void)
> >  
> >/* Construct $uri. */
> >fprintf (fp, "uri=");
> > -  switch (service_mode) {
> > -  case SERVICE_MODE_SOCKET_ACTIVATION:
> > -  case SERVICE_MODE_LISTEN_STDIN:
> > -break;  /* can't form a URI, leave it blank */
> > -  case SERVICE_MODE_UNIXSOCKET:
> > -fprintf (fp, "nbd%s+unix://", tls == 2 ? "s" : "");
> > -if (export_name && strcmp (export_name, "") != 0) {
> > -  putc ('/', fp);
> > -  uri_quote (export_name, fp);
> > -}
> > -fprintf (fp, "\\?socket=");
> > -uri_quote (unixsocket, fp);
> 
> Beforehand, we were manually shell-quoting the ? in the Unix URI...

The shell quoting here was only marginally useful before this change.
In theory there might be a file in a subdirectory called
'nbd+unix:/Xsocket=' which would match :-)


> > -break;
> > -  case SERVICE_MODE_VSOCK:
> > -/* 1 = VMADDR_CID_LOCAL */
> > -fprintf (fp, "nbd%s+vsock://1", tls == 2 ? "s" : "");
> > -if (port) {
> > -  putc (':', fp);
> > -  shell_quote (port, fp);
> > -}
> > -if (export_name && strcmp (export_name, "") != 0) {
> > -  putc ('/', fp);
> > -  uri_quote (export_name, fp);
> > -}
> > -break;
> > -  case SERVICE_MODE_TCPIP:
> > -fprintf (fp, "nbd%s://localhost", tls == 2 ? "s" : "");
> > -if (port) {
> > -  putc (':', fp);
> > -  shell_quote (port, fp);
> > -}
> > -if (export_name && strcmp (export_name, "") != 0) {
> > -  putc ('/', fp);
> > -  uri_quote (export_name, fp);
> > -}
> > -break;
> > -  default:
> > -abort ();
> > -  }
> > +  if (uri)
> > +shell_quote (uri, fp);
> 
> ...while here, we shell-quote the entire string...

Right, and '?' is not listed as a "safe char" so it should be quoted:

https://gitlab.com/nbdkit/nbdkit/-/blob/ff3c9eb0e2afb24def80950cbfc963c14b037ba5/common/utils/quote.c#L54

> >putc ('\n', fp);
> >  
> >/* Since nbdkit 1.24, $nbd is a synonym for $uri. */
> > diff --git a/server/main.c b/server/main.c
> > index 2a332bfdd..54eb348ba 100644
> > --- a/server/main.c
> 
> > +static char *
> > +make_uri (void)
> 
> > +
> > +  switch (service_mode) {
> > +  case SERVICE_MODE_UNIXSOCKET:
> > +fprintf (fp, "nbd%s+unix://", tls == 2 ? "s" : "");
> > +if (export_name && strcmp (export_name, "") != 0) {
> > +  putc ('/', fp);
> > +  uri_quote (export_name, fp);
> > +}
> > +fprintf (fp, "?socket=");
> > +uri_quote (unixsocket, fp);
> 
> ...where the manual shell-quoting is no longer injected.  Yes, this
> looks correct (the appearance of the quoting, using '' instead of \,
> may be different, but the resulting string as parsed by the shell is
> the same).
> 
> > +break;
> > +  case SERVICE_MODE_VSOCK:
> > +/* 1 = VMADDR_CID_LOCAL */
> > +fprintf (fp, "nbd%s+vsock://1", tls == 2 ? "s" : "");
> > +if (port) {
> > +  putc (':', fp);
> > +  fputs (port, fp);
> > +}
> > +if (export_name && strcmp (export_name, "") != 0) {
> > +  putc ('/', fp);
> > +  uri_quote (export_name, fp);
> > +}
> > +break;
> > +  case SERVICE_MODE_TCPIP:
> > +fprintf (fp, "nbd%s://localhost", tls == 2 ? "s" : "");
> > +if (port) {
> > +  putc (':', fp);
> > +  fputs (port, fp);
> > +}
> > +if (export_name && strcmp (export_name, "") != 0) {
> > +  putc ('/', fp);
> > +  uri_quote (export_name, fp);
> > +}
> > +break;
> > +
> > +  case SERVICE_MODE_SOCKET_ACTIVATION:
> > +  case SERVICE_MODE_LISTEN_STDIN:
> > +abort ();   /* see above */
> > +  default:
> > +abort ();
> 
> Could consolidate these labels, although I don't know if a compiler
> would be picky about:
> 
>   case ...:
> /* comment */
>   default:
> abort ();
> 
> so I'm also fine leaving it as-is.
> 
> Reviewed-by: Eric Blake 

Thanks,

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
___
Libguestfs mailing list
Libguestfs@redhat.com

Re: [Libguestfs] [PATCH nbdkit 05/10] server: Add the NBD URI to debug output

2023-09-11 Thread Eric Blake
On Sat, Sep 09, 2023 at 02:57:53PM +0100, Richard W.M. Jones wrote:
> Example after applying this patch:
> 
>   $ ./nbdkit -fv --port  -e foo null 1M
>   /home/rjones/d/nbdkit/server/nbdkit -f -v --port= -e foo -- 
> /home/rjones/d/nbdkit/plugins/null/.libs/nbdkit-null-plugin.so 1M
>   nbdkit: debug: nbdkit 1.35.12
>   nbdkit: debug: TLS disabled: could not load TLS certificates
>   nbdkit: debug: NBD URI: nbd://localhost:/foo
> 
> An alternative I considered was adding a --print-uri option which
> would print the URI on stdout.  Maybe we could do this as an
> alternative later.  Normally the server does not print anything on
> stdout, and it is problematic in some modes, like when using -s.

Yeah, we'd have to print to stderr, even though it is informative.  I
don't think we'll need a --print-uri option in the short term, but as
you mention, it's always something we can add later if need arises.

> ---
>  server/main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/server/main.c b/server/main.c
> index 54eb348ba..0c9019d94 100644
> --- a/server/main.c
> +++ b/server/main.c
> @@ -637,6 +637,8 @@ main (int argc, char *argv[])
> * Note this may be NULL.
> */
>uri = make_uri ();
> +  if (uri)
> +debug ("NBD URI: %s", uri);

Reviewed-by: Eric Blake 

Do we also want to output a debug statement when a URI is not
possible, such as under -s?

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 04/10] server: Calculate $uri in one place

2023-09-11 Thread Eric Blake
On Sat, Sep 09, 2023 at 02:57:52PM +0100, Richard W.M. Jones wrote:
> Move the calculation of $uri to the main function (well, inlined
> there), and out of --run code.
> 
> This is largely code motion.  In theory it changes the content of $uri
> since we now shell quote it after generating it, but this ought not to
> have any practical effect.
> ---
>  server/internal.h |  1 +
>  server/captive.c  | 41 ++--
>  server/main.c | 79 +++
>  3 files changed, 82 insertions(+), 39 deletions(-)
> 

> +++ b/server/captive.c
> @@ -75,45 +75,8 @@ run_command (void)
>  
>/* Construct $uri. */
>fprintf (fp, "uri=");
> -  switch (service_mode) {
> -  case SERVICE_MODE_SOCKET_ACTIVATION:
> -  case SERVICE_MODE_LISTEN_STDIN:
> -break;  /* can't form a URI, leave it blank */
> -  case SERVICE_MODE_UNIXSOCKET:
> -fprintf (fp, "nbd%s+unix://", tls == 2 ? "s" : "");
> -if (export_name && strcmp (export_name, "") != 0) {
> -  putc ('/', fp);
> -  uri_quote (export_name, fp);
> -}
> -fprintf (fp, "\\?socket=");
> -uri_quote (unixsocket, fp);

Beforehand, we were manually shell-quoting the ? in the Unix URI...

> -break;
> -  case SERVICE_MODE_VSOCK:
> -/* 1 = VMADDR_CID_LOCAL */
> -fprintf (fp, "nbd%s+vsock://1", tls == 2 ? "s" : "");
> -if (port) {
> -  putc (':', fp);
> -  shell_quote (port, fp);
> -}
> -if (export_name && strcmp (export_name, "") != 0) {
> -  putc ('/', fp);
> -  uri_quote (export_name, fp);
> -}
> -break;
> -  case SERVICE_MODE_TCPIP:
> -fprintf (fp, "nbd%s://localhost", tls == 2 ? "s" : "");
> -if (port) {
> -  putc (':', fp);
> -  shell_quote (port, fp);
> -}
> -if (export_name && strcmp (export_name, "") != 0) {
> -  putc ('/', fp);
> -  uri_quote (export_name, fp);
> -}
> -break;
> -  default:
> -abort ();
> -  }
> +  if (uri)
> +shell_quote (uri, fp);

...while here, we shell-quote the entire string...

>putc ('\n', fp);
>  
>/* Since nbdkit 1.24, $nbd is a synonym for $uri. */
> diff --git a/server/main.c b/server/main.c
> index 2a332bfdd..54eb348ba 100644
> --- a/server/main.c

> +static char *
> +make_uri (void)

> +
> +  switch (service_mode) {
> +  case SERVICE_MODE_UNIXSOCKET:
> +fprintf (fp, "nbd%s+unix://", tls == 2 ? "s" : "");
> +if (export_name && strcmp (export_name, "") != 0) {
> +  putc ('/', fp);
> +  uri_quote (export_name, fp);
> +}
> +fprintf (fp, "?socket=");
> +uri_quote (unixsocket, fp);

...where the manual shell-quoting is no longer injected.  Yes, this
looks correct (the appearance of the quoting, using '' instead of \,
may be different, but the resulting string as parsed by the shell is
the same).

> +break;
> +  case SERVICE_MODE_VSOCK:
> +/* 1 = VMADDR_CID_LOCAL */
> +fprintf (fp, "nbd%s+vsock://1", tls == 2 ? "s" : "");
> +if (port) {
> +  putc (':', fp);
> +  fputs (port, fp);
> +}
> +if (export_name && strcmp (export_name, "") != 0) {
> +  putc ('/', fp);
> +  uri_quote (export_name, fp);
> +}
> +break;
> +  case SERVICE_MODE_TCPIP:
> +fprintf (fp, "nbd%s://localhost", tls == 2 ? "s" : "");
> +if (port) {
> +  putc (':', fp);
> +  fputs (port, fp);
> +}
> +if (export_name && strcmp (export_name, "") != 0) {
> +  putc ('/', fp);
> +  uri_quote (export_name, fp);
> +}
> +break;
> +
> +  case SERVICE_MODE_SOCKET_ACTIVATION:
> +  case SERVICE_MODE_LISTEN_STDIN:
> +abort ();   /* see above */
> +  default:
> +abort ();

Could consolidate these labels, although I don't know if a compiler
would be picky about:

  case ...:
/* comment */
  default:
abort ();

so I'm also fine leaving it as-is.

Reviewed-by: Eric Blake 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 03/10] server: Don't set port as a side effect

2023-09-11 Thread Eric Blake
On Sat, Sep 09, 2023 at 02:57:51PM +0100, Richard W.M. Jones wrote:
> This removes another long-range code dependency.
> ---
>  server/sockets.c | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 

Reviewed-by: Eric Blake 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 00/10] Make --run imply -U -

2023-09-11 Thread Richard W.M. Jones
On Mon, Sep 11, 2023 at 08:18:04AM -0500, Eric Blake wrote:
> On Mon, Sep 11, 2023 at 01:11:46PM +0100, Richard W.M. Jones wrote:
> > On Mon, Sep 11, 2023 at 07:08:48AM -0500, Eric Blake wrote:
> > > On Sat, Sep 09, 2023 at 02:57:48PM +0100, Richard W.M. Jones wrote:
> > > > Should have done this a long time ago.  I feel it is about time we
> > > > change the default of nbdkit --run to imply -U -, rather than opening
> > > > a public port.
> > > > 
> > > > Patch series turned out to be a little bit more complicated than I
> > > > anticipated, but it contains some nice clean ups.
> > > 
> > > Indeed, just from the summary it sounds like a good idea.  nbdkit can
> > > take advantage of it immediately, but libnbd will need to continue to
> > > explicitly use -U - for a while longer (as long as older nbdkit tends
> > > to be the version still installed on various CI platforms).
> > 
> > Although it might not be useful for libnbd, we could also had a
> > --dump-config sentinel, something like:
> > 
> >   $ nbdkit --dump-config
> >   ...
> >   run_default_socket=Unix
> > 
> > (and add run_default_socket=TCP to older branches).  If you can think
> > of a better name for this ... :-)
> 
> That actually sounds good as-is.  I don't know if backporting a patch
> to expose run_default_socket=TCP makes a difference (after all, the
> absence of run_default_socket= in the config output serves the same
> purpose), but I'll leave that up to your call.

Something like the attached patch.  It leaves it open whether
we add the sentinel to older versions or not.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
>From 75dad8e87c50c6c4cb3f2f882ed9a6fe25177bb1 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" 
Date: Mon, 11 Sep 2023 14:06:03 +0100
Subject: [PATCH] server: Add --dump-config run_default_socket=Unix sentinel

In builds where --run implies -U - you will now see:

$ nbdkit --dump-config
...
run_default_socket=Unix

This is absent or has a different value in older versions of nbdkit.
---
 server/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/server/main.c b/server/main.c
index 978a720cf..3a429fa46 100644
--- a/server/main.c
+++ b/server/main.c
@@ -190,6 +190,7 @@ dump_config (void)
   printf ("%s=%s\n", "name", PACKAGE_NAME);
   printf ("%s=%s\n", "plugindir", plugindir);
   printf ("%s=%s\n", "root_tls_certificates_dir", root_tls_certificates_dir);
+  printf ("%s=%s\n", "run_default_socket", "Unix");
   printf ("%s=%s\n", "sbindir", sbindir);
 #ifdef HAVE_LIBSELINUX
   printf ("selinux=yes\n");
-- 
2.41.0

___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [PATCH nbdkit 02/10] server: Don't set export_name as a side effect of using --run

2023-09-11 Thread Eric Blake
On Sat, Sep 09, 2023 at 02:57:50PM +0100, Richard W.M. Jones wrote:
> Reduce long-range code dependencies by not setting export_name in
> run_command (--run functionality), especially as this function is not
> always called.
> 
> If the -e option was not used at all then export_name will be NULL.
> ---
>  server/captive.c | 12 +---
>  1 file changed, 5 insertions(+), 7 deletions(-)

Reviewed-by: Eric Blake 

For other reviewers, remember that -e only impacts $uri during --run
(it is still up to the plugin whether the client must connect to a
particular export name, and the client's choice is not forced by -e).

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 01/10] server: Introduce service_mode concept

2023-09-11 Thread Eric Blake
On Sat, Sep 09, 2023 at 02:57:49PM +0100, Richard W.M. Jones wrote:
> Previously there were two places where similiar-ish logic was used to
> decide if we are going to serve over a socket activation, -s, Unix
> socket, AF_VSOCK or TCP/IP.  Let's abstract that into a service_mode.
> 
> One place where we did this was when calculating the $uri variable for
> --run.  This change adjusts and fixes this calculation (revealed as I
> made the above change).  In particular if --port was not set then the
> $uri would contain fairly bogus values in some cases:
> 
>   $ nbdkit --vsock null 1M --run 'echo $uri ; nbdinfo $uri'
>   nbd
>   nbdinfo: nbd_connect_uri: NBD URI does not have a scheme: valid NBD URIs 
> should start with a scheme like nbd://, nbds:// or nbd+unix://: Invalid 
> argument
> 
> (note uri='nbd')
> 
> After this commit:
> 
>   $ nbdkit --vsock null 1M --run 'echo $uri ; nbdinfo $uri'
>   nbd+vsock://1
>   protocol: newstyle-fixed without TLS, using structured packets
>   export="":
>   export-size: 1048576 (1M)
>   content: data
>   uri: nbd+vsock://1:10809/
>   ...

Nice.

> ---
>  server/internal.h | 11 +++
>  server/captive.c  | 56 ---
>  server/main.c | 75 ++-
>  3 files changed, 91 insertions(+), 51 deletions(-)
> 

Reviewed-by: Eric Blake 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 00/10] Make --run imply -U -

2023-09-11 Thread Eric Blake
On Mon, Sep 11, 2023 at 01:11:46PM +0100, Richard W.M. Jones wrote:
> On Mon, Sep 11, 2023 at 07:08:48AM -0500, Eric Blake wrote:
> > On Sat, Sep 09, 2023 at 02:57:48PM +0100, Richard W.M. Jones wrote:
> > > Should have done this a long time ago.  I feel it is about time we
> > > change the default of nbdkit --run to imply -U -, rather than opening
> > > a public port.
> > > 
> > > Patch series turned out to be a little bit more complicated than I
> > > anticipated, but it contains some nice clean ups.
> > 
> > Indeed, just from the summary it sounds like a good idea.  nbdkit can
> > take advantage of it immediately, but libnbd will need to continue to
> > explicitly use -U - for a while longer (as long as older nbdkit tends
> > to be the version still installed on various CI platforms).
> 
> Although it might not be useful for libnbd, we could also had a
> --dump-config sentinel, something like:
> 
>   $ nbdkit --dump-config
>   ...
>   run_default_socket=Unix
> 
> (and add run_default_socket=TCP to older branches).  If you can think
> of a better name for this ... :-)

That actually sounds good as-is.  I don't know if backporting a patch
to expose run_default_socket=TCP makes a difference (after all, the
absence of run_default_socket= in the config output serves the same
purpose), but I'll leave that up to your call.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] Fwd: virt-v2v creating image that does not install guest agent on first boot

2023-09-11 Thread Richard W.M. Jones
On Sun, Sep 10, 2023 at 11:34:22AM +0100, Richard W.M. Jones wrote:
> This message got caught in moderation because the attachment
> was large.  I put the attachment here:
> 
> http://oirase.annexia.org/tmp/2023-lgarrett-virt-v2v-debug-output.txt
> 
> - Forwarded message from Lee Garrett  -
> 
> Date: Sun, 10 Sep 2023 00:09:17 +0200
> From: Lee Garrett 
> To: libguestfs@redhat.com
> Subject: virt-v2v creating image that does not install guest agent on first
>  boot
> 
> Hi,
> 
> rwmjones from #guestfs on libera IRC pointed me to this mail address.
> 
> I've noticed that converting the latest Windows 11 trial image via
> virt-v2v does not install the guest agent any more on first boot. I
> have let the machine settle for ~10 minutes to ensure it's not just
> because I'm too impatient. I can see C:\qemu-ga-x86-64.msi, and also a
> bunch of files in  "C:\Program Files\Guestfs\Firstboot\" and
> .\Scripts, so the files are definitely copied onto the VM image, just
> not executed for some reason.

I can see from the log that these are installed in the image.

> The vmware image was downloaded from 
> https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/.
> The issue should be 100% reproducible (at least for me). I recall that
> an older image from two, three weeks ago downloaded from the same
> location did not have this issue. There guest agent was installed and
> working on the first boot. Unfortunately I overwrote the image so I
> cannot verify this.
> 
> I have attached the debug output of the virt-v2v run of the latest
> image where this issue is apparent (guest agent not being installed).
> 
> Please let me know if there's anything else I can check, or if you
> need any further info.

The main thing to look for is any debugging output which should appear
in c:\program files\guestfs\firstboot\log.txt

It would be interesting to know if this file is present at all, and
what exactly it contains.

I've CC'd my colleague Ming on this to see if she has noticed anything
with recent Windows 11.

Rich.

> Cheers,
> Lee
> 
> - End forwarded message -
> 
> -- 
> Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
> Read my programming and virtualization blog: http://rwmj.wordpress.com
> libguestfs lets you edit virtual machines.  Supports shell scripting,
> bindings from many languages.  http://libguestfs.org
> ___
> Libguestfs mailing list
> Libguestfs@redhat.com
> https://listman.redhat.com/mailman/listinfo/libguestfs

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [EXTERNAL] - Re: LIBGUESTFS supported version

2023-09-11 Thread Richard W.M. Jones
On Mon, Sep 11, 2023 at 12:18:21PM +, Teja Konapalli wrote:
> Hi ,
>
> Yes, was mounting one disk using libguestfs version 1.38 but the
> disk filesystem type is unknown, can't it be possible to mount
> unknown filesystem type disk?

This might not be related to the version of libguestfs, since
libguestfs uses your host kernel and host utilities to access the disk
(running them in a VM).  What exact "unknown filesystem" type was it?

Rich.

> Thanks
> Teja K
> 
> -Original Message-
> From: Richard W.M. Jones  
> Sent: Wednesday, September 6, 2023 4:50 PM
> To: Teja Konapalli 
> Cc: libguestfs@redhat.com
> Subject: [EXTERNAL] - Re: [Libguestfs] LIBGUESTFS supported version
> 
> CAUTION: This email originated from outside of the organization. Do not click 
> links or open attachments unless you recognize the sender and know the 
> content is safe. If you feel that the email is suspicious, please report it 
> using PhishAlarm.
> 
> 
> On Wed, Sep 06, 2023 at 09:04:17AM +, Teja Konapalli wrote:
> > Am trying to install libguestfs in my redhat 8.2 version default its 
> > installing 1.38.4. Could you please help us with the installation of 
> > version 1.50 libguestfs (through command line in RHEL 8.2) and 
> > supported RHEL versions of 1.50.
> 
> The latest version of libguestfs for RHEL 8 is 1.44.0, but you would have to 
> update to at least RHEL 8.4 (preferably later) to get that.
> 
> libguestfs 1.50 is only available in RHEL 9.
> 
> Is there a specific task you are trying to accomplish?
> 
> Rich.
> 
> --
> Richard Jones, Virtualization Group, Red Hat 
> https://urldefense.com/v3/__http://people.redhat.com/*rjones__;fg!!Obbck6kTJA!Y-zNijcNl5D5cSaJLK5etpMyCrqIEDFmMdfXxFfSw_hfENnkcM7aYnaNOaWTdxPuaUzHUJi7luHZwudwvQ$
> Read my programming and virtualization blog: 
> https://urldefense.com/v3/__http://rwmj.wordpress.com__;!!Obbck6kTJA!Y-zNijcNl5D5cSaJLK5etpMyCrqIEDFmMdfXxFfSw_hfENnkcM7aYnaNOaWTdxPuaUzHUJi7luF4dn9wCQ$
> virt-p2v converts physical machines to virtual machines.  Boot with a live CD 
> or over the network (PXE) and turn machines into KVM guests.
> https://urldefense.com/v3/__http://libguestfs.org/virt-v2v__;!!Obbck6kTJA!Y-zNijcNl5D5cSaJLK5etpMyCrqIEDFmMdfXxFfSw_hfENnkcM7aYnaNOaWTdxPuaUzHUJi7luEIQaD0aw$

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



[Libguestfs] libnbd | Failed pipeline for master | f07d48ff

2023-09-11 Thread GitLab


Pipeline #999620528 has failed!

Project: libnbd ( https://gitlab.com/nbdkit/libnbd )
Branch: master ( https://gitlab.com/nbdkit/libnbd/-/commits/master )

Commit: f07d48ff ( 
https://gitlab.com/nbdkit/libnbd/-/commit/f07d48ff547643bd4cff014b803c609d4ded2dd8
 )
Commit Message: interop: Skip tests on i686 cross-build

CI was...
Commit Author: Eric Blake ( https://gitlab.com/ebblake )


Pipeline #999620528 ( https://gitlab.com/nbdkit/libnbd/-/pipelines/999620528 ) 
triggered by Eric Blake ( https://gitlab.com/ebblake )
had 2 failed jobs.

Job #5058345399 ( https://gitlab.com/nbdkit/libnbd/-/jobs/5058345399/raw )

Stage: builds
Name: x86_64-fedora-rawhide-prebuilt-env
Job #5058345404 ( https://gitlab.com/nbdkit/libnbd/-/jobs/5058345404/raw )

Stage: builds
Name: x86_64-fedora-rawhide-clang-prebuilt-env

-- 
You're receiving this email because of your account on gitlab.com.



___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs


Re: [Libguestfs] [EXTERNAL] - Re: LIBGUESTFS supported version

2023-09-11 Thread Teja Konapalli
Hi ,

Yes, was mounting one disk using libguestfs version 1.38 but the disk 
filesystem type is unknown, can't it be possible to mount unknown filesystem 
type disk?

Thanks
Teja K

-Original Message-
From: Richard W.M. Jones  
Sent: Wednesday, September 6, 2023 4:50 PM
To: Teja Konapalli 
Cc: libguestfs@redhat.com
Subject: [EXTERNAL] - Re: [Libguestfs] LIBGUESTFS supported version

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe. If you feel that the email is suspicious, please report it using 
PhishAlarm.


On Wed, Sep 06, 2023 at 09:04:17AM +, Teja Konapalli wrote:
> Am trying to install libguestfs in my redhat 8.2 version default its 
> installing 1.38.4. Could you please help us with the installation of 
> version 1.50 libguestfs (through command line in RHEL 8.2) and 
> supported RHEL versions of 1.50.

The latest version of libguestfs for RHEL 8 is 1.44.0, but you would have to 
update to at least RHEL 8.4 (preferably later) to get that.

libguestfs 1.50 is only available in RHEL 9.

Is there a specific task you are trying to accomplish?

Rich.

--
Richard Jones, Virtualization Group, Red Hat 
https://urldefense.com/v3/__http://people.redhat.com/*rjones__;fg!!Obbck6kTJA!Y-zNijcNl5D5cSaJLK5etpMyCrqIEDFmMdfXxFfSw_hfENnkcM7aYnaNOaWTdxPuaUzHUJi7luHZwudwvQ$
Read my programming and virtualization blog: 
https://urldefense.com/v3/__http://rwmj.wordpress.com__;!!Obbck6kTJA!Y-zNijcNl5D5cSaJLK5etpMyCrqIEDFmMdfXxFfSw_hfENnkcM7aYnaNOaWTdxPuaUzHUJi7luF4dn9wCQ$
virt-p2v converts physical machines to virtual machines.  Boot with a live CD 
or over the network (PXE) and turn machines into KVM guests.
https://urldefense.com/v3/__http://libguestfs.org/virt-v2v__;!!Obbck6kTJA!Y-zNijcNl5D5cSaJLK5etpMyCrqIEDFmMdfXxFfSw_hfENnkcM7aYnaNOaWTdxPuaUzHUJi7luEIQaD0aw$

___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 00/10] Make --run imply -U -

2023-09-11 Thread Richard W.M. Jones
On Mon, Sep 11, 2023 at 07:08:48AM -0500, Eric Blake wrote:
> On Sat, Sep 09, 2023 at 02:57:48PM +0100, Richard W.M. Jones wrote:
> > Should have done this a long time ago.  I feel it is about time we
> > change the default of nbdkit --run to imply -U -, rather than opening
> > a public port.
> > 
> > Patch series turned out to be a little bit more complicated than I
> > anticipated, but it contains some nice clean ups.
> 
> Indeed, just from the summary it sounds like a good idea.  nbdkit can
> take advantage of it immediately, but libnbd will need to continue to
> explicitly use -U - for a while longer (as long as older nbdkit tends
> to be the version still installed on various CI platforms).

Although it might not be useful for libnbd, we could also had a
--dump-config sentinel, something like:

  $ nbdkit --dump-config
  ...
  run_default_socket=Unix

(and add run_default_socket=TCP to older branches).  If you can think
of a better name for this ... :-)

> > Last patch updating the documentation wouldn't be applied any time
> > soon, so that the old docs stay around on the website.
> 
> Also a good idea.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
nbdkit - Flexible, fast NBD server with plugins
https://gitlab.com/nbdkit/nbdkit
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs



Re: [Libguestfs] [PATCH nbdkit 00/10] Make --run imply -U -

2023-09-11 Thread Eric Blake
On Sat, Sep 09, 2023 at 02:57:48PM +0100, Richard W.M. Jones wrote:
> Should have done this a long time ago.  I feel it is about time we
> change the default of nbdkit --run to imply -U -, rather than opening
> a public port.
> 
> Patch series turned out to be a little bit more complicated than I
> anticipated, but it contains some nice clean ups.

Indeed, just from the summary it sounds like a good idea.  nbdkit can
take advantage of it immediately, but libnbd will need to continue to
explicitly use -U - for a while longer (as long as older nbdkit tends
to be the version still installed on various CI platforms).

> 
> Last patch updating the documentation wouldn't be applied any time
> soon, so that the old docs stay around on the website.

Also a good idea.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
___
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs