SOLVED Locally host jail templates

Status
Not open for further replies.

Scentle5S

Explorer
Joined
Sep 9, 2016
Messages
74
Hi,

After giving a first shot at FreeNAS's jails through the plugins, I'd now like to create my own jails, and install the plugins manually in order to be able to have more than one plugin in a jail, be able to update them easily and so on.

So I read the documentation, was planning to create a jail, but I don't like the idea of having to download the jail's template each time I want to create one (400 MB+). Not that I want to create a thousand jails or that I have a poor connection, but still. Let's say that I just don't like to download the same file over and over when I could do that just once.

So I downloaded the tgz and mtree files for my FreeNAS release (the same ones I can see being downloaded from the GUI through the "normal process") and stored them on a specific "Template" dataset. Then I turned on both FTP and Webdav services on my FreeNAS, and am able to access the files with both protocols through those URLs :

ftp://192.168.1.100/Template/freenas-standard-10.3-RELEASE.tgz
ftp://192.168.1.100/Template/freenas-standard-10.3-RELEASE.mtree

http://webdav:davtest@192.168.1.100:8080/template/freenas-standard-10.3-RELEASE.tgz
http://webdav:davtest@192.168.1.100:8080/template/freenas-standard-10.3-RELEASE.mtree


Then I create the template (OS : FreeBSD ; Architecture : x64 ; URL & Mtree : look up), but when I try to create the jail :
  1. With Webdav : After 2s the GUI greets with a shiny red "Unable to find template!" error message.
  2. With FTP : I can see the following logs but nothing happens, it just goes on and on with a "0 ETA", and when I cancel it I can see that the dataset for the template is almost empty.
Nov 7 11:13:33 freenas proftpd[19231]: 127.0.0.1 (192.168.1.100[192.168.1.100]) - FTP session opened.
Nov 7 11:13:33 freenas proftpd[19231]: 127.0.0.1 (192.168.1.100[192.168.1.100]) - ANON ftp: Login successful.


So why can't FreeNAS access the template while the URLs are fine ? The only thing I can see that is different from the standard process is that the FreeNAS official Webdav requires no authentication, whereas the local one requires webdav:davtest.
 

Sakuru

Guru
Joined
Nov 20, 2015
Messages
527
Huh? FreeNAS caches the jail template in the dataset you specify for your jails. You don't need to do anything fancy to accomplish that :)
 

Scentle5S

Explorer
Joined
Sep 9, 2016
Messages
74
Oh, I thought the dataset was for the jail itself, not the template, since it is created during the jail creation process. Sure when using the normal procedure this makes sense, but when using custom templates it would have made more sense to me if the dataset was created at the same time as the template.

I still don't get why my solution didn't work though, I'll go with the normal procedure now of course, but maybe people who create their own template would face this situation, or if FreeNAS' server goes down for some reason right when you need the template.

Speaking of template dataset, this one's been bothering me since the beginning but thanks to you I think I get it now : What is the "jails/.warden-template-pluginjail" dataset for ? I assume it's the one used when installing plugins right ? So I better not delete it.

Thank you for showing me the light by the way ;-)
 

Sakuru

Guru
Joined
Nov 20, 2015
Messages
527
What is the "jails/.warden-template-pluginjail" dataset for ? I assume it's the one used when installing plugins right ?
Correct.
 
Status
Not open for further replies.
Top