[one-users] econe-describe-images command in ON 4.4

Daniel Molina dmolina at opennebula.org
Thu Feb 6 02:12:37 PST 2014


On 5 February 2014 21:05, Hyun Woo Kim <hyunwoo at fnal.gov> wrote:

>  Hi Daniel,
>
>  Let me ask another question.
>
>  Looks like we have to use one template create command now,
> i.e. /etc/one/ec2query_templates/m1.small.erb is not enough.
>

Yes, this is the new way of specifying instance type, it allows you to use
restricted attributes that the user couldn't use otherwise and share
different instance types among different user using the opennebula
permissions. You can still use the old file based templates changing the
use_file_templates var in econe.conf. But I recommend using the new system.

http://docs.opennebula.org/stable/advanced_administration/public_cloud/ec2qcg.html#configuration


>
>  So, I did
>  vi /tmp/m1.small with the following contents
> NAME              = "m1.small"
> EC2_INSTANCE_TYPE = "m1.small"
> CPU    = 1
> MEMORY = 1024
> DISK = [ IMAGE_ID   = <%= erb_vm_info[:img_id] %> ]
> NIC=[ NETWORK_ID=0,  MODEL = virtio]
>
>
>  And then
> onetemplate create /tmp/m1.small
>
>  but I am getting
> [TemplateAllocate] Error allocating a new virtual machine template. Parse
> error: syntax error, unexpected EQUAL, expecting COMMA or CBRACKET at line
> 6, columns 114:116
>
>  Looks like
> DISK = [ IMAGE_ID   = <%= erb_vm_info[:img_id] %> ]
> is not understood.
>
>  When I create a template without DISK = [ IMAGE_ID   = <%=
> erb_vm_info[:img_id] %> ] line,
> I can create a template, but without DISK attribute, how is the ami that a
> user is using in econe-run-instances
> passed to the template??
>

The template should not contain the DISK since it will be generated by the
econe-server using the information provided by the user, same for the user
data and keypairs. You can check the code here:
https://github.com/OpenNebula/one/blob/master/src/cloud/ec2/lib/instance.rb#L151


>
>  Now, even with this incomplete template, I am getting the following
> error message when I do
>
>  econe-run-instances -U http://fermicloud122.fnal.gov:4567/ -K hwkim -S
> 5baa6 ami-00000008
>
>  econe-run-instances: Unexpected server error. response.body is:
> <Response><RequestId/><Errors><Error><Code>InvalidInstanceAttributeValue.NotFound</Code><Message>InvalidInstanceAttributeValue.NotFound
> m1.small</Message></Error></Errors></Response>
>

Could you check that the template is available for the hwkim user and that
it contains the EC2_INSTANCE_TYPE = "m1.small" tag?


>
>  I am following the following links to configure and use EC2 in ON4.4
>
>
> http://docs.opennebula.org/stable/advanced_administration/public_cloud/ec2qug.html
>
> http://docs.opennebula.org/stable/advanced_administration/public_cloud/ec2qcg.html
>
>  My impression is that these guides are a bit not complete to follow.
> Could you guide me to a right direction?
>
>  Thank you!
> HyunWoo
>
>


-- 
--
Daniel Molina
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org | dmolina at opennebula.org | @OpenNebula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140206/bf2e3b65/attachment-0002.htm>


More information about the Users mailing list