man xen-duplicate-image (Administration système) - Duplicate an existing Xen instance.
NAME
xen-duplicate-image - Duplicate an existing Xen instance.
SYNOPSIS
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
OPTIONS
- --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 --dhcp.
- --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.
EXAMPLES
The following will copy the existing image vm01, and save it as vm02 - with DHCP enabled.
xen-duplicate-image --dir=/home/xen \ --from=vm01 --hostname=vm02.my.flat --dhcp
DESCRIPTION
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.
CONFIGURATION
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.
AUTHOR
Steve -- http://www.steve.org.uk/
$Id: xen-duplicate-image,v 1.16 2006/01/07 23:23:12 steve Exp $
CONTRIBUTORS
Contributors to this code:
- Radu Spineanu
LICENSE
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.
readConfigurationFile
Read the configuration file specified.
parseCommandLineArguments
Parse the arguments specified upon the command line.
checkArguments
Check that the arguments the user has specified are complete and make sense.
setupNetworking
Setup the /etc/network/interfaces file, and the hostname upon the virtual instance.