[one-users] Running EC2 Instances in two different regions

Hendrik Wißmann wissmann at gmx.de
Thu Mar 22 06:57:30 PDT 2012


Hello,

my goal is to run two regions as vmhosts in opennebula. My first step 
was to create
two different monitor and driver sections:

IM_MAD = [
       name       = "im_ec2_us-east",
       executable = "one_im_ec2",
       arguments  = "im_ec2/im_ec2_us-east.conf" ]

IM_MAD = [
       name       = "im_ec2_eu",
       executable = "one_im_ec2",
       arguments  = "im_ec2/im_ec2_eu.conf" ]


VM_MAD = [
     name       = "vmm_ec2-us-east",
     executable = "one_vmm_ec2",
     arguments  = "-u https://us-east-1.ec2.amazonaws.com 
vmm_ec2/vmm_ec2_us-east.conf",
     type       = "xml" ]

VM_MAD = [
     name       = "vmm_ec2-eu",
     executable = "one_vmm_ec2",
     arguments  = "-u https://eu-west-1.ec2.amazonaws.com 
vmm_ec2/vmm_ec2_eu.conf",
     type       = "xml" ]


To differentiate the regions I chose two small instances in us-east and 
one small
instance in eu and of course two ec2-keys in 
(vmm_ec2_us-east.conf,vmm_ec2_eu.conf)

onehost create ec2-us-east im_ec2_us-east vmm_ec2-us-east tm_dummy dummy
onehost create ec2-eu im_ec2_eu vmm_ec2-eu tm_dummy dummy


The first strange thing is, that there was no resource overview, as 
available with the standard
configuration:

[oneadmin at centos-1 ~]$ onehost list
   ID NAME               RVM   TCPU   FCPU   ACPU   TMEM   FMEM   AMEM   
STAT
   28 ec2-us-east          0      0      0    100     0K     0K     
0K     on
   30 ec2-eu               0      0      0    100     0K     0K     
0K     on

The instantiation of the template
EC2=[
   AMI=ami-a977bec0,
   AUTHORIZED_PORTS=22,
   CLOUD=ec2-us-east,
   INSTANCETYPE=m1.small,
   NAME=EC2-InstanceStore ]

results in the error:
Thu Mar 22 14:32:36 2012 [VMM][I]: Command execution fail: 
/var/lib/one/ec2/ec2-api-tools-1.5.2.5/bin/ec2-run-instances 
ami-a977bec0 -k WissmannEU -t m1.small
Thu Mar 22 14:32:36 2012 [VMM][I]: Client.InvalidAMIID.NotFound: The AMI 
ID 'ami-a977bec0' does not exist

The first thing is, that the ami is available in us-east and the second 
thing is, that the command
execution used the wrong default key. I suppose opennebula is using the 
last added vmhost. After
deleting vmhost 30 everything is fine, except the resource overview.

What I am doing wrong? Can anybody please help me?

Thank you Hendrik


More information about the Users mailing list