Tips to activate the nfs:on feature by default at CT creation ?

x3w

Member
Nov 20, 2011
16
0
21
Hi,

I'm running a 2.1 cluster where I need to activate the "nfs: on" feature by defaut on most of the openvz CT I create.

This operation cannot be done via the webgui (not yet!) so I use a vzctl command (via SSH or secure console).
It works very fine, but I wish I could avoid this "manual" step (and make the CT creation simpler, especially for non-admin).

Does someone could provide a tip to activate this nfs: on feature by default on a cluster (at CT creation) ?
This is the last thing I miss to create, configure, and run a CT using only the webgui.

Thanks for your help


(nb: this is a repost of an old 1.x thread: http://forum.proxmox.com/threads/7761-howto-add-nfs-feature-for-every-CT-based-on-a-given-template)
 
Thanks. I looked in man vz.conf and man ctid.conf.
There is a lot of options but unfortunately there is nothing for the --features option.
Anyway, I've tried a few things, among them:

1) using the CONFIGFILE variable in vz.conf (equivalent to vzctl create --config option)
=> got an error "configuration file already exists" (wich was expected I guess)

2) using the postcreate script, adding a line at the end to call ' vzctl set $(basename $VE_ROOT) --features "nfs: on" '
=> got an error "Container already locked"

Doing this, I realized this is probably not the good way, as these modifications (if they had worked) sould have been done on every node of the cluster, wich is difficult to maintain (after an upgrade for example).
So the CLI is still the best solution for me I guess.

Surely the one and only solution is to have this in the GUI (at a cluster scope) ?
 
Last edited:
1) using the CONFIGFILE variable in vz.conf (equivalent to vzctl create --config option)
=> got an error "configuration file already exists" (wich was expected I guess)

What about:
Code:
FEATURES="nfs:on"
 
My mistake. Adding a line in /etc/vz/vz.conf with FEATURES="nfs: on" can solve the problem.
This file is parsed on CT startup and the nfs feature will be enabled for the CT, even if it does not appears in CTID.conf

I'm not sure of what happen if CTID.conf already set this variable, but I guess it is overidden (not tested yet).
Thanks for your help.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!