How to Delete Images

Follow
Affected Versions: [3.x]

Best practices for removing images from within Eucalyptus 
 

Solution

Images are stored in the eucalyptus property walrus.storagedir. The images are made up of two principal part

  • Bundle
  • Image

When a new image is uploaded, the manifest and bundle are saved to a bucket in Walrus.
The Registration of this image creates an image file.
Both components must remain intact to run as an instance.

To delete an image fully, it requires the deregistration of the image and deletion of the bundle.

 

To Delete an Image and associated bundle files
 

The correct way to delete images and bundles is to:

  • Display the images
  • Record the image file name (i.e. emi-XXXX)
  • Deregister the image to disable it
  • Deregister the image a second time to delete the image and remove it from the list
  • Delete the bundle
  • Display the images and confirm that the image has been removed


Example:

[root@Pod-01]# 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


[root@Pod-01]# euca-deregister emi-623C38B0

IMAGE   emi-623C38B0
 

[root@Pod-01]# euca-delete-bundle -b alpha -p ubuntu.9-04.x86-64.img

 

[root@Pod-01]# euca-deregister emi-623C38B0

IMAGE   emi-623C38B0 
 

[root@Pod-01]# 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

 

Note

Upon trying the delete bundle a second time, you may encounter the following error message. This error will only occur if you attempt to delete a bundle that no longer exists.


[root@Pod-01 ~]euca-delete-bundle -b rootfs_bucket -p centos.5-3.x86-64.img 
problem parsing: /tmp/centos.5-3.x86-64.img.manifest.xml

Have more questions? Submit a request

Comments

Powered by Zendesk