Welcome, Guest
Username: Password: Remember me
Archived CloudStack Forums for reference purposes please direct all future inquiries to the Apache CloudStack mailing lists.

incubator.apache.org/cloudstack/mailing-lists.html

TOPIC: upload your own templates/isos in cloudstack

upload your own templates/isos in cloudstack 1 year 4 months ago #11047

  • optiplex
  • optiplex's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 302
  • Thank you received: 55
  • Karma: 16
hi, i ve seen many times questions about this, so here is a way to upload your own templates or iso in cloudstack.
this may not be the best solution, but it works :) any suggestion is very welcome!

i m using CS 3.0.1, with 2 machines:
-management server = 192.168.146.211
-host = 192.168.146.212

-in my host i have created a directory : /var/www/repo/img
in this "img" directory, i put all my qcow2, vmdk or iso files
-it is important to correctly add the extensions to each files, for example a qcow2 must be named "myFile.qcow2"

-i cd in this img directory, and enter "python -m SimpleHTTPServer 443"
-This exposes the contents of my "img" directory on the port 443, as a simple http server (as the command lets it guess)

-now, i can access this content on my web browser:
http://192.168.146.212:443

-in cloudstack, since it is a local repo, i have to fill in the global settings: "secstorage.allowed.internal.sites" to value "192.168.146.0/24" (since this is my CIDR here)

-i now just have to go to the template tab, select "create template" or "create iso" according to my need
-as URL enter
http://192.168.146.212:443/myFile.qcow2
, fill in the other fields correctly and it should download

-if you need to restart the download of a template:
ssh into your SSVM, and enter "service cloud stop", then "service cloud start". This seems to work better thant "service cloud restart", that do not work every time on my machine (the service seems to try to restart before it is actually really stopped)


Hope this can help someone :)
Last Edit: 1 year 4 months ago by optiplex.
The administrator has disabled public write access.
The following user(s) said Thank You: jzb, dimach, mahzad, CloudNext

Re: upload your own templates/isos in cloudstack 1 year 4 months ago #11110

  • gemiller
  • gemiller's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 90
  • Thank you received: 15
  • Karma: 4
This is great. Thanks!
The administrator has disabled public write access.

Re: upload your own templates/isos in cloudstack 1 year 4 months ago #11121

  • Nitin
  • Nitin's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 145
  • Thank you received: 19
  • Karma: 6
optiplex - This is great work. Can you please add this to the documentation at docs.cloudstack.org/ ?
The administrator has disabled public write access.

Re: upload your own templates/isos in cloudstack 1 year 4 months ago #11123

  • melo
  • melo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Hi Optiplex, I've just follwed your procedures creating a new template using phyton to expose the qcow2 file, the template was successfully created, but looking at details I noticed that status and size fields are empty, but even so, I received the message "Template has been created successfully" I tried to create a new instance following the procedures on CloudStack Basic Installation Guide, going to Instance, Add Instance, select the Zone, select Template option and hit Next, on the screen that should be populated with the template I've just created is empty(!!!), where is my fault?? Thanks.
Attachments:
The administrator has disabled public write access.

Re: upload your own templates/isos in cloudstack 1 year 4 months ago #11124

  • Nitin
  • Nitin's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 145
  • Thank you received: 19
  • Karma: 6
refer to this and see if you can troubleshoot - wiki.cloudstack.org/display/gen/SSVM+troubleshooting
The administrator has disabled public write access.

Re: upload your own templates/isos in cloudstack 1 year 4 months ago #11153

  • optiplex
  • optiplex's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 302
  • Thank you received: 55
  • Karma: 16
hi,

the message "Template has been created successfully" does not mean that your template will be available or has been installed correctly: this just checks that your url is well formed.
For example
http://192.168.1.1/fakeFile.qcow2
will return the "Template has been created successfully" message, even if i have nothing running on port 80 of 192.168.1.1 and with fakeFile.qcow2 being a non existing file.

- when you expose the templates with the python command, you get all the requests sent to this simple server written on the screen. Check on this screen that you don't have any error, and that yo see your request been answered correctly.
- also, when you create the template in cloudstack, you should firstly have "Template has been created successfully", and then the status will show the download rate: 10%...20% etc, check that you get this as well and that you don't have a "connection refused"

Your template should be "ready=yes" and "status=download complete"

@Nitin: thx, i ll add this to the doc when i ll have some time :)
The administrator has disabled public write access.
Time to create page: 0.276 seconds

Open@Citrix

Citrix supports the open source community via developer support and evangeslism. We have a number of developers and evangelists that participate actively in the open source community in Apache Cloudstack, OpenDaylight, Xen Project and XenServer. We also conduct educational activities via the Build A Cloud events held all over the world. 

Connect