Reputation: 1161
I'm trying to create my own AMI based upon a 64-bit Ubuntu 11.10 EBS AMI. However, the commands fails as seen below. I've googled for this specific error and have drawn a blank.
Can someone help here?
$ sudo ec2-bundle-vol -u XXXXXXX -c foo.pem -k bar.pem -d /persistent/ami/2012-02-02-0634/
Please specify a value for arch [x86_64]:
Copying / into the image file /persistent/ami/2012-02-02-0634/image...
Excluding:
/var/www
/sys/kernel/debug
/sys/kernel/security
/sys
/var/log/mysql
/var/lib/mysql
/
/proc
/etc/apache2
/etc/mysql
/sys/fs/fuse/connections
/dev/pts
/dev
/etc/php5
/var/lib/php5
/dev
/media
/mnt
/proc
/sys
/etc/udev/rules.d/70-persistent-net.rules
/etc/udev/rules.d/z25_persistent-net.rules
/persistent/ami/2012-02-02-0634/image
/mnt/img-mnt
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00215727 s, 486 MB/s
mke2fs 1.41.14 (22-Dec-2010)
loop: can't delete device /dev/loop0: No such device or address
ERROR: execution failed: "rsync -rlpgoD -t -r -S -l --exclude /var/www --exclude /sys/kernel/debug --exclude /sys/kernel/security --exclude /sys --exclude /var/log/mysql --exclude /var/lib/mysql --exclude / --exclude /proc --exclude /etc/apache2 --exclude /etc/mysql --exclude /sys/fs/fuse/connections --exclude /dev/pts --exclude /dev --exclude /etc/php5 --exclude /var/lib/php5 --exclude /dev --exclude /media --exclude /mnt --exclude /proc --exclude /sys --exclude /etc/udev/rules.d/70-persistent-net.rules --exclude /etc/udev/rules.d/z25_persistent-net.rules --exclude /persistent/ami/2012-02-02-0634/image --exclude /mnt/img-mnt -X /* /mnt/img-mnt 2>&1 > /dev/null"
Upvotes: 3
Views: 2261
Reputation: 3673
I had the same problem, and the solution was really simple... rsync
was not installed on my machine...
Upvotes: 0
Reputation: 2588
Point here to have an AMI without rebooting/shuting down your instance: https://serverfault.com/questions/324891/how-to-create-an-amazon-ami-from-a-running-ubuntu-instance-without-booting-via
Upvotes: 0
Reputation: 64741
For an Amazon EBS-Backed Instance it is nowadays much simpler (and thus recommended) to facilitate the single dedicated API call ec2-create-image instead of ec2-bundle-vol, which can alternatively and conveniently done via the AWS Management Console as well, as outlined in Creating an Image from a Running Instance - please be aware that by default EC2 attempts to cleanly shut down the instance before image creation and reboots the instance afterwards.
This is obviously generally preferable, however, it can be avoided via the command line indeed, if so desired:
If you prefer the instance not be rebooted, you can use the Amazon EC2 command line tools to create the image [...]. The ec2-create-image command has a --no-reboot option.
Good luck!
Upvotes: 4