[lxc-users] support getting and setting custom options
Florian Klink
flokli at flokli.de
Sat May 3 10:48:59 UTC 2014
Hi,
I store some "foreign" config settings in the lxc config file, which
should be okay as soon as they don't start with "lxc.".
(See
"http://permalink.gmane.org/gmane.linux.kernel.containers.lxc.general/6161)
However, reading (and probably writing) the settings using the lxc tools
is not possible:
# generate /var/lib/container-name/config
c = lxc.Container("container-name")
c.get_config_item("lxc.tty") # returns the value from the lxc config file
c._container.get_config_item("other.defined.setting") #returns KeyError:
'Invalid configuration key'
Of course, everyone could implement his own config file reader to read
this part of the config, but it would be more nice if this can be done
from the lxc tools alone.
Florian
More information about the lxc-users
mailing list