内容へ移動
fl8 Wiki
ユーザ用ツール
ログイン
サイト用ツール
検索
ツール
文書の表示
以前のリビジョン
バックリンク
最近の変更
メディアマネージャー
サイトマップ
ログイン
>
最近の変更
メディアマネージャー
サイトマップ
現在位置:
Dokuwiki.fl8.jp
»
01_linux
»
08_仮想化
»
03 KVM install
トレース:
01_linux:08_仮想化:03_kvm_install
この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。
====== 03 KVM install ====== ==== 環境 ==== CentOS 6.8 ===== 必要なパッケージインストール ===== <code> # yum -y install qemu-kvm libvirt python-virtinst bridge-utils </code> ===== ブリッジ作成 ===== <code> # virsh iface-bridge eth0 br0 </code> === 4つのブリッジ作成の例 === <code> # virsh iface-list Name State MAC Address -------------------------------------------- bond1 active f4:ce:46:a6:fc:48 br0 active b4:99:ba:a8:10:90 br1 active f4:ce:46:a6:fc:48 br2 active f4:ce:46:a6:fc:4a br3 active f4:ce:46:a6:fc:48 lo active 00:00:00:00:00:00 # brctl show bridge name bridge id STP enabled interfaces br0 8000.b499baa81090 yes bond0 vnet0 br1 8000.f4ce46a6fc48 yes bond1.302 vnet1 br2 8000.f4ce46a6fc4a yes eth4 vnet2 br3 8000.f4ce46a6fc48 yes bond1.998 vnet3 virbr0 8000.5254006c844c yes virbr0-nic </code> == STP == STP on のままだと、STP(スパニングツリープロトコル)の通信が出続けるのでoffにしとく <code> # sed -i 's/^STP.*/STP="off"/g' /etc/sysconfig/network-scripts/ifcfg-br* </code> ===== VMインストール ===== === LVM作成 === <code> # lvcreate -L 10G -n VolTEST VolG00 </code> === ISOからインストール === <code> # virt-install \ --name TESTVM \ --ram 2048 \ --file=/dev/VolG00/VolTEST \ --vcpus 4 \ --clock offset=localtime \ --os-type linux \ --os-variant rhel6 \ --network bridge=br0 \ --graphics none \ --location /ISO/CentOS-6.8-x86_64-bin-DVD1.iso \ --extra-args "console=tty0 console=ttyS0,115200n8" </code> === kickstartファイルからインストール === <code> # virt-install \ --name TESTVM \ --ram 2048 \ --file=/dev/VolG00/VolTEST \ --vcpus 4 \ --clock offset=localtime \ --os-type linux \ --os-variant rhel6 \ --network bridge=br0 \ --graphics none \ --location "http://192.168.0.10/centos/6.8/os/x86_64" \ --extra-args "console=tty0 console=ttyS0,115200n8 ks=http://192.168.0.10/kickstart.cfg ip=192.168.0.11 netmask=255.255.255.0 gateway=192.168.0.1 ksdevice=eth0" </code> {{tag>kvm}}
01_linux/08_仮想化/03_kvm_install.txt
· 最終更新: 2020/04/10 08:07 by
matsui
ページ用ツール
文書の表示
以前のリビジョン
バックリンク
文書の先頭へ