<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On 25 February 2014 16:51, Richard Stevenson <span dir="ltr"><<a href="mailto:richard.stevenson@youview.com" target="_blank">richard.stevenson@youview.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<br>
I'm unable to upload images using econe-upload. I'm using OpenNebula<br>
4.4, installed on Debian 7 from the repositories suggested in the<br>
installation guide. From the local oneadmin account I get the following<br>
error:<br>
<br>
oneadmin@onetest:~$ econe-upload ./ubuntu2.qcow2<br>
/var/lib/gems/1.9.1/gems/curb-<u></u>0.8.5/lib/curl/easy.rb:62:in `perform':<br>
Curl::Err::GotNothingError (Curl::Err::GotNothingError)<br>
    from /usr/lib/one/ruby/cloud/econe/<u></u>EC2QueryClient.rb:254:in `http_post'<br>
    from /usr/lib/one/ruby/cloud/econe/<u></u>EC2QueryClient.rb:254:in<br>
`upload_image'<br>
    from /usr/bin/econe-upload:74:in `block (2 levels) in <main>'<br>
    from /usr/lib/one/ruby/cli/command_<u></u>parser.rb:449:in `call'<br>
    from /usr/lib/one/ruby/cli/command_<u></u>parser.rb:449:in `run'<br>
    from /usr/lib/one/ruby/cli/command_<u></u>parser.rb:76:in `initialize'<br>
    from /usr/bin/econe-upload:44:in `new'<br>
    from /usr/bin/econe-upload:44:in `<main>'<br>
<br>
And with multipart upload, I get a different, but equally inscrutable<br>
error message:<br>
<br>
oneadmin@onetest:~$ econe-upload -m ./ubuntu2.qcow2<br>
/usr/lib/one/ruby/cloud/econe/<u></u>EC2QueryClient.rb:284:in `upload_image':<br>
undefined method `body' for end of file reached:CloudClient::Error<br>
(NoMethodError)<br>
    from /usr/bin/econe-upload:74:in `block (2 levels) in <main>'<br>
    from /usr/lib/one/ruby/cli/command_<u></u>parser.rb:449:in `call'<br>
    from /usr/lib/one/ruby/cli/command_<u></u>parser.rb:449:in `run'<br>
    from /usr/lib/one/ruby/cli/command_<u></u>parser.rb:76:in `initialize'<br>
    from /usr/bin/econe-upload:44:in `new'<br>
    from /usr/bin/econe-upload:44:in `<main>'<br>
<br></blockquote><div><br></div><div>Could you try changing these lines in <a href="http://docs.opennebula.org/stable/administration/sunstone_gui/sunstone.html#requirements" target="_blank">http://docs.opennebula.org/stable/administration/sunstone_gui/sunstone.html#requirements</a></div>


<div><br></div><div>to </div><div><br></div><div><div>                if !CloudClient.is_error?(res)</div><div>                    return AWS::Response.parse(:xml => res.body)</div><div>                else</div><div>

                    return res</div>
<div>                end</div></div><div><br></div><div>instead of</div><div><br></div><div><div>                if res.code == '200'</div><div>                    return AWS::Response.parse(:xml => res.body)</div>


<div>                else</div><div>                    return CloudClient::Error.new(res.body)</div><div>                end</div></div><div><br></div><div>and check if there is any error in econe and oned logs in /var/log/one</div>


<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Something is working, as both of these commands result in images being<br>
uploaded to the datastore:<br>
<br>
oneadmin@onetest:~$ oneimage list<br>
  ID USER       GROUP      NAME            DATASTORE     SIZE TYPE PER<br>
STAT RVMS<br>
  28 oneadmin   oneadmin   ec2-bae235ce-f8 default         8G OS No<br>
rdy     0<br>
  29 oneadmin   oneadmin   ec2-ef880266-d5 default         8G OS No<br>
rdy     0<br>
<br>
However, without an ami style image ID I'm unable to register the images.<br></blockquote><div><br></div><div>To register an image you have to use the opennebula ID, so in this case you can register the image 28 with this command:</div>


<div><br></div><div>    econe-register 28</div><div><br></div><div>Cheers</div><div><br></div><div>[...]</div></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>--<br></div>Daniel Molina<br>Project Engineer<br>


OpenNebula - Flexible Enterprise Cloud Made Simple<br><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:dmolina@opennebula.org" target="_blank">dmolina@opennebula.org</a> | @OpenNebula</div>



</div></div>