A
A
Alexander Semenenko2017-11-20 14:36:58
linux
Alexander Semenenko, 2017-11-20 14:36:58

Why doesn't lxc container start automatically?

Registered in the container config:
lxc.start.auto = 1 # turn
on lxc.start.delay = 15 # delay in seconds
lxc.start.order = 50 # higher value, starts first I execute
:
$ sudo lxc-ls -f
NAME STATE AUTOSTART GROUPS IPV4 IPV6
apache2 STOPPED 1 - - -
mysql STOPPED 1 - - -
nginx STOPPED 1 - - -
It seems to start, I restart the node, and the containers are stopped again.
If I execute:
sudo lxc-autostart
That containers start.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Semenenko, 2017-11-20
@semenenko88

It was necessary to enable the unit in systemd:
$ sudo systemctl enable lxc
$ sudo systemctl enable lxc-net

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question