Managing EMIs

From Bashlinux
Revision as of 01:53, 10 June 2015 by Manpaz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Installation

  • Download an Eucalyptus Machine Images (EMI)
 http://emis.eucalyptus.com/
  • Decompress the tarball

How to register a kernel image

euca-bundle-image -i lucid-server-cloudimg-amd64-vmlinuz-virtual --kernel true
  • Note that the xml files are being show in the output at the end of the previous executed command
euca-upload-bundle -b ub10bucket -m /tmp/lucid-server-cloudimg-amd64-vmlinuz-virtual.manifest.xml
euca-register ub10bucket/lucid-server-cloudimg-amd64-vmlinuz-virtual.manifest.xml eki-BABA38BD
  • Save the name of the Image returned by the last command

How to register a ramdisk image

euca-bundle-image -i lucid-server-cloudimg-amd64-loader
euca-upload-bundle -b ub10bucket -m /tmp/lucid-server-cloudimg-amd64-loader.manifest.xml
euca-register ub10bucket/lucid-server-cloudimg-amd64-loader.manifest.xml emi-196D37CF

How to register a disk image

euca-bundle-image -i lucid-server-cloudimg-amd64.img --kernel eki-BABA38BD --ramdisk emi-196D37CF
euca-upload-bundle -b ub10bucket -m /tmp/lucid-server-cloudimg-amd64.img.manifest.xml
euca-register ub10bucket/lucid-server-cloudimg-amd64.img.manifest.xml

How to remove an image

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

How to boot Ubuntu Lucid EMIs

  • Mount the disk image
    • Match /etc/ssh/sshd_config with the config on EC2
    • Add to /etc/init/ssh.conf the proper lines to generate host keys on first boot
  • Umount the image
  • Bundle the kernel as usual but
    • Add the option -r x86_64 to euca-bundle-image
  • Bundle the image as usual but also
    • Add the option "-r x86_64" to euca-bundle-image
    • Using the above kernel
    • Use none on ramdisk option

How to launch instances

  • Running an instance of specific size type
euca-run-instances -k blnxaws -t c1.medium emi-761A3B3


Troubleshooting

Error
RunInstancesType: Not enough resources available: addresses (try --addressing private)
Solution
Do a clean re-start
service eucalyptus-cc cleanstop
sleep 10
service eucalyptus-cc cleanstart

Error
RunInstancesType: Not enough resources (0 in cluster01 < 1): vm instances.
Solution
Ensure there is at least one NC running