Upload AMI to AWS


To upload the AMI to AWS download the image disk.tar.gz and unpack it:

tar jxf disk.tar.gz

Install the CLI tool: http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-clt.pdf#tools-introduction

Create a bucket in us-east (N.Virginia) region named something like us-east-freebsd-ami an then upload the raw by using this command:

ec2-import-volume disk.raw -f raw -z us-east-1a -b us-east-freebsd-ami -o AWS_ACCESS_KEY -w AWS_SECRET_KEY

After finish you can check the task by using:

ec2-describe-conversion-tasks

To upload to another region for example in Europe:

ec2-import-volume disk.raw -f raw --region eu-central-1 -z eu-central-1a -b your-bucket-name -o AWS_ACCESS_KEY -w AWS_SECRET_KEY

Once the volume has been created (task completed) create a snapshot, this can be done from the web interface:

create snapshot

Once the snapshot has been created, create an image:

create image

After creating the image and status is “available” it should be ready to be launched, once the image boot do the proper adjustments based on your needs.

After booting the image, because of the *_firstboot scripts it will reboot once, check that the disk has been resized and in case not re run this:

service zfs_firstboot start

More info about the resize process can be found here: https://fabrik.red/post/zfs-resize

comments powered by Disqus