[one-users] Managing VMs on EC2 with OpenNebula 3.4

Dario Garcia Gasulla dariog at lsi.upc.edu
Fri May 11 01:26:00 PDT 2012


Hi there,


> Daniel Molina
> Mon, 07 May 2012 06:09:30 -0700
>
> Hi André,
>
>>  On 7 May 2012 12:39, André Monteiro <andremonte... at ua.pt> wrote:
> >
>>  Hello everyone,
> >
> > I'me trying configure my EC2 account with my OpenNebula 3.4, but so
far I
> > didn't succeed. Some of the instructions on
> > http://opennebula.org/documentation:rel3.4:ec2g are not up to date,
i.e.
> > creating the ec2 host is described as "$ onehost create ec2 im_ec2
vmm_ec2
> > tm_dummy" but in 3.4 the transfer manager is not used. All my EC2
> > configuration data and variables are ok and double-checked, I can
manage
> > images with the ec2-api-tools.
>
>
> Fixed, thanks for the feedback
>
> >
> >
> > When creating a new image from a basic template,
> >
> > EC2=[
> >   AMI="ami-77770a91e",
> >   AUTHORIZED_PORTS="22",
> >   INSTANCETYPE="t1.micro",
> >   KEYPAIR="aws_hpc" ]
> > NAME="EC2_MICRO"
> > REQUIREMENTS="HOSTNAME='ec2'"
> >
> >
> > I get this in the log:
> >
> > Fri May  4 18:00:38 2012 [DiM][I]: New VM state is ACTIVE.
> > Fri May  4 18:00:38 2012 [LCM][I]: New VM state is PROLOG.
> > Fri May  4 18:00:38 2012 [VM][I]: Virtual Machine has no context
> > Fri May  4 18:00:38 2012 [LCM][I]: New VM state is BOOT
> > Fri May  4 18:00:38 2012 [VMM][E]: deploy_action, error getting
driver vmm_ec2
> > Fri May  4 18:00:38 2012 [DiM][I]: New VM state is FAILED
> >
> > Can anyone help me?
> > My vmm_ec2.conf is
> >
> > <TEMPLATE>
> >    <EC2>
> >      <KEYPAIR>aws_hpc</KEYPAIR>
> >      <AUTHORIZEDPORTS>22</AUTHORIZEDPORTS>
> >      <INSTANCETYPE>t1.micro</INSTANCETYPE>
> >    </EC2>
> >  </TEMPLATE>
> >
> > My vmm_ec2rc is
> >
> > EC2_HOME=/home/oneadmin/ec2-api-tools/ec2-api-tools-1.5.2.3/
> > EC2_PRIVATE_KEY=~/.ec2/pk.pem
> > EC2_CERT=~/.ec2/cert.pem
> > EC2_URL=https://ec2.us-east-1.amazonaws.com
> > JAVA_HOME=/usr
> > EC2_JVM_ARGS="-Xms16m -Xmx64m"
> > EC2_JVM_CONCURRENCY=10
> > and my ec2 part on oned.conf is
> >
> > IM_MAD = [
> >       name       = "im_ec2",
> >       executable = "one_im_ec2",
> >       arguments  = "im_ec2/im_ec2.conf",
> >       default  = "im_ec2/im_ec2.conf" ]
> > VM_MAD = [
> >     name       = "vmm_ec2",
> >     executable = "one_vmm_ec2",
> >     arguments  = "-u https://ec2.us-east-1.amazonaws.com -k
> > /home/oneadmin/.ec2/pk.pem -c /home/oneadmin/.ec2/cert.pem -h
> > /home/oneadmin/ec2-api-tools/ec2-api-tools-1.5.2.3
vmm_ec2/vmm_ec2.conf",
> >     type       = "xml" ]
> >
> > Paths are all confirmed more than twice. What am I missing?
> >
>
> The following error is reported by the core when the driver is not
> defined in oned.conf or the driver initialization failed
> Fri May  4 18:00:38 2012 [VMM][E]: deploy_action, error getting driver
vmm_ec2
>
> If you check the first lines of the oned.log, you can see if the
> driver was correctly loaded.
> Mon May  7 05:43:10 2012 [VMM][I]:      Loading driver: vmm_ec2 (XML)
> Mon May  7 05:43:10 2012 [VMM][I]:      Driver vmm_ec2 loaded.
>
> If this is not the case, you can debug it by enabling the
> ONE_MAD_DEBUG level inside the /etc/defaultrc file. Also you can run
> the driver using the following command and write INIT to initialize
> the driver and check if there is any error:
>
> > $ONE_LOCATION/lib/mads/one_vmm_ec2
> INIT
>
> Hope this helps
>

I've got this same problem:

Tue May  8 10:35:14 2012 [VMM][I]: Loading Virtual Machine Manager drivers.
Tue May  8 10:35:14 2012 [VMM][I]:     Loading driver: vmm_ec2 (XML)
Tue May  8 10:35:14 2012 [MAD][E]: MAD did not answer INIT command

I tried doing this:

/usr/lib/one/mads$ ./one_vmm_ec2 INIT

without result, and when checking the logs, the only information I got
from "one_vmm_ec2.log" is this:

/usr/lib/one/mads/one_vmm_ec2.rb:360: syntax error, unexpected ')',
expecting '='
/usr/lib/one/mads/one_vmm_ec2.rb:394: syntax error, unexpected kEND,
expecting $end

I checked both lines in the code and could not figure out what's the
problem.

Any idea what may be the issue here?

Thanks a lot,
Dario.



> --
> Daniel Molina
> Project Engineer
> OpenNebula - The Open Source Solution for Data Center Virtualization
> www.OpenNebula.org | dmol... at opennebula.org | @OpenNebula
>




More information about the Users mailing list