Pino Toscano
2017-Jan-20 14:00 UTC
[Libguestfs] [PATCH] p2v: log also environment on conversion server
Save the content of the environment on the conversion server, so it is one additional help when debugging failed conversions. --- p2v/conversion.c | 5 +++++ p2v/virt-p2v.pod | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/p2v/conversion.c b/p2v/conversion.c index 3c379cb..b8bab34 100644 --- a/p2v/conversion.c +++ b/p2v/conversion.c @@ -1061,6 +1061,11 @@ generate_wrapper_script (struct config *config, const char *remote_dir, fprintf (fp, "\n"); fprintf (fp, + "# Log the environment where virt-v2v will run.\n"); + fprintf (fp, "printenv > environment\n"); + fprintf (fp, "\n"); + + fprintf (fp, "# Run virt-v2v. Send stdout back to virt-p2v. Send stdout\n" "# and stderr (debugging info) to the log file.\n"); fprintf (fp, "v2v 2>> $log | tee -a $log\n"); diff --git a/p2v/virt-p2v.pod b/p2v/virt-p2v.pod index 075256e..ec8eff2 100644 --- a/p2v/virt-p2v.pod +++ b/p2v/virt-p2v.pod @@ -662,6 +662,12 @@ The dmesg output from the physical machine. Useful for detecting problems such as missing device drivers or firmware on the virt-p2v ISO. +=item F<environment> + +I<(before conversion)> + +The content of the environment where L<virt-v2v(1)> will run. + =item F<lscpu> =item F<lspci> -- 2.9.3
Richard W.M. Jones
2017-Jan-21 14:43 UTC
Re: [Libguestfs] [PATCH] p2v: log also environment on conversion server
On Fri, Jan 20, 2017 at 03:00:05PM +0100, Pino Toscano wrote:> Save the content of the environment on the conversion server, so it is > one additional help when debugging failed conversions. > --- > p2v/conversion.c | 5 +++++ > p2v/virt-p2v.pod | 6 ++++++ > 2 files changed, 11 insertions(+) > > diff --git a/p2v/conversion.c b/p2v/conversion.c > index 3c379cb..b8bab34 100644 > --- a/p2v/conversion.c > +++ b/p2v/conversion.c > @@ -1061,6 +1061,11 @@ generate_wrapper_script (struct config *config, const char *remote_dir, > fprintf (fp, "\n"); > > fprintf (fp, > + "# Log the environment where virt-v2v will run.\n"); > + fprintf (fp, "printenv > environment\n"); > + fprintf (fp, "\n"); > + > + fprintf (fp, > "# Run virt-v2v. Send stdout back to virt-p2v. Send stdout\n" > "# and stderr (debugging info) to the log file.\n"); > fprintf (fp, "v2v 2>> $log | tee -a $log\n"); > diff --git a/p2v/virt-p2v.pod b/p2v/virt-p2v.pod > index 075256e..ec8eff2 100644 > --- a/p2v/virt-p2v.pod > +++ b/p2v/virt-p2v.pod > @@ -662,6 +662,12 @@ The dmesg output from the physical machine. Useful for detecting > problems such as missing device drivers or firmware on the virt-p2v > ISO. > > +=item F<environment> > + > +I<(before conversion)> > + > +The content of the environment where L<virt-v2v(1)> will run. > + > =item F<lscpu> > > =item F<lspci> > -- > 2.9.3Good idea, ACK. Rich. -- 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
Apparently Analagous Threads
- [PATCH 0/3] p2v, v2v: Ensure the full version is always available in several places.
- [PATCH 0/4] p2v: Send ^C to remote end to cancel the conversion.
- [PATCH 0/7] p2v: Multiple improvements to the look of virt-p2v.
- [p2v PATCH 02/11] Introduce "p2v.output.misc" for passing "-oo" options to virt-v2v
- Re: [libguestfs/libguestfs] OpenStack support (#38)