Mailinglist Archive: opensuse (878 mails)

< Previous Next >
Re: [opensuse] linux containers questions
  • From: Per Jessen <per@xxxxxxxxxxxx>
  • Date: Thu, 12 Sep 2013 16:09:44 +0200
  • Message-id: <l0shvj$4ct$1@saturn.local.net>
Robert Schweikert wrote:

On 09/12/2013 09:25 AM, Per Jessen wrote:
Robert Schweikert wrote:

On 09/12/2013 02:40 AM, Per Jessen wrote:
1) what is the appropriate way to change the default
location "/var/lib/lxc" to <something else> ? An environment
variable, a global config file? For now I've made /var/lib/lxc a
symlink, which works.

The location of the container is described in the container config
file with the lxc.rootfs variable.

Yes, but I think some of the lxc-* commands assume /var/lib/lxc as
the starting point for finding the config. I couldn't make
lxc-shutdown work until I symlinked /var/lib/lxc -> <mylocation>.

I think all lxc-* commands have a -f option thus you can keep your
config files in /etc/lxc (I think that's the deafult) and point the
command to that file using -f. At that point the "real" location of
the rootfs should be found correctly without the symlink.

Hmm, I'm fairly new to containers, but the container config seems to be
<basepath>/container/config. In /etc/lxc I only see default.conf with
a single line: lxc.network.type = empty.

Some of the lxc-* commands have the '-P' option, but e.g. not
lxc-shutdown.


--
Per Jessen, Zürich (13.4°C)
http://www.dns24.ch/ - free DNS hosting, made in Switzerland.

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >