<div dir="ltr">Yes, at <a href="http://pve.proxmox.com/wiki/Developer_Documentation">http://pve.proxmox.com/wiki/Developer_Documentation</a> ; to "compile" the Ext.js code, simply run make (all it does is concatenate the various .js files together in an intelligent order).<div>

<br></div><div>Immediate feedback:</div><div><br></div><div>"createtemplate" is a tad on the long side for an API endpoint, and somewhat redundant if being used via pvesh.  POST requests imply create, and RESTful API design generally frowns on verbs in endpoint names, so I'd shorten it to just "template".</div>

<div><br></div><div>It should be possible to remove network devices from a CT prior to conversion instead of throwing an error, then re-add them once template creation is complete.  It might also be good to ensure that certain other files/settings which shouldn't be rolled into a template are omitted (.ssh directories, root password shadow file entries, and so forth), which can either be tricky or simple depending on how you approach it, and the files/settings in question.  We *can* rely on users to think of these things, but it's generally a bad idea since the average user, even of something as specialized os Proxmox, doesn't have enough background in the underlying technologies to reliably think of these things on their own.  Principle of least surprise has always been a good guideline for user support, so the more of this we can automate, the better.  (Besides, how tedious to have to manually remove network entries every time you update a template, only to have to re-add them before making further updates...)</div>

<div><br></div><div>This isn't strictly required (or necessarily advised), but you could also automate CT stop/start as part of the process.  This would require a statement to the effect of "The container will be shutdown for the duration of this process.  Are you sure you want to continue?" in the web UI.  The issue here, though, is that API users don't get confirmation requests, so this may be undesired.  A sensible alternative would be to use suspend/resume (patch submitted yesterday for this) instead of stop/start, but the CT still needs to be offline for the duration of the operation, which still might be undesired in some cases.</div>

<div><br></div><div>On that note...  Might it make sense to convert a *backup* into a template?  The snapshot mode involves no downtime, and manipulating archive contents is simple enough with how tar works.  Just run a vzdump of the selected CT with snapshot and gzip selected, then manipulate the contents of the backup into an OpenVZ template.  The conversion step would probably be best implemented in a separate tool, which would also take care of intelligently removing unwanted files/settings.  (According to this [<a href="http://forum.proxmox.com/archive/index.php/t-1403.html">http://forum.proxmox.com/archive/index.php/t-1403.html</a>], you can just rename the backup to conform with template naming rules, place it in the cache directory, and you're good, but this doesn't remove sensitive files, and omits a file or two used at the beginning of regular OpenVZ templates to describe the template itself, so may not be quite what you're looking for.)  I haven't seen any evidence that such a tool exists already, but it might be useful to provide upstream to the OpenVZ team.</div>

<div><br></div><div>Anyway, that's just my feedback as a fellow contributor.  Looking forward to others' feedback on this.</div></div><div class="gmail_extra"><br clear="all"><div>- Daniel Hunsaker<br>Owner / Developer<br>

Lei's Genesis Experiment: Code For The Future!</div>
<br><br><div class="gmail_quote">On Sun, Mar 2, 2014 at 2:11 PM, James A. Coyle <span dir="ltr"><<a href="mailto:james.coyle@jamescoyle.net" target="_blank">james.coyle@jamescoyle.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div>Hi all,</div><div><br></div><div>I have made a few changes to the web GUI to add a new option under the container context menu to make a template from a stopped container and wanted to know if you would consider including it in the main distribution?</div>

<div><br></div><div>I don't know how to compile the code from your git repo for testing so I have modified the built code directly on a Proxmox install. <span style="font-size:12pt">I have attached the code but I'm not sure how useful it will be to you as it's not in git diff format. Do you have any docs on making changes to the code from the git repo and submitting patches correctly? </span></div>

<div><br></div><div><span name="x"></span><div>James Coyle<br></div><div><br></div><div>M:<a href="tel:%2B44%20%280%29%207809%20895%20392" value="+447809895392" target="_blank">+44 (0) 7809 895 392</a><br>E: <a href="mailto:james.coyle@jamescoyle.net" target="_blank">james.coyle@jamescoyle.net</a> <br>

Skype: jac2703<br>Gtalk: <a href="mailto:jac2703@gmail.com" target="_blank">jac2703@gmail.com</a> </div><div>www: <a href="http://www.jamescoyle.net" target="_blank">www.jamescoyle.net</a></div><span name="x"></span><br>
</div>
</div></div><br>_______________________________________________<br>
pve-devel mailing list<br>
<a href="mailto:pve-devel@pve.proxmox.com">pve-devel@pve.proxmox.com</a><br>
<a href="http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel" target="_blank">http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel</a><br>
<br></blockquote></div><br></div>