This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Image Tasks

Image Tasks

An image is the basis for instances that you spin up for your computing needs. This section explains how to create or acquire an image and then add it to your Eucalyptus cloud. There are a few ways you can create or acquire an image for use in a Eucalyptus cloud:

  • Add an image based on an existing image. For more information, see https://www.eucalyptus.cloud/index.html#Images.
  • Add an image that you create from scratch, by installing an operating system into a virtual machine.
  • Migrate an image or an instance from another cloud, such as Amazon Web Services (AWS) or a virtualization platform.

1 - Browse and Download from Eucalyptus

Eucalyptus provides a few prebuilt “starter” images that you can download and install. This is one of the simplest ways to get started with Eucalyptus. Many other organizations, including Linux distributions, publish starter images for use on cloud systems, which can also be installed on Eucalyptus using the steps in this guide.With your Web browser, explore the Eucalyptus Machine Image catalog . Download an image of your choice (we suggest starting with images that have “hvm” as their Virtualization Type, as they are easier to install and work for both Instance Store and EBS-backed instances). Optionally, if the image is compressed (has a .tgz or .gz extension), you will have to uncompress it. If you obtained an HVM image, you now have a raw disk file that can be installed using instructions in the Install an HVM image section. If you obtained a paravirtual image with kernel and ramdisk, you can install them with instructions in the Install a paravirtual image section.

2 - Install an HVM Image

HVM (Hardware-assisted Virtual Machine) images are sequences of raw sectors of a complete bootable disk, including a boot loader and one or more partitions with an operating system. Such images are self-contained and can be booted on hardware that supports virtualization or on a full software emulation of hardware (QEMU).

At run time, HVM images can be deployed to disks local to the hypervisor (so-called Instance Store images) or they can run off of dynamic volumes on EBS (so-called EBS-backed instances or boot-from-EBS instances). This topic covers methods for installing an HVM image into either type of EMI.

Install an HVM image as an Instance Store EMI

Bundle, upload, and register the HVM image. All of this can be accomplished with a single command. For Linux images, the required options are:

euca-install-image -i /path/to/hvm-image -n name-of-the-image -r x86_64 --virtualization-type hvm -b bucket-name-for-image

Install an HVM image as an EBS-Backed EMI

An EBS-backed image (sometimes referred to as a “bfEBS” image) is an image with a root device that is an EBS volume created from an EBS snapshot. An EBS-backed image has a number of advantages (over an Instance Store image), including:

  • Faster boot time
  • Larger volume size limits
  • Changes to the data on the image persist after instance termination

Option A: Install an EBS image with euca-import-vol

With this method, a single command uploads image data into Object Store and triggers a conversion task, which copies the data into an EBS volume. The volume will be the source of the snapshot behind the EBS-backed EMI.Import the HVM image file into Object Storage and then copy it into EBS. For example: euca-import-volume /path/to/hvm-image --format raw --availability-zone AZ-NAME --bucket bucket-for-hvm-image --owner-akid $EC2_ACCESS_KEY --owner-sak $EC2_SECRET_KEY --prefix image-name-prefix --description "textual description"

After the volume data has been uploaded to Object Store, an internal conversion task will copy the data into a new EBS volume. You can query the progress of this task with the following command: euca-describe-conversion-tasks import-vol-fae1e94d Once the task has finished successfully and the volume is available, you can take a snapshot of the volume: euca-create-snapshot <volume-id> You can now register the snapshot: euca-register --name <image-name> --snapshot <snapshot-id> --root-device-name <device> You’ve now created a EBS-backed image. To maintain data persistence, be sure to use euca-stop-instances and euca-start-instances to stop and start your EBS-backed instance.

Option B: Install an EBS image with euca-import-instance

With this method, a single command uploads image data into the Object Store and triggers a conversion task; this conversion task copies the data into an EBS volumetakes a snapshot of the volume, registers the snapshot as an EMI, and deploys the EMI as an instance.Turn an HVM image into a running EBS instance with a single command:

euca-import-instance /root/paravirtualimage/ubuntuJune06.img --format raw --architecture x86_64 --platform Linux --availability-zone EDU --bucket import_instance --owner-akid $EC2_ACCESS_KEY --owner-sak $EC2_SECRET_KEY --prefix eduii --description "import instance" --key admin --instance-type m1.smallAfter the volume data has been uploaded to Object Store, an internal conversion task will copy the data into a new EBS volume. You can query the progress of this task with the following command: euca-describe-conversion-tasks import-i-b393f3f6 Once the conversion task has finished successfully, you should see a running instance. You may log into that instance if you specified an SSH key. To maintain data persistence, be sure to use euca-stop-instances and euca-start-instances to stop and start your EBS-backed instance.

Option C: Install an EBS image using a helper instance

This is a more manual method for installing an HVM image into an EBS-backed EMI. Instead of importing the image data into an EBS volume directly, a helper instance is used to copy data from the image file into the volume. The helper instance can be either an instance store or an EBS-backed instance, and can be deleted when finished. The volume will be the source of the snapshot behind the EBS-backed EMI.Create and launch a help instance. Create a volume big enough to hold the bootable image file: euca-create-volume -z <cluster_name> -s <size_in_GB> Attach the volume to the helper instance: euca-attach-volume <volume-id> -i <instance-id> -d <device> Log in to the instance and copy the bootable image to the attached volume by performing one of the following steps: If the bootable image is saved in an http or ftp repository, use curl or wget to download the .img file to the attached volume. For example: curl <path_to_bootable_image> > <device>

If the bootable image is from a source other than an http or FTP repository, copy the bootable image from its source to the helper instance, and then copy it to the attached volume using the dd command. For example: dd if=<path_to_bootable_image> of=<device> bs=1M

Detach the volume from the instance: euca-detach-volume <volume-id> Create a snapshot of the volume: euca-create-snapshot <volume-id> Register the snapshot: euca-register --name <image-name> --snapshot <snapshot-id> --root-device-name <device> You’ve now created a EBS-backed image. To maintain data persistence, be sure to use euca-stop-instances and euca-start-instances to stop and start your EBS-backed instance.

3 - Create an HVM Image

Create an HVM Image

This section covers how to create a new image for use in your Eucalyptus cloud.

3.1 - Create an HVM Image from a Linux Distribution ISO (KVM)

This topic shows how to install a Linux distribution ISO and prepare an image for registration with Eucalyptus.Use the QEMU disk utility to create a disk image. In the following example, we create a 5GB disk image: qemu-img create -f raw centos7.img 5G Use the parted utility to set the disk label. parted centos7.img mklabel msdos Use virt-install to start a new virtual machine installation, as in the following example (note the example has been broken into multiple lines for formatting purposes):

virt-install --name centos7 --ram 1024 --os-type linux --os-variant rhel7 
 -c /tmp/CentOS-7.0-x86_64-bin-DVD1.iso --disk path=/tmp/centos7.img,device=disk,bus=virtio 
 --graphics vnc,listen=0.0.0.0 --force 

Use the VNC client of your choice to connect to the new virtual machine and complete the installation. Modify the following libvirt.xml template to create the VM and run virsh create <libvirt.xml>" .

 <domain type='kvm'>
    <name>eucalyptus-centos</name>
    <os>
        <type>hvm</type>
    </os>
    <features>
        <acpi/>
    </features>
    <memory>1073741</memory>
    <vcpu>1</vcpu>
    <devices>
        <!--<emulator>/usr/bin/kvm</emulator>-->
        <disk type='file'>
            <source file='/tmp/centos7.img'/>
            <target dev='hda'/>
        </disk>
     <interface type='bridge'>
         <source bridge='br0'/>
         <model type='virtio'/>
     </interface>
        <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
    </devices>
</domain>

Connect to the virtual machine using your VNC client of choice and make the following configuration changes: Modify the /etc/sysconfig/network-scripts/ifcfg-eth0 file and set the ONBOOT option to “yes”. For example:

DEVICE="eth0"
BOOTPROTO="dhcp"
#HWADDR="B8:AC:6F:83:1C:45"
IPV6INIT="yes"
MTU="1500"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="499c07cc-4a53-408c-87d2-ce0db991648e"
PERSISTENT_DHCLIENT=1

Enable a serial console on the virtual machine by adding the following option to the end of the /boot/grub/menu.lst: console=ttyS0 Remove the quiet option from the kernel parameters and the grub menu splash image in the /boot/grub/menu.lst file. For example:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda2
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
#splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Eucalyptus (n.n.32-358.18.1.el7.x86_64)
	root (hd0,0)
	kernel /vmlinuz-n.n.32-358.18.1.el7.x86_64 ro root=UUID=062b9c31-95f3-424f-8b47-35107cfdfc08 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb
	initrd /initramfs-n.n.32-358.18.1.el7.x86_64.img

Add the following line to the /etc/sysconfig/network file to disable the zeroconf route, which can interfere with access to the metadata service: NOZEROCONF=yes Edit the /etc/udev/rules.d/70-persistent-net.rules file and remove all entries for the existing network interface. Make sure that you delete all entries before terminating the virtual machine and registering it with Eucalyptus. Eucalyptus instances use cloud-init to specify actions to run on your instance at boot time, which can be passed using the userdata parameter. To install and configure cloud-init on your instance: Install cloud-init:

# rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# yum install cloud-init

By default, cloud-init uses ec2-user as the log-in user. Add ec2-user to your instance and give it appropriate sudo permissions:

 # adduser ec2-user
 # passwd ec2-user

Run visudo and add the following entries at the bottom of the sudoers file:

## Allow root to run any commands anywhere
     root    ALL=(ALL)       ALL 
     ec2-user        ALL=(ALL)       NOPASSWD: ALL  

You can optionally copy Eucalyptus rc.local file (available at ) to the /etc directory on your virtual machine and modify it as needed. You now have a raw disk file that can be installed using instructions in the Install an HVM image section.

4 - Migrate an Image

Migrate an Image

This section covers migrating images to and from your Eucalyptus cloud.

4.1 - Create an Image from an Existing EBS-Backed Instance

A common way to create a new image is to customize an existing instance. This topic describes how to create a new image by modifying an existing EBS-backed instance.This example shows how to create a new EBS-backed Eucalyptus image based on an existing EBS-backed Eucalyptus instance.

Log on to an existing Eucalyptus EBS-backed instance and customize the instance. Prepare the image. See for instructions. Create a new image based on the image you just modified by using the eucalyptus-create-image command, specifying a name, a description, and the instance ID of the Eucalyptus instance you customized in the previous step. For example: euca-create-image -n "mynewimage" -d "This is my new custom recycled image" i-1ABCDEFF This command will show the ID of the new machine image and exit immediately. In the background, Eucalyptus will begin the process of creating a new image based on the instance you supplied.

You can monitor the status of the image using the euca-describe-images command, supplying the ID of the image returned from the euca-create-image command. For example:

euca-describe-images i-e12398ab

4.2 - Create an Image from an Existing Instance-Store Instance

A common way to create a new image is to customize an existing instance.This example shows how to create a new instance store Eucalyptus image based on an existing instance store Eucalyptus instance. This topic describes how to create a new image by modifying an existing instance-store instance.

Log on to an existing Eucalyptus instance-store instance and customize the instance. See Prepare a Linux Image for Eucalyptus for instructions on required changes the instance needs before re-bundling. Create a new image based on the image you just modified by using the euca-bundle-instance command, specifying a name, a description, and the instance ID of the Eucalyptus instance you customized in the previous step. For example:

euca-bundle-instance -b mybundle -p mycentos6 -o $EC2_ACCESS_KEY -w $EC2_SECRET_KEY i-96154365
BUNDLE     bun-96154365     i-96154365     mybundle     mycentos     62013-11-05T21:37:23.469Z2013-11-05T21:37:23.469Z     pending     0

This command will the bundle task ID and exit immediately. In the background, Eucalyptus will begin the bundling process. Depending on the size of the instance, it can take several minutes for the bundling task to complete.

You can monitor the status of the bundle task using the euca-describe-bundle-tasks command, supplying the ID of the image returned from the eucalyptus-bundle-instance command. For example:

euca-describe-bundle-tasks
BUNDLE     bun-96154365     i-96154365     mybundle     mycentos6     2013-11-05T21:37:23.469Z2013-11-05T21:37:58.446Z     storing     0

Once the bundle task is complete, you can register thebundle as an instance-store image using the euca-register command, specifying the path to the bundle manifest in the format [bucket]/[prefix].manifest.xml .

euca-register --virtualization-type=hvm mybundle/mycentos6.manifest.xml. Your new image is now ready for use in your Eucalyptus cloud.

4.3 - Prepare a Linux System for Eucalyptus

This section explains how to prepare a running Linux system (cloud instance, virtual machine, or a system running on bare metal) before importing it for use in Eucalyptus.Install cloud software and drivers: Make sure Virtio drivers are installed if the image is going to be run in a KVM cluster which has virtio enabled, and verify use if possible (ie. set disks and network interface in hypervisor, try hot plug in for disks, etc). For most recent Linux distributions nothing is needed to be done. Make sure appropriate init scripts are in place; for example: cloud-init packages (if appropriate), and rc.local or similar scripts to prepare new instances at boot time utilizing user/meta-data.

Install cloud-init:

For Red Hat Enterprise Linux, and CentOS 7:

yum install cloud-init

Install and configure ssh: For Red Hat and CentOS:

yum install openssh-server
systemctl enable sshd.service

Install Euca2ools: For Red Hat and CentOS:

yum install euca2ools

Optionally, update existing packages. For RHEL and CentOS:

yum update

Prepare the network: Disable the firewall. It is recommended that the firewall is disabled and network rules are instead enforced in the security-group the instances run in. If the guest’s firewall is not disabled, review the existing rules and make sure they are appropriate for the guest’s future use within a cloud environment. Clear or disable iptable rules: Save the rules in case you want to restore them later:

sudo iptables-save > /root/firewall.rules

Clear the rules:

iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

For RHEL and CentOS 7, see the Red Hat Migration and Planning Guide Security and Access Control section .

Make sure there is only a single primary network interface. Check the configuration for:

  • Enabled on boot (ONBOOT=“yes”)
  • IP provisioning is done via DHCP (BOOTPROTO=“dhcp”)
  • MAC address is commented out (for example: #HWADDR=“AA:BB:CC:DD:EE:FF”)

For RHEL and CentOS images, the configuration for the default network interface can usually be found in the following file:

/etc/sysconfig/network-scripts/ifcfg-eth0

The following is an example of an ifcfg-eth0 configuration file:

DEVICE=eth0
ONBOOT=yes
#THE HWADDR LINE MUST BE COMMENTED OUT OR REMOVED
#HWADDR=AA:BB:CC:DD:EE:FF
TYPE=Ethernet
BOOTPROTO=dhcp
PERSISTENT_DHCLIENT=yes

Remove persistent udev rules:

echo "" > /etc/udev/rules.d/70-persistent-net.rules 
echo "" > /lib/udev/rules.d/75-persistent-net-generator.rules 

On CentOS and RHEL, disable zeroconf by adding an entry to the /etc/sysconfig/network file:

NETWORKING=yes
NOZEROCONF=yes

Clean the image: We recommend that you remove all non-root, non-administrator users before bundling the image. Remove root/Administrator password. We recommend that you remove root’s password for Linux systems.

Remove any unwanted programs. Configure a serial port by adding an option to the end of the /boot/grub/menu.lst file: console=ttyS0 You’ve now prepared your instance for image creation.

4.4 - Migrate a Linux Image from AWS to Eucalyptus

You can migrate an S3-backed image from AWS to Eucalyptus.

Set up your Euca2ools configuration to work with both Eucalyptus and Amazon Web Services. Check ownership of the AMI that you want to migrate to Eucalyptus by using the euca-describe-images command. For example:

euca-describe-images --region us-east-1 --owner 999999999999
IMAGE	ami-e1a1e888	999999999999/precise-test	999999999999	available	private		x86_64	machine	aki-88aa75e1			instance-store	paravirtual	xen
	BLOCKDEVICEMAPPING	EPHEMERAL	sda2	ephemeral0

Run the AWS instance.

euca-run-instance ami-e1a1e888 --region us-east-1 

Install Euca2ools on the instance. For instructions, see the Euca2ools Guide. Make sure that you have enough space on a volume to hold the bundle that we will create. Bundle the running AWS instance. For example:

sudo -s
ec2-bundle-vol -b testbucket -d /mnt -u 4299-4227-3585 -k my-aws.pem -c my-aws-cert.pem -r x86_64 -s 2048
Copying / into the image file /mnt/image...
Excluding:
	 /dev/pts
	 /
	 /sys
	 /proc
	 /proc/sys/fs/binfmt_misc
	 /dev
	 /media
	 /mnt
	 /proc
	 /sys
	 /mnt/image
	 /mnt/img-mnt
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00209056 s, 502 MB/s
mke2fs 1.42.3 (14-May-2012)
Bundling image file...
Splitting /mnt/image.tar.gz.enc...
Created image.part.00
Created image.part.01
[example truncated]
Created image.part.30
Generating digests for each part...
Digests generated.
Unable to read instance meta-data for ancestor-ami-ids
Unable to read instance meta-data for ramdisk-id
Unable to read instance meta-data for product-codes
Creating bundle manifest...
ec2-bundle-vol complete.

Switch the Euca2ools configuration file to use Eucalyptus. You can do this by specifying the Eucalyptus region as defined in your Euca2ools configuration file by specifying the --region parameter on the command line, or by changing the default-region option in the Euca2ools configuration file:

default-region = euca-release

Download the bundle from the AWS S3 bucket:

euca-download-bundle --bucket testbucket --directory /tmp/aws-image/ --region us-east-1

Unbundle the AWS instance bundle:

euca-unbundle --manifest /tmp/aws-image/image.manifest.xml --source /tmp/aws-image/ --destination /tmp/aws-image/ --region us-east-1

Run some checks to make sure that the image can be used with Eucalyptus: Mount the image via loopback:

#  sudo mkdir /mnt/aws-image
	#  sudo mount -o loop /tmp/aws-image/image /mnt/aws-image
	#  df -ah 
	……
	/tmp/aws-image/image
                      9.9G  1.1G  8.3G  12% /mnt/aws-image

Make sure that the distro repositories in the image do not point to EC2-specific repositories. TODO: Need an actual example here. Install a non-Xen kernel into the image from distro and make sure VirtIO modules are added. TODO: Need an actual example here. Extract the ramdisk and kernel to be bundled, uploaded and registered as ERI and EKI files. In this example, initrd.img-3.2.0-53-virtual and vmlinuz-3.2.0-53-virtual will be copied from /mnt/aws-image/boot to the /tmp/aws-image directory:

# sudo cp /mnt/aws-image/boot/initrd.img-3.2.0-53-virtual /tmp/aws-image/.
# sudo cp /mnt/aws-image/boot/vmlinuz-3.2.0-53-virtual /tmp/aws-image/.

Make sure that the file system of the image is either ext2, ext3, or ext4 by using the file command. For example:

# file /tmp/aws-image/image
/tmp/aws-image/image: Linux rev 1.0 ext4 filesystem data (extents) (large files) (huge files)

Bundle the image using euca-bundle-image:

euca-bundle-image -i /tmp/aws-image/image

Upload the AWS bundled instance to Eucalyptus.

euca-upload-bundle -b hybrid-guide-sample-bucket -m /tmp/aws-image/image.manifest.xml --access-key myaccesskey --secret-key mysecretkey

Test the new uploaded image.

euca-run-instance emi-a6e15bcf

4.5 - Migrate a Linux Image from Eucalyptus to AWS

This topic describes how to migrate an image from Eucalyptus to AWS.

Run an instance from the image you chose.

euca-run-instance emi-1A6338AE

SSH into the instance and verify that the instance is valid for use with AWS: Download the latest ec2-modules from and put them into the /lib/modules directory on the instance. Copy the AWS EC2 certificate and private key from the AWS instance to your local workstation. Shut down unneeded services on the AWS instance (for example, Apache and MySQL). Clear out log files and bash history files. Remove your ssh keys from the instance. Reset passwords for the instance, and for any services that maintain their own password database. Clear out any temporary directories. Install Euca2ools on the instance.

Mount a volume that is at least 1.5 times as large as the entire instance. Bundle the running instance.

euca-bundle-instance 

Switch the Euca2ools configuration file to use Eucalyptus

default-region = euca-release

Upload the AWS bundled instance to Eucalyptus.

euca-upload-bundle -b bucket_name -m manifest_file

Test the new uploaded image.

euca-run-instance emi-a6e15bcf

5 - Install a paravirtual image

Install a paravirtual image

Once you’ve customized or acquired a paravirtual image to use with Eucalyptus, you can enable the image as an executable entity with the following steps:

  1. Unless a suitable kernel is already registered, bundle the kernel, upload it to Object Storage, and register it as a new EKI.
  2. Unless a suitable ramdisk is already registered, bundle the ramdisk, upload it to Object Storage, and register it as a new ERI
  3. Bundle the root disk image, which must be a Linux partition, requesting the kernel and ramdisk that you desire, upload the bundle to Object Storage, and register it as a new EMI.

Once you have an image that meets your needs, perform the tasks listed in this section to add the image to your cloud.

5.1 - Add a Kernel

When you add a kernel to Walrus, you bundle the kernel file, upload the file to a bucket in Walrus that you name, and then register the kernel with Eucalyptus.

To add a kernel to Walrus:

Use the following three commands:

euca-bundle-image -i <kernel_file> --kernel true --arch <architecture>
euca-upload-bundle -b <kernel_bucket> -m /tmp/<kernel_file>.manifest.xml
euca-register <kernel_bucket>/<kernel_file>.manifest.xml -a x86_64 -n mynewkernel

For example:

euca-bundle-image -i euca-fedora-10-x86_64/xen-kernel/vmlinuz-2.6.27.21-0.1-xen --kernel true --arch x86_64
...
Generating manifest /tmp/vmlinuz-2.6.27.21-0.1-xen.manifest.xml

euca-upload-bundle -b example_kernel_bucket -m /tmp/vmlinuz-2.6.27.21-0.1-xen.manifest.xml
...
Uploaded image as example_kernel_bucket/vmlinuz-2.6.27.21-0.1-xen.manifest.xml

euca-register example_kernel_bucket/vmlinuz-2.6.27.21-0.1-xen.manifest.xml -a x86_64 -n mynewkernel
IMAGE	eki-XXXXXXXX

Where the returned value eki-XXXXXXXX is the unique ID of the registered kernel image.

5.2 - Add a Ramdisk

When you add a ramdisk to Walrus, you bundle the ramdisk file, upload the file to a bucket in Walrus that you name, and then register the ramdisk with Eucalyptus.

To add a ramdisk to Walrus:

Use the following three commands:

euca-bundle-image -i <ramdisk_file> --ramdisk true -r x86_64
euca-upload-bundle -b <ramdisk_bucket> -m /tmp/<ramdisk_file>.manifest.xml
euca-register <ramdisk_bucket>/<ramdisk_file>.manifest.xml -n <name_of_ramdisk>

For example:

euca-bundle-image -i euca-fedora-10-x86_64/xen-kernel/initrd-2.6.27.21-0.1-xen 
--ramdisk true -r x86_64
...
Generating manifest /tmp/initrd-2.6.27.21-0.1-xen.manifest.xml

euca-upload-bundle -b example_rd_bucket -m /tmp/initrd-2.6.27.21-0.1-xen.manifest.xml
...
Uploaded image as example_rd_bucket/initrd-2.6.27.21-0.1-xen.manifest.xm

euca-register example_rd_bucket/initrd-2.6.27.21-0.1-xen.manifest.xml -n mynewramdisk
IMAGE	eri-XXXXXXXX 

Where the returned value eri-XXXXXXXX is the unique ID of the registered ramdisk image.

5.3 - Add a Root Filesystem

When you add a root filesystem to Walrus, you bundle the root filesystem file, upload the file to a bucket in Walrus that you name, and then register the root filesystem with Eucalyptus. The bundle operation can include a registered ramdisk (ERI ID) and a registered kernel (EKI ID). The resulting image will associate the three images.

You can also bundle the root file system independently and associate the ramdisk and kernel with the resulting EMI at run time.

To add a root filesystem to Walrus:

Use the following three commands:

euca-bundle-image -i <root_filesystem_file> -r <architecture>
euca-upload-bundle -b <root_filesystem_file_bucket> -m /tmp/<root_filesystem_file>.manifest.xml
euca-register <root_filesystem_file_bucket>/<root_filesystem_file>.manifest.xml -n <rootfs_name> -a <architecture>

For example:

euca-bundle-image -i euca-fedora-10-x86_64/fedora.10.x86-64.img  --ramdisk eri-722B3CBA --kernel eki-5B3D3859 -r x86_64
...
Generating manifest /tmp/fedora.10.x86-64.img.manifest.xml

euca-upload-bundle -b example_rf_bucket -m /tmp/fedora.10.x86-64.img.manifest.xml
...
Generating manifest /tmp/fedora.10.x86-64.img.manifest.xml

euca-register example_rf_bucket/fedora.10.x86-64.img.manifest.xml -n example_rf -a x86_64
IMAGE	 emi-XXXXXXXX

Where the returned value emi-XXXXXXXX is the unique ID of the registered machine image.

6 - Remove an Image

When a new image is uploaded to Eucalyptus, Eucalyptus saves the bundle and the image manifest to a bucket in Walrus. This bucket is stored in the Walrus directory that is defined in the Eucalyptus property walrusbackend.storageDir . The default value for this property is /var/lib/eucalyptus/bukkits .

When you register an image, Eucalyptus creates the actual image file. Both the image manifest and the bundle must remain intact to run as an instance.

To delete an image fully, you must deregister the image and delete the bundle. To successfully remove an image and associated bundle files:

Find the image you want to remove.

euca-describe-images 
IMAGE   emi-E533392E    alpha/centos.5-3.x86-64.img.manifest.xml    965590394582
available   public   i386    machine eki-345135C9    eri-C4F135BC  instance-store
IMAGE   emi-623C38B0  alpha/ubuntu.9-04.x86-64.img.manifest.xml   965590394582 
available   public   i386    machine eki-E6B13926    eri-94DB3AB9  instance-store

Note the image file name (for example, emi-623C38B0). Deregister the image.

euca-deregister emi-623C38B0
IMAGE   emi-623C38B0

Delete the bundle.

euca-delete-bundle -b alpha -p ubuntu.9-04.x86-64.img

When you have finished these steps, display all images to confirm that the image was removed.

euca-describe-images 
IMAGE   emi-E533392E    alpha/centos.5-3.x86-64.img.manifest.xml    965590394582
available   public   i386    machine eki-345135C9    eri-C4F135BC  instance-store