For most images, including all of those referenced on emis.eucalyptus.com, this is a fairly straightforward process. Once you have downloaded an image, just perform the following steps:
Decompress the image, if necessary. The Fedora image, for instance, needs to be decompressed using xunzip/xz
Convert the image to RAW format, if necessary. If your image ends in .img or .qcow2, it is likely in QCow2 format and needs to be converted using qemu-img from qemu-utils:
qemu-img convert -0 raw disk.img disk.raw
Add the raw disk image using kpartx:
kpartx -a -v disk.raw
Mount the first partition of the disk image:
mount /dev/mapper/loop0p1 /mnt
chroot into the mounted volume:
chroot /mnt
Once inside the chroot, you may update and/or add any software you need. For Debian/Ubuntu images, you might want to run apt-get update followed by apt-get upgrade to ensure the latest versions of system packages in the image. For Fedora/CentOS images, run yum upgrade. Once finished with your changes, exit the chroot environment:
exit
umount /mnt
You should now have an updated image ready to push to your Eucalyptus cloud. To do this, simple follow the instructions provided on http://emis.eucalyptus.com.
chroot into the mounted volume:
chroot /mnt
Once inside the chroot, you may update and/or add any software you need. For Debian/Ubuntu images, you might want to run apt-get update followed by apt-get upgrade to ensure the latest versions of system packages in the image. For Fedora/CentOS images, run yum upgrade. Once finished with your changes, exit the chroot environment:
exit
umount /mnt
You should now have an updated image ready to push to your Eucalyptus cloud. To do this, simple follow the instructions provided on http://emis.eucalyptus.com.