Managing images in Eucalyptus is generally done by Euca2ools distributed by Eucalyptus team.
All users may upload and register images (depending on access granted to them by the Eucalyptus administrator), but only the admin user may ever upload/register kernels or ramdisks.
Now source the ‘eucarc’ from you ~/.euca directory if you haven’t.
Registering kernel image Execute the following commands to bundle and register the kernel image (vmlinuz-2.6.35-22-server)
shaon@client:~$ euca-bundle-image -i vmlinuz-2.6.32-28-generic --kernel true shoan@client:~$ euca-upload-bundle -b mybucket -m /tmp/vmlinuz-2.6.32-28-generic.manifest.xml shaon@client:~$ euca-register mybucket/vmlinuz-2.6.32-28 generic.manifest.xml
Save the output produced by the last command above (eki-XXXXXXXX), which will be needed while registering the disk image.
Registering ramdisk image Execute the following commands to bundle and register the ramdisk image (initrd.img-2.6.35-22-server)
shaon@client:~$ euca-bundle-image -i initrd.img-2.6.32-28-generic --ramdisk true shaon@client:~$ euca-upload-bundle -b mybucket -m /tmp/initrd.img-2.6.32-28-generic.manifest.xml shaon@client:~$ euca−register mybucket/initrd.img−2.6.35−22−server.manifest.xml
Save the output produced by the last command above (eri-XXXXXXXX), which will be needed while registering the disk image.
Registering disk image Execute the following commands to bundle and register the ramdisk image ( imagefinal .img)
shaon@client:~$ euca-bundle-image -i imagefinal.img --kernel eki-XXXXXXXX --ramdisk eri-XXXXXXXX shaon@client:~$ euca-upload-bundle -b mybucket -m /tmp/imagefinal.img.manifest.xml shaon@client:~$ euca-register mybucket/imagefinal.img.manifest.xml
Replace eki-XXXXXXXX and eri-XXXXXXXX with the exact values you have saved earlier.
To see the the uploaded images
shaon@client:~$ euca-describe-images IMAGE eki-7A8D1340 mybucket/vmlinuz-2.6.32-28-generic.manifest.xml admin available public x86_64kernel instance-store IMAGE eri-B603142C mybucket/initrd.img-2.6.32-28-generic.manifest.xml admin available public x86_64 ramdisk instance-store IMAGE emi-CF6C10B0 mybucket/imagefinal.img.manifest.xml admin available public x86_64 machine eki-7A8D1340 eri-B603142C instance-store
Running a custom image
Add a new key-pair to run a new instance with the key.
shaon@client:~$ cd ~/.euca/ shaon@client:~/.euca$ euca-add-keypair jssecacerts > jssecacerts.priv shaon@client:~/.euca$ chmod 600 jssecacerts.priv shaon@client:~/.euca$ euca-describe-keypairs
Now run instance with the following command
shaon@client:~/.euca$ euca-run-instances emi-CF6C10B0 -k jssecacerts -t c1.medium
Instance Security
# Check group detail shaon@client:~/.euca$ euca-describe-groups # Add new group shaon@client:~/.euca$ euca-add-group -d "Web Servers" webservers # Add tcp and icmp permission to the webservers group shaon@client:~/.euca$ euca-authorize -P tcp -s 0.0.0.0/0 webservers shaon@client:~/.euca$ euca-authorize -P icmp -s 0.0.0.0/0 webservers shaon@client:~/.euca$ euca-authorize -P tcp -s 0.0.0.0/0 default shaon@client:~/.euca$ euca-authorize -P icmp -s 0.0.0.0/0 default shaon@client:~/.euca$ euca-authorize -P tcp -p 80 default
Tadaa!!



