Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Bundle & upload to Eucalyptus my VM 'from within'
* copy private key & certificate to some directory you do NOT want to distribute those with the VM image. Make sure you do not leve them somewhere else on VM - the whole world will hack you later

cd sudo mkdir /mnt
sudo mkdir eucaKeys
copy /eucaBuild/
* copy there euca2-yourName-e3e764-cert.pem euca2-yourName-e3f64-pk.pem cloud-cert.pem eucars.csh
* set enviromental variables

setenv EUCA_PRIVATE_KEY /mnt/eucaKeys/euca2-yourName-e3f64-pk.pem
setenv EUCA_CERT /mnt/eucaKeys/euca2-yourName-e3f64-pk.pem
?setenv EC2_ACCNO 8455-5-6506
?setenv ACCESS_KEY AKIAJATKNBRIAA
?setenv SECRET_KEY JzeO0SlE8+rjx9sLTX+qG7HU1/37R

by sourcing eucars.csh

* setup working directory for the bundle which will be excluded from the bundle

sudo mkdir /image

* Bundle local VM - wil , will take 1-2 hours ...
sudo ec2euca-bundle-vol -c $EUCA$EC2_CERT -k $EUCA$EC2_PRIVATE_KEY -u $EC2_USER_ID --ec2cert $EUCALYPTUS_CERT -d /image -e /image --no-inherit -r i386
OUTPUT:
....
Part: image.part.245
Part: image.part.246
Part: image.part.247
Generating manifest

* uplad bundle to Eucalyptus with name 'star-vm5-ubuntu-i386', will take many hours depending on connection & total size
> sudo euca-upload-bundle -a $EC2_ACCESS_KEY -s $EC2_SECRET_KEY --url $S3_URL --ec2cert $EUCALYPTUS_CERT -b star-vm5-ubuntu-i386 -m /image/image.manifest.xml
OUTPUT:
....
Uploading part: image.part.246
Uploading part: image.part.247
Uploaded image as star-vm-SL10c-ubuntu-i386/image.manifest.xml

* register 'star-vm5-ubuntu-i386' with Eucalyptus

Code Block

sudo euca-register -a $EC2_ACCESS_KEY -s $EC2_SECRET_KEY  --url $S3_URL  star-vm5-ubuntu-i386

...

USE of existing images : http://magellan.nersc.gov/?page_id=564Image Added

* query existing images:
> euca-describe-images | grep emi | grep -i ubuntu
OUTPUT:
IMAGE emi-39DF160F ubuntu-image-bucket/ubuntu.9-04.x86-64.img.manifest.xml admin available public x86_64 machine

* create key-pair for one Eucalyptus session and launch an instance
> euca-add-keypair balewski-euca > balewski-euca.private
> euca-run-instances -k balewski-euca emi-39DF160F
OUTPUT:
RESERVATION r-470107EF balewski balewski-default
INSTANCE i-31D50646 emi-39DF160F 0.0.0.0 0.0.0.0 pending balewski-euca 2010-10-22T16:05:53.609Z eki-AEC117E0 eri-175C1933