Configure Kernel Based Virtual Machine (KVM) on RHEL 7 or CentOS 7 | Install & Configure KVM in RHEL

Published: 01 January 1970
on channel: Nehra Classes
8,788
114

KVM:
-------
KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V). It consists of a loadable kernel module, kvm.ko, that provides the core virtualization infrastructure and a processor specific module, kvm-intel.ko or kvm-amd.ko.

Using KVM, one can run multiple virtual machines running unmodified Linux or Windows images. Each virtual machine has private virtualized hardware: a network card, disk, graphics adapter, etc.

KVM is open source software. The kernel component of KVM is included in mainline Linux, as of 2.6.20. The userspace component of KVM is included in mainline QEMU, as of 1.3.

How does KVM work:
----------------------------
KVM converts Linux into a type-1 (bare-metal) hypervisor. All hypervisors need some operating system-level components—such as a memory manager, process scheduler, input/output (I/O) stack, device drivers, security manager, a network stack, and more—to run VMs. KVM has all these components because it’s part of the Linux kernel. Every VM is implemented as a regular Linux process, scheduled by the standard Linux scheduler, with dedicated virtual hardware like a network card, graphics adapter, CPU(s), memory, and disks.

Install KVM in CentOS 7:
------------------------------
setenforce 0

uname -a

cat /etc/CentOS-release

grep -E 'svm|vmx' /proc/cpuinfo

yum repolist
watch this video to configure it in RHEL 7:
   • Configure Local Yum Repository in RHE...  

yum install -y qemu-kvm libvirt libvirt-python libguestfs-tools virt-install

systemctl start libvirtd

systemctl status libvirtd

ifconfig

vim /etc/sysconfig/network-scripts/ifcfg-ens33
#IPADDR
#NETMASK
#GATEWAY
BRIDGE=virbr0

cp -p /etc/sysconfig/network-scripts/ifcfg-ens033 /etc/sysconfig/network-scripts/ifcfg-virbr0

vim /etc/sysconfig/network-scripts/ifcfg-virbr0
TYPE=BRIDGE
IPADDR
NETMASK
GATEWAY
DEVICE=virbr0

ll /usr/lib/sysctl.d/60-libvirtd.conf

rpm -qf /usr/lib/sysctl.d/60-libvirtd.conf

vim /usr/lib/sysctl.d/60-libvirtd.conf
net.ipv4.ip_forward = 1

/sbin/sysctl -w /usr/lib/sysctl.d/60-libvirtd.conf

/sbin/sysctl -p /usr/lib/sysctl.d/60-libvirtd.conf

ifconfig virbr0

virsh net-edit default
192.168.1.140
dhcp range 192.168.1.200 192.168.1.254

vim /etc/sysconfig/network-scripts/route-virbr0
192.168.1.0/24 via 192.168.1.140 dev virbr0

init 6

systemctl status libvirtd

ifconfig -a

osinfo-query os | more

osinfo-query os | grep -i centos

df -hT

ll /tmp/CentOS-7-x86_64-DVD-1708.iso

chmod 775 /tmp/CentOS-7-x86_64-DVD-1708.iso

ll /kvm

virt-install --name KVMac --description "CENTOS7 for KVMac" --os-type=Linux --os-variant=centos7.0 --ram=1024 --vcpus=1 --disk path=/kvm/KVMac.img,bus=virtio,size=10 --graphics none --console pty,target_type=serial --location /tmp/CentOS-7-x86_64-DVD-1708.iso --network bridge:virbr0 --extra-args console=ttyS0

virsh list --all

virsh dominfo KVMac

virsh shutdown KVMac

virsh console KVMac

virsh console KVMac

virsh list --all

virsh start KVMac

virsh console KVMac

virsh list

virsh list --all

virt-clone --connect qemu:///system --original KVMac --name vm3 -f /kvm/KVMac2.img

virsh list --all

virsh start KVMac2

virsh console KVMac2

ifconfig

nslookup 8.8.8.8

netstat -nr

You are done.
================
Thanks for watching the video. Please like our videos, share with your friends and feel free to ask anything, post your queries in comments section. We will be glad to answer your queries. Don't forget to subscribe the channel & turn on the bell notifications.
===============
Our Some Popular Videos:

NAVIC:
   • NAVIC: The Indian GPS | INRSS (Indian...  

Learn Linux Fundamentals:
   • Learn Linux Fundamentals (Linux Basic...  

Concept of All RAID Levels:
   • Session-31 | Concept of RAID & Differ...  

Configure RAID-0 in Linux:
   • Live Linux Training (RHCSA+RHCE) For ...  

Configure RAID-1 in Linux:
   • Live Linux Training (RHCSA+RHCE) For ...  

Configure RAID-5 in Linux:
   • Live Linux Training (RHCSA+RHCE) For ...  

Configure RAID-6 in Linux:
   • Live Linux Training (RHCSA+RHCE) For ...  

Configure RAID-10 in Linux:
   • Live Linux Training (RHCSA+RHCE) For ...  

LVM Snapshot:
   • Session-30 | Logical Volume (LVM) Sna...  
====================================================
Contact Us:

To Follow Vikas Nehra's Twitter Handle:👇
http://bit.ly/VikasNehraTwitterHandle

For Registration:👇
http://bit.ly/NehraClassesRegForm

To Follow Our Twitter Handle:👇
http://bit.ly/NehraClassesTwiiterHandle

To Visit Our Facebook Page:👇
www.facebook.com/nehraclasses

Join Us on Telegram App: 👇
https://t.me/NehraClasses

WhatsApp Us: 👇
https://bit.ly/2Kpqp5z

Email Us:👇
Email: [email protected]
============
©COPYRIGHT. ALL RIGHTS RESERVED

#NehraClasses #LinuxTraining #KVM


Watch video Configure Kernel Based Virtual Machine (KVM) on RHEL 7 or CentOS 7 | Install & Configure KVM in RHEL online, duration hours minute second in high quality that is uploaded to the channel Nehra Classes 01 January 1970. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 8,788 times and liked it 114 visitors.