[Libguestfs] [PATCH v2 15/17] v2v: add --in-place mode
Richard W.M. Jones
rjones at redhat.com
Thu Aug 27 15:08:43 UTC 2015
On Tue, Aug 11, 2015 at 08:00:34PM +0300, Roman Kagan wrote:
> + let overlays =
> + if not in_place then create_overlays source.s_disks
> + else [] in
> + let targets =
> + if not in_place then init_targets overlays source output output_format
> + else [] in
This doesn't solve the problem I raised before which is that overlays
and targets should never be empty lists.
I think really what should be happening here is something like this:
(1) Create extra modules:
common.ml - for common functions shared; patches 1-14 will end up
moving a lot of functions into this file
copying.ml - for copying conversion (ie. what virt-v2v does now)
in_place.ml - for in-place conversion
(2) v2v.ml calls out to either Copying or In_place -- see how
virt-sparsify works.
in_place.ml would not need to have overlays & targets at all,
hence the issue above goes away.
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
More information about the Libguestfs
mailing list