diff --git a/bin/xen-create-image b/bin/xen-create-image index 83e341f..4fa028c 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -8,20 +8,145 @@ xen-create-image - Create a new Xen instance =head1 SYNOPSIS - xen-create-image [options] Help Options: + --debug Show useful debugging information. --help Show this scripts help information. --manual Read this scripts manual. --version Show the version number and exit. - Debugging Options: - --verbose Be verbose in our execution. + Size / General options: + --boot Boot the new instance after creating it. + --cache Cache .deb files on the host when using B<--debootstrap> + --force Force overwriting existing images. + --fs Specify the filesystem type to use. + --initrd Specify the initial ramdisk + --kernel Set the path to the kernel to use for dom U. + --memory Setup the amount of memory allocated to the instance. + --passwd Ask for a root password during setup. + --role Run a role-specific script, post-install. + --size Set the size of the primary disk image. + --swap Set the size of the swap partition. + --ide Use IDE names for virtual devices (hda not sda) + + Installation options: + --copy Install the new image by copying from the given directory. + --dist Specify the distribution you wish to install + --debootstrap Use debootstrap to install the distribution B<--dist> + --mirror Setup the mirror to use when installing with B<--debootstrap>. + --rpmstrap Use rpmstrap to install the distribution B<--dist> + --tar Install the new image by untarring the given file. + + Networking options: + --dhcp Setup the image to get an IP address via DHCP + --gateway Setup the iamge's network gateway. + --ip Setup the ip + --netmask Setup the netmask + + Mandatory options: + + --dir Specify where the output images should go. + --lvm Specify the volume group to save images within. + --hostname Set the images hostname. + +=cut + + +=head1 OPTIONS + +=over 8 + +=item B<--boot> +Start the new virtual instance as soon as the installation has finished. + +=item B<--cache> +Cache the .deb files in /var/cache/apt/archives upon the host system when installing a new image with B<--debootstrap> for a large speed improvement. [Defaults to yes.] + +=item B<--copy> +Install a new system by copying files recursively from the given directory. This is significantly faster than using B<--rpmstrap> or B<--debootstrap>, but it does require that you have installed a distribution "slowly" at least once. + +=item B<--debug> +Show the commands this script executes as an aid to debugging. + +=item B<--debootstrap> +Use debootstrap to install the distribution B<--dist>. When specifying B<--debootstrap> you should choose a local mirror with B<--mirror> + +=item B<--dhcp> +Specify that the virtual image should use DHCP to obtain its networking information. Conflicts with B<--ip>. + +=item B<--dir> +Specify the root directory beneath which the image should be saved. Subdirectories will be created for each virtual image. If you do not wish to use loopback files instead specify an LVM volume group with B<--lvm>. + +=item B<--dist> +Specify the distribution to install, defaults to 'sarge'. + +=item B<--force> +Force the script to overwrite any existing swap or disk images. By default existing images will cause the script to abort. + +=item B<--fs> +Specify the filesystem the image should be given. Valid options are 'ext3', +'xfs', or 'reiserfs'. + +=item B<--gateway> +Specify the gateway address for the virtual image, only useful if DHCP is not used. + +=item B<--help> +Show the brief help information. + +=item B<--hostname> +Set the hostname of the new instance. + +=item B<--ide> +Use IDE style device names for the virtual devices. + +=item B<--initrd> +Specify the initial ramdisk. + +=item B<--ip> +Set the IP address for the virtual image. Conflicts with B<--dhcp>. This argument may be specified multiple times to give your new instance multiple IP addresses. + +=item B<--kernel> +Set the path to the kernel to use for the image. + +=item B<--manual> +Read the manual, with examples. + +=item B<--memory> +Specify the amount of memory the virtual image should be allocated. Defaults +to 96Mb. + +=item B<--mirror> +Specify the mirror to use when installing distributions with the debootstrap tool. This defaults to http://ftp.us.debian.org/debian + +=item B<--netmask> +Set the netmask the virtual image should use. + +=item B<--passwd> +Setup a password for the root account of the virtual machine. + +=item B<--size> +Specify the size of the primary drive to give the virtual image. The size may be suffixed with either Mb, or Gb. + +=item B<--swap> +Specify the size of the virtual swap partition to create. The size may be +suffixed with either Mb, or Gb. + +=item B<--tar> +Install a new system by untarring the given file. This is significantly faster than using B<--rpmstrap> or B<--debootstrap>, but it does require that you have installed a distribution "slowly" at least once. + +=item B<--version> +Show the version number and exit. + +=item B<--lvm> +Specify the LVM volume group to store images within. If you wish to use loopback files please specify an output directory with B<--dir>. + +=back =cut =head1 NOTES + =cut @@ -31,7 +156,7 @@ xen-create-image - Create a new Xen instance -- http://www.steve.org.uk/ - $Id: xen-create-image,v 1.15 2006-06-09 20:22:29 steve Exp $ + $Id: xen-create-image,v 1.16 2006-06-09 22:03:14 steve Exp $ =cut @@ -394,7 +519,7 @@ sub parseCommandLineArguments if ( $VERSION ) { - my $REVISION = '$Revision: 1.15 $'; + my $REVISION = '$Revision: 1.16 $'; if ( $REVISION =~ /1.([0-9.]+) / ) {