Provided by: xen-tools_0.8.5-1_all bug


       xen-duplicate-image - Duplicate an existing Xen instance.


         xen-duplicate-image [options]

         Help Options:
          --help     Show this scripts help information.
          --manual   Read this scripts manual.
          --version  Show the version number and exit.

         General options:
          --boot     Boot the cloned image after creating it.
          --dir      Specify where the output images should go.

         Networking options:
          --dhcp     Setup the image to get its networking details via DHCP
          --gateway  Setup the gateway for the image.
          --ip       Setup the IP address for the image.
          --netmask  Setup the netmask the host should use.

         Mandatory options:

          --hostname Set the images hostname.
          --from     The image name we should copy


       --boot Boot the new instance immediately after creating it.
       --dhcp Specify that the virtual image should use DHCP to obtain its
       networking information.  Conflicts with --ip.
       --gateway Specify the gateway address for the virtual image, only
       useful if DHCP is not used.
       --help Show the brief help information.
       --ip Specify the IP address for the virtual image.  Conflicts with
       --manual Read the manual, with examples.
       --netmask Setup the netmask the host should use.
       --from Specify the virtual instance that we should copy.
       --version Show the version number and exit.


         The following will copy the existing image vm01, and
        save it as vm02 - with DHCP enabled.

            xen-duplicate-image --dir=/home/xen \
               --from=vm01 --dhcp


         xen-duplicate-image is a simple script which allows you to create new
        Xen instances of Debian Sarge.  The new image will be an identical
        copy of an existing image.


         To reduce the length of the command line each of the options may
        be specified inside a configuration file.

         The script will check two files for options:

          1. /etc/xen-tools/xen-tools.conf
          2. ~/.xen-tools.conf

         The files may contain comments, which begin with the hash ’#’ character
        and are otherwise of the format ’key = value.



        $Id: xen-duplicate-image,v 1.16 2006/01/07 23:23:12 steve Exp $


         Contributors to this code:

       Radu Spineanu


       Copyright (c) 2005 by Steve Kemp.  All rights reserved.

       This module is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.  The LICENSE file contains the
       full text of the license.


         Read the configuration file specified.


         Parse the arguments specified upon the command line.


         Check that the arguments the user has specified are complete and
        make sense.


         Setup the /etc/network/interfaces file, and the hostname
        upon the virtual instance.