[Libguestfs] [PATCH] p2v: log also environment on conversion server
Richard W.M. Jones
rjones at redhat.com
Sat Jan 21 14:43:26 UTC 2017
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.3
Good 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
More information about the Libguestfs
mailing list