LoginSignup
1
1

More than 5 years have passed since last update.

LXC1.1でのバックアップ、リストア、あとCentOS7動作レポ

Last updated at Posted at 2015-02-08

コンテナ作成

lxc-create -n centos7 -t centos -- -R 7

起動

lxc-start -n centos7

停止

  • centos7のはstopが効かないので-k付ける。
  • /sbin/rebootも同様に効かない。centos7はまだ早いかなー
lxc-stop -k -n centos7

バックアップ

cd /var/lib/lxc/
tar czfp ~/centos7.tar.gz centos7

リストア

cd /var/lib/lxc/
lxc-stop -k -n centos7
mv centos7{,.old}
tar --numeric-owner -xzpf ~/centos7.tar.gz

CentOS7

  • systemd -> Failed to get D-Bus connection: Failed to authenticate in time.
  • /sbin/reboot -> 応答なし
  • lxc-stop -n centos7 -> 応答なし
  • lxc-stop -k -n centos7 -> やっと停止
  • lxc - 特権コンテナの作成 - Qiitaでも上記と同じ。

lxc-webpanel

  • archlinuxで動かしてみましたが、やはりubuntu上じゃないとまともに動作しないっぽいので注意。
pacman -S python-flask
cd /opt
git clone https://github.com/claudyus/LXC-Web-Panel
ln -s /opt/LXC-Web-Panel /etc/lwp/
cd /opt/LXC-Web-Panel
cp lwp.example.conf lwp.conf

python2 ./setup.py develop
python2 ./bin/lwp --debug

http://ipaddr:5000/ に admin:adminでログイン。

バックアップ位なら動作する。
スクリーンショット 2015-02-08 15.01.08.png

centos5 i686

yaourt -S --noconfirm yum
lxc-create -n centos5i686 -t centos -- -R 5 -a i686
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1