[SOLVED] Manage HOST in OpenNebula to Manage EC2 instances - CPU too short

Hi all …

We are deploying EC2 instances through OpenNebula, we already got this but trying to deploy a vast number of VM’s in the same HOST (region of Amazon) the capacity of this HOST in OpenNebula is too short, due that I just can deploy few and micro machines in EC2.

This is the output of my HOST in OpenNebula:

oneadmin@opennebula:~$ onehost list
ID NAME CLUSTER RVM ALLOCATED_CPU ALLOCATED_MEM STAT
1 172.18.10.8 - 6 900 / 2400 (37%) 9G / 31.4G (28%) on
15 eu-west-1 - 1 200 / 300 (66%) 2G / 3G (66%) on

As you can see just 3G the host (eu-west-1 region) has, so few ¿How can I increase that or What can I do?

Thanks in advance

Hi Jorge,

You can define the capacity for each region in the ec2_driver.conf:

The capacity is defined specifying the number of instances per type allowed in the host. Then, the host memory and cpu is calculated using the cpu and memory values of each instance type defined in the bottom of that file.

If you change this value in the next monitoring cycle the capacity of the host will be updated.

Hope this helps

Hi Daniel

Thanks for your answer. Now we have more space in our host : )

  ID NAME            CLUSTER   RVM      ALLOCATED_CPU      ALLOCATED_MEM STAT  
   1 172.18.10.8     -           6   900 / 2400 (37%)   9G / 31.4G (28%) on    
  15 eu-west-1       -           0      0 / 7000 (0%)     0K / 230G (0%) on    
  19 eu-east-1       -           1   200 / 28000 (0%)     2G / 920G (0%) on    
  20 eu-west-2       -           2   400 / 28000 (1%)     4G / 920G (0%) on

Changing the ec2_driver.conf I was able to increase the CPU capacity, ALL IS WORKING, but just one thing to understand and curiosity, I defined my file like this:

proxy_uri:
regions:
    default:
        region_name: us-east-1
        access_key_id: XXXXXXXXXXX
        secret_access_key: XXXXXXXXXXXXXXXXX
        capacity:
            m1.small: 40
            m1.large: 40
            m1.xlarge: 40
      us-east-1:
        region_name: us-west-2
        access_key_id: XXXXXXXXXXXXXXXXXX
        secret_access_key: XXXXXXXXXXXXXXXXXXXXX
        capacity:
            m1.small: 0
            m1.large: 0
            m1.xlarge: 0
       eu-west-1:
        region_name: eu-west-1
        access_key_id: XXXXXXXXXXXXXXXXXXXXXXXX
        secret_access_key: XXXXXXXXXXXXXXXXXXXXXXX
        capacity:
            m1.small: 10
            m1.large: 10
            m1.xlarge: 10

As you can see was defined different number of instances per type and us-east-1 has 920G and us-west-2 as well, these two has the same CPU assignation ¿How OpenNebula calculates it?

Thanks

If the name of the OpenNebula host does not match any of the regions defined in the ec2_driver.conf it will use the default section.

It looks like host 19 (eu-east-1) and 20 (eu-west-2) are using the same configuration, the default one.

Take care because you are specifying the region_name (us-west-2) for us-east-1.

The region_name attr must match an existing Amazon region and the regions keys have to match the OpenNebula host name:

regions:
    default:
        region_name: us-east-1
        access_key_id: XXXXXXXXXXX
        secret_access_key: XXXXXXXXXXXXXXXXX
        capacity:
            m1.small: 40
            m1.large: 40
            m1.xlarge: 40
      us-east-1: # **OpenNebula Host name**
        region_name: us-west-2 # **Amazon Region**
        access_key_id: XXXXXXXXXXXXXXXXXX
        secret_access_key: XXXXXXXXXXXXXXXXXXXXX
        capacity:
            m1.small: 0
            m1.large: 0
            m1.xlarge: 0

Thanks for the explanation … I gonna take care of this !!!

Greetings