Skip to content

Installing KVM

ezabolo edited this page Dec 29, 2014 · 1 revision

Table of Contents

Installing KVM on centos 7

verify that the machine supports Virtualization

egrep '(vmx|svm)' /proc/cpuinfo 

Install the following package

yum install kvm libvirt python-virtinst qemu-kvm

Start libvirt daemon and enable it at boot time as

systemctl start libvirtd
syetemctl enabled libvirtd

verify that KVM is working

[root@banana ~]# virsh -c qemu:///system list
 Id    Name                           State
----------------------------------------------------

setting up bridging

install the package bridge-utils

yum -y install bridge-utils

create the network bridge interface

vi /etc/sysconfig/network-scripts/ifcfg-br0  ==> and add the content below : 
DEVICE=br0
TYPE=Bridge
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.0.30
NETMASK=255.255.255.0
GATEWAY=192.168.0.254
DNS1=192.168.0.254

modify the configuration file of the physical interface

modify it as follow :

# vi /etc/sysconfig/network-scripts/ifcfg-eno1

HWADDR=3C:D9:2B:4A:09:E8
TYPE=Ethernet
BOOTPROTO=none
PEERDNS=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
NAME=eno1
UUID=7f3515e7-d896-45fb-acf1-cb8fdac92eef
ONBOOT=yes
BRIDGE=br0

restart the network

systemctl restart network