Install jail from CLI ?

Status
Not open for further replies.

iXô

Dabbler
Joined
Jun 11, 2014
Messages
41
Hello, beacause the web ui of freenas doesn't works with proxy, I would like to know if there is a way to install a jail (in my case the new VirtualBox jail) from cli ?


Thanks.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
No. FreeNAS expects you to use the WebGUI.

You *could* use the API, but again you are probably going to have proxy server problems.

If you are in a position where the CLI is your only option you are probably better off with full blown FreeBSD. Doing stuff from the CLI that should be done from the WebGUI will only lead to lost data, erratic server operations, and random other problems.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
I tryied this work-around, but I must do something wrong as the webUI doesn't take the setting for the proxy.
I even restart the django server, but I don't think django use environment variable for automaticaly proxying downloads.

I don't think you used the workaround linked in ticket 4866. That ticket mentions downloading the template yourself manually, pointing FreeNAS to the template file and letting it install a file that is locally hosted on one of your own internal servers.
 

iXô

Dabbler
Joined
Jun 11, 2014
Messages
41
I don't think you used the workaround linked in ticket 4866. That ticket mentions downloading the template yourself manually, pointing FreeNAS to the template file and letting it install a file that is locally hosted on one of your own internal servers.

Hum, maybe I miss something but this ticket 4866 link to an url explaining how to set proxy setting in cshrc or using setenv command.

Before finding the ticket, I already tryied to install the jail template on a self hosted server and updating the jail configuration in the ui to point to this server.
But this doesn't seems to works for me as it seems that the VirtualBox jail try to use pkg_ng to download something, and there, again a problem with proxy.

But forgive for any error I can make, I am a real noob with BSD.

Thanks for helping me anyway.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Actually, Virtualbox might do pkg_ng. I created the original template but it has been modified a bit here and there.

You are going to have long-term problems with your proxy because the virtualbox version must match the system files' versions that FreeNAS has included. So if you run FreeNAS 9.2.1.6 you have to run Virtualbox 4.3.12 and nothing else. If FreeNAS 9.3 comes with the kernel drivers for 4.4.0 then you will be forced to upgrade the jail to 4.4.0. Failure to do so will result in potential problems up to and including the VMs not being able to boot.

So I think you're going to have to sit down with whoever makes the security decisions and decide to either:

1. Find a way to get your FreeNAS box on the internet without the proxy server being in the way.
2. Hack the living hell out of FreeNAS until it does everything you want (assuming this is even possible).
3. Give up the idea of using FreeNAS in the fashion you are desiring.
 

iXô

Dabbler
Joined
Jun 11, 2014
Messages
41
Thanks, I think I will try to setup a transparent proxy, but this is new for me.
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
FreeNAS web UI doesn't work with proxies? That's totally news to me cause I've been accessing it from day 1 through a squid proxy.

EDIT: oh... misleading question. It's not the web UI doesn't work with proxies, OP wants the whole box to connect through a proxy.
 
Status
Not open for further replies.
Top