ec2-bundle-vol
ec2-bundle-vol
-k PRIVATE-KEY -u USER-ID -c EC2-CERT
[-s SIZE] [-d DESTINATION-DIR] [-e
EXLCUDE-DIR-1,EXCLUDE-DIR-2...] [-p AMI-PREFIX] [-v
VOLUME] [--ec2cert PATH]
Create a bundled AMI by taking a snapshot of the local machine's root file system, compressing, encrypting and signing the snapshot.
Status messages indicating the various stages of the bundling process are displayed.
Note | |
---|---|
Note that this tool does not support the common arguments |
Option | Definition | Required? | Example |
---|---|---|---|
-k, --privatekey KEY
|
The path to the user's PEM encoded RSA key file. | Yes | -k pk-HKZYKTAIG2ECMXYIBH3HXV4ZBZQ55CLO.pem |
-c, --cert EC2-CERT
|
The user's PEM encoded RSA public key certificate file. | Yes | -c cert-HKZYKTAIG2ECMXYIBH3HXV4ZBZQ55CLO.pem |
-u, --user USER
|
The user's EC2 user ID (a.k.a. AWS account number). | Yes | -u 123456789 |
-s, --size SIZE
|
The size, in MB (1024 * 1024 bytes), of the image file to create. The maximum size is 10240 MB. Defaults to 10240. | No | -s 2048 |
-d, --destination
DESTINATION
|
The directory in which to create the bundle. Defaults to "/tmp". | No | -d /var/run/my-bundle |
-e, --exclude
DIR1,DIR2,...
|
A list of absolute directory paths to exclude from the bundle operation. Note that it overrides the '--all' parameter. | No | -e /tmp,/home/secret-data |
-p, --prefix PREFIX
|
The filename prefix for bundled AMI files. Defaults to "image". | No | -p my-image-is-special |
-v, --volume VOLUME
|
The absolute path to the mounted volume to create the bundle from. Defaults to "/". | No | -v /mnt/my-customized-ami |
-a, --all
|
Bundle all directories, including those on remotely mounted filesystems. | No | -a |
--ec2cert PATH
|
The path to the EC2 X509 public key certificate. Defaults to "/etc/aes/amiutil/cert-ec2.pem". | No | --ec2cert /etc/aes/amiutil/cert-ec2.pem |
--help
|
Display the help message. | No | --help |
--manual
|
Display the user manual. | No | --manual |
$
ec2-bundle-vol -d /mnt -k pk-HKZYKTAIG2ECMXYIBH3HXV4ZBZQ55CLO.pem -c cert-HKZYKTAIG2ECMXYIBH3HXV4ZBZQ55CLO.pem -u 495219933132
Copying / into the image file /mnt/image.img... Excluding: sys dev/shm proc dev/pts proc/sys/fs/binfmt_misc dev media mnt proc sys tmp/image.img mnt/img-mnt 1+0 records in 1+0 records out mke2fs 1.38 (30-Jun-2005) warning: 256 blocks unused. Splitting /mnt/image.gz.crypt... Created image.part.00 Created image.part.01 Created image.part.02 Created image.part.03 ... Created image.part.22 Created image.part.23 Generating digests for each part... Digests generated. Creating bundle manifest... Bundle Volume complete.