On Wed, Jul 12, 2006 at 02:15:28PM +0200, Clement Hermann (nodens) wrote:

> I see that the xen-duplicate-image support is discontinued upstream.

  Yes.

> However, it would be nice to be able to duplicate images easily (one can
> copy the images or LVM and change the configuration, or archive an
> existing image with tar and use the tar file option of
> xen-create-image), but it means doing several steps for this operation.

  I think that this could be done already without too many steps.

  Stop the source domain, and mount its disk image with something like:

    xm shutdown source.my.flat
    mkdir -p /mnt/src
    mount -o loop /dev/vol/source.my.flat-disk /mnt/src

 Now you can install a new image via:

    xen-create-image --hostname=dest.my.flat --ip=11.22.33.44 
      --copy=/mnt/src --dist=sarge

 The key here is to use the "--copy" installation method, which copies
 a directory recursively instead of using debootstrap/rpmstrap.

 (You might need to copy out "debootstrap=1" from the config file
 otherwise it'llconflict and fail.)

> xen-create-image with the appropriate option could verify that a machine
> is stopped to prevent corruption, and use an existing image or lv as
> source to create a new image with the correct networking configuration.

  I think that the --copy argument does exactly what you want already,
 if it doesn't please elaborate.

  (You might also be interested in the --tar argument which will
 untar a previous tarfile of a disk image instead of using a network
 copy.)

Steve
-- 

Attachment: signature.asc
Description: Digital signature

Reply via email to