LoginSignup
5
3

More than 5 years have passed since last update.

KVMホストの環境構築 (CentOS 7編)

Posted at

CentOS 7でKVMホストを構築する際の設定方法です。

KVMインストール

# yum -y install qemu-kvm libvirt bridge-utils

##モジュールが読み込まれているかの確認
# lsmod | grep kvm 

# systemctl start libvirtd 
# systemctl enable libvirtd

ブリッジネットワークの設定

# nmcli c delete enp3s0 ←環境によって変わる
# nmcli c add type bridge autoconnect yes con-name br0 ifname br0
# nmcli c modify br0 bridge.stp no
# nmcli c add type bridge-slave autoconnect yes con-name enp3s0 ifname enp3s0 master br0
# nmcli c modify br0 ipv4.method manual ipv4.addresses 192.168.1.10/24 ipv4.gateway 192.168.1.1 ipv4.dns 8.8.8.8 ←適切な値に設定する

CentOS 7.1からは「ipv4.gateway」を明示する必要があります。
設定したら、ネットワークを再起動します。

参考

なぜかNetworkManagerで設定できない場合

5
3
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
5
3