Changes between Version 6 and Version 7 of Developers/yasumichi/仮想化関連


Ignore:
Timestamp:
2016/04/27 22:30:59 (8 years ago)
Author:
yasumichi
Comment:

lxc の利用例を追加

Legend:

Unmodified
Added
Removed
Modified
  • Developers/yasumichi/仮想化関連

    v6 v7  
    2727- lxc , lxc-templates , bridge-utils , libcgroup は最低限必要? 
    2828- debian のテンプレート使うためには debootstrap が必要 
     29 
     301. /etc/fstab に以下の行を追加 
     31{{{ 
     32cgroup                  /sys/fs/cgroup          cgroup  defaults        0 0 
     33}}} 
     341. 上記ファイルシステムのマウント 
     35{{{ 
     36$ sudo mount /sys/fs/cgroup 
     37}}} 
     381. ブリッジの追加 
     39{{{ 
     40$ sudo brctl addbr lxcbr0 
     41}}} 
     421. コンテナの作成 
     43{{{ 
     44$ sudo lxc-create -n vineseed1 -t vinelinux -- --release VineSeed --arch x86_64 --user vine --password vine 
     45}}} 
     461. コンテナの起動 
     47{{{ 
     48$ sudo lxc-start -n vineseed1 -d 
     49}}} 
     501. コンテナのコンソールに接続(抜けるには Ctrl + A → Q) 
     51{{{ 
     52$ sudo lxc-console -n vineseed1 
     53}}} 
     541. コンテナの停止(コンソールから抜けずに shutdown でも可) 
     55{{{ 
     56$ sudo lxc-stop -n vineseed1 
     57}}} 
     58 
     59=== 参考 === 
     60 
     61- [http://ml.vinelinux.org/vineseed/msg10722.html 【VineSeed:027573】 upload: lxc など] 
     62- [http://knowledge.sakura.ad.jp/tech/2108/ さくらのナレッジ > ナレッジ > エンジニア向け > 15分で分かるLXC(Linux Containers)の仕組みと基本的な使い方] 
     63- [http://inokara.hateblo.jp/entry/2013/07/20/063748 Debian Wheezy で LXC 環境を作る]