Configure kernel-based virtual machine (KVM) on RHEL 7 or CentOS 7 Install and configure KVM in RHEL

HomeOther ContentConfigure kernel-based virtual machine (KVM) on RHEL 7 or CentOS 7 Install and configure KVM in RHEL
Configure kernel-based virtual machine (KVM) on RHEL 7 or CentOS 7 Install and configure KVM in RHEL
Configure kernel-based virtual machine (KVM) on RHEL 7 or CentOS 7 Install and configure KVM in RHEL
KVM:
——-
KVM (for Kernel-based Virtual Machine) is a complete virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V). It consists of a loadable kernel module, kvm.ko, which provides the basic 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, a disk, a graphics card, etc.

KVM is open source software. The kernel component of KVM is included in mainline Linux, starting with version 2.6.20. The userspace component of KVM is included in the QEMU mainline, starting with version 1.3.

How KVM works:
—————————-
KVM converts Linux into a type 1 (bare metal) hypervisor. All hypervisors need certain operating system-level components, such as a memory manager, process scheduler, input/output (I/O) stack, device drivers, security, a network stack, etc., to run virtual machines. KVM has all these components because it is part of the Linux kernel. Each virtual machine is implemented as a standard Linux process, scheduled by the standard Linux scheduler, with dedicated virtual hardware such as a network card, graphics card, processor(s), memory, and disks.

Install KVM in CentOS 7:
——————————-
# defineforce 0

# uname -a

# cat /etc/CentOS-release

# grep -E 'svmvmx' /proc/cpuinfo

# yum repolist
watch this video to configure it in RHEL 7:
https://youtu.be/-N09WSCNcso

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

# systemctl starts libvirtd

# systemctl libvirtd status

#ifconfig

# vim /etc/sysconfig/network-scripts/ifcfg-ens33
#IPADDR
#MASQUENET
#BRIDGE
BRIDGEvirbr0

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

# vim /etc/sysconfig/network-scripts/ifcfg-virbr0
TYPEBRIDGE
IPADDR
NETWORK MASK
BRIDGE
DEVICEvirbr0

# 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 by 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

# initialization 6

# systemctl libvirtd status

# 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-typeLinux –os-variantcentos7.0 –ram1024 –vcpus1 –disk path/kvm/KVMac.img,busvirtio,size10 –graphics none –console pty,target_typeserial –location /tmp/CentOS-7-x86_64-DVD-1708.iso –network bridge:virbr0 –extra-args consolettyS0

# virsh list –all

# virsh dominfo KVMac

# virsh shutdown KVMac

# virsh KVMac console

# virsh KVMac console

# virsh list –all

# virsh starts KVMac

# virsh KVMac console

# virsh list

# virsh list –all

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

# virsh list –all

# virsh starts KVMac2

# virsh KVMac2 console

#ifconfig

#nslookup 8.8.8.8

# netstat -n°

You have finished.

Thank you for watching the video. Like our videos, share them with your friends and feel free to ask anything, post your questions in the comments section. We will be happy to answer your questions. Don't forget to subscribe to the channel and activate the notification bell.

Our few popular videos:

NAVIGATION:
https://www.youtube.com/watch?vQoyQbmU2kg4

Learn the fundamentals of Linux:
https://www.youtube.com/watch?v9pqvIqIF_KI

Concept of all RAID levels:
https://www.youtube.com/watch?vVRx0copTNr8

Configure RAID-0 on Linux:
https://www.youtube.com/watch?v5tTHGbSqSKA

Configure RAID-1 on Linux:
https://www.youtube.com/watch?vx12pMJpGGmw

Configure RAID-5 on Linux:
https://www.youtube.com/watch?vCj-je1RUJgo

Configure RAID-6 on Linux:
https://www.youtube.com/watch?vqeKLlrZ5fLg

Configure RAID-10 on Linux:
https://www.youtube.com/watch?vDLVGj_Mu1DA

LVM snapshot:
https://www.youtube.com/watch?vCJJwbnFuM5A

Contact us:

To follow Vikas Nehra's Twitter account:
http://bit.ly/VikasNehraTwitterHandle

For registration :
http://bit.ly/NehraClassesRegForm

To follow our Twitter account:
http://bit.ly/NehraClassesTwiiterHandle

To visit our Facebook page:
www.facebook.com/nehraclasses

Join us on the Telegram app:
https://t.me/NehraClasses

WhatsApp us:
https://bit.ly/2Kpqp5z

Send us an email:
Email: [email protected]

COPYRIGHT. ALL RIGHTS RESERVED

#NehraClasses #LinuxTraining #KVM

Please take the opportunity to connect and share this video with your friends and family if you find it useful.

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *