[Libguestfs] [PATCH 3/3] p2v: Add a 'make run-virt-p2v' rule which boots virt-p2v in a VM.

Richard W.M. Jones rjones at redhat.com
Thu May 26 17:58:31 UTC 2016


On Thu, May 26, 2016 at 06:01:43PM +0200, Pino Toscano wrote:
> On Thursday 26 May 2016 16:40:16 Richard W.M. Jones wrote:
> > A convenience method instead of having to work out the right
> > qemu command line each time.
> > ---
> >  .gitignore      |  1 +
> >  p2v/Makefile.am | 28 ++++++++++++++++++++++++++++
> >  2 files changed, 29 insertions(+)
> > 
> > diff --git a/.gitignore b/.gitignore
> > index 285b28d..8509a9d 100644
> > --- a/.gitignore
> > +++ b/.gitignore
> > @@ -337,6 +337,7 @@ Makefile.in
> >  /p2v/virt-p2v
> >  /p2v/virt-p2v.1
> >  /p2v/virt-p2v.i686
> > +/p2v/virt-p2v.img
> >  /p2v/virt-p2v-make-disk
> >  /p2v/virt-p2v-make-disk.1
> >  /p2v/virt-p2v-make-kickstart
> > diff --git a/p2v/Makefile.am b/p2v/Makefile.am
> > index f00cae9..01b8ddb 100644
> > --- a/p2v/Makefile.am
> > +++ b/p2v/Makefile.am
> > @@ -45,6 +45,7 @@ CLEANFILES = \
> >  	test-virt-p2v-pxe.initramfs \
> >  	test-virt-p2v-pxe.sshd_config \
> >  	virt-p2v.1 \
> > +	virt-p2v.img \
> >  	virt-p2v-make-disk.1 \
> >  	virt-p2v-make-kickstart.1
> >  
> > @@ -167,6 +168,33 @@ stamp-virt-p2v-make-kickstart.pod: virt-p2v-make-kickstart.pod
> >  	  $<
> >  	touch $@
> >  
> > +# Run virt-p2v locally.
> > +#
> > +# You can run the virt-p2v binary directly, although it's not really
> > +# recommended, but it's OK for quick tests of the GUI (don't try doing
> > +# a conversion).  A better way is to run virt-p2v inside a VM on the
> > +# local machine, which the following rule automates.
> > +
> > +QEMU = qemu-system-$(host_cpu)
> 
> Isn't m4/guestfs_qemu.m4 already exporting a QEMU variable for
> makefiles?

Yes it is.  Looks like we should use that, ie. remove the above line.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list