Problem adding a ec2 instance to opennebula 5.4.1

Hello,

I have trouble adding an ec2 instance on my OpenNebula 5.4.1
When I launch the creation through: “onehost create us-east-2c --im ec2 --vm ec2”

I have the followng error:

Command execution fail: /var/lib/one/remotes/im/run_probes ec2 /var/lib/one//datastores 4124 20 28 us-east-2c
Sun Jan 21 23:20:34 2018 [Z0][InM][I]: /usr/lib/one/ruby/ec2_driver.rb:301:in rescue in get_connect_info': HOST: us-east-2c must have ec2 credentials and region in order to work properly (RuntimeError) Sun Jan 21 23:20:34 2018 [Z0][InM][I]: from /usr/lib/one/ruby/ec2_driver.rb:297:inget_connect_info’
Sun Jan 21 23:20:34 2018 [Z0][InM][I]: from /usr/lib/one/ruby/ec2_driver.rb:251:in initialize' Sun Jan 21 23:20:34 2018 [Z0][InM][I]: from ./poll:33:innew’
Sun Jan 21 23:20:34 2018 [Z0][InM][I]: from ./poll:33:in `'
Sun Jan 21 23:20:34 2018 [Z0][InM][E]: Error executing poll
Sun Jan 21 23:20:34 2018 [Z0][InM][I]: ExitCode: 1
Sun Jan 21 23:20:34 2018 [Z0][ONE][E]: Error monitoring Host us-east-2c (28): Error executing poll

/etc/one/ec2_driver.conf:

proxy_uri:
state_wait_timeout_seconds: 300
regions:
default:
region_name: us-east-2c
access_key_id: AKIAJ*********************
secret_access_key: 0eyM4HF92FL************************
capacity:
m1.small: 5
m1.large: 0
m1.xlarge: 0
t2.micro: 5
us-east-2c:
region_name: us-east-2c
access_key_id: AKIAJ*********************
secret_access_key: 0eyM4HF92FL************************
capacity:
m1.small: 5
m1.large: 0
m1.xlarge: 0

My OpenNebula is running on:

root@server2:/home/joss# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.9 (jessie)
Release: 8.9
Codename: jessie

Thank you for your help.

I just solved my problem.
I hope, it can help some people.

(I changed my Access Key ID and secret, because of a tiny mistake in the previous post)

I created a template file in my home directory:

EC2_ACCESS = ""
EC2_SECRET = "
**"
REGION_NAME = "eu-west-1"
CAPACITY = [
T2_MICRO = “3”,
M1_LARGE = “0” ]

Then I used the command:

onehost create ec2 -t ec2 ec2.template --im ec2 --vm ec2.

It appear “ON” in OpenNebula-Sunstone.

You are correct!

The auth method for EC2 was changed since 5.4

You can read more info regarding cloud bursting here:

http://docs.opennebula.org/5.4/advanced_components/cloud_bursting/ec2g.html