Trying to install KVM on CentOS 7? Take a peek at this blog for the steps.
Here at Bobcares, we have seen several such CentOS related queries as part of our Server Management Services for web hosts and online service providers.
Today we’ll see how to install KVM on CentOS 7.
A few facts about KVM
KVM virtualization is abbreviated as Kernel-based virtual machines.
Virtualization provides you the ability to create a virtual copy of the physical hardware to simultaneously run an OS different from the one from the physical machine.
Also, it is a leading open-source complete virtualization solution. It supports all major operating systems including Linux and Windows.
Moreover, KVM will allow you to turn Linux into a hypervisor that allows a host machine to run multiple, isolated virtual environments called guests or virtual machines
How to install KVM on CentOS 7
Now let’s see how our Support Engineers install KVM.
First, run the below commands to install KVM.
# yum -y install epel-release
# yum -y install qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils
Starting libvirtd on CentOS 7
To start using the Libvirt utilities such as Virt Manager, first start and enable Libvirt by running the below commands.
# systemctl enable libvirtd
# systemctl start libvirtd
# systemctl status libvirtd
The above commands will start the libvirtd service and enable it at boot.
Verify KVM Installation on CentOS 7
Next, to verify the installation. run the below command.
# lsmod | grep -i kvm
kvm_intel 139116 4
kvm 388635 1 kvm_intel
Configure Bridge Interface
Before we move ahead to create the VMS. let us first create the bridge interface. In case, if you wish to access the virtual machines from outside of your hypervisor network then a bridge interface is required.
# cd /etc/sysconfig/network-scripts/
# cp ifcfg-eno16777736 ifcfg-br0
vim ifcfg-eno16777736
TYPE=Ethernet
BOOTPROTO=static
DEVICE=ifcfg-eno16777736
ONBOOT=yes
BRIDGE=br0
Now edit the bridge file (ifcfg-br0) and set the following.
vim ifcfg-br0 TYPE=Bridge BOOTPROTO=static DEVICE=br0 ONBOOT=yes IPADDR=192.168.100.21 NETMASK=255.255.255.0 GATEWAY=192.168.100.1 DNS1=192.168.100.11
Next, replace the IP address and DNS server details as per the setup. Then to enable the bridge interface, restart the network Service. For that, run the below command.
# systemctl restart network
Here is the command using which you can check the Bridge interface.
# ip addr show br0
[Need any further assistance with CentOS queries? – We are here to help you.]
Conclusion
In today’s writeup, we saw how our Support Engineers install KVM.
0 Comments