LXC 2.0 upto 3.0 config fix
Автоматически преобразуем конфигурацию всех контейнеров:
#!/bin/bash
#for cc in $(lxc-ls -1); do
for cc in $(ls -1 /var/lib/lxc); do
echo $cc
sed -i 's/lxc.start.auto = 1/lxc.start.auto = 0/g' /var/lib/lxc/$cc/config
sed -i 's/lxc.network/lxc.net.0/g' /var/lib/lxc/$cc/config
sed -i 's/lxc.rootfs = \//lxc.rootfs.path = dir:\//g' /var/lib/lxc/$cc/config
sed -i 's/lxc.rootfs.backend = dir/\n/g' /var/lib/lxc/$cc/config
sed -i 's/lxc.tty /lxc.tty.max /g' /var/lib/lxc/$cc/config
sed -i 's/lxc.utsname /lxc.uts.name /g' /var/lib/lxc/$cc/config
done