Create instance store image

From CAC Documentation wiki
Jump to: navigation, search

Use the following steps to create a customized image from a running instance.

On a running instance:

  • Customize the installation to your liking.
  • if not previously done, format the local ephemeral disk and mount it
mkfs -t ext3 /dev/vda2 
tune2fs -m 0 /dev/vda2
mount /dev/vda2 /mnt
  • Install euca2ools on the instance.
  • Copy your Red Cloud credentials to the instance and source in your eucarc file.
  • CentOS 6 only: remove /etc/udev/rules.d/70-persistent-net.rules
  • Create a bundle of the root disk: <eki> and <eri> should match those of the current instance's kernel and ramdisk. Note: euca-bundle-vol seems to ignore any single dash options that come after double-dash options....
euca-bundle-vol -e <excluded directories> -d <working directory> -r x86_64 -p <prefix for bundle image files (optional)> --volume / --fstab /etc/fstab --kernel <eki> --ramdisk <eri> --no-inherit
  • Upload the customized image using the following commands:
euca-upload-bundle -b <bucket name> -m <manifest>
  • Register image:
euca-register -a x86_64 <manifest path from the output of the previous command>