Virtualization With Kvm in Centos6

Introduction to KVM

Kernel-based Digital Machine (KVM) is a virtualization infrastructure for the Linux kernel. KVM helps native virtualization (the place we’ll simulate a whole ambiance on which we’ll run unmodified purchaser working system) on processors with 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. The kernel a part of KVM is included in mainline Linux, as of two.6.20. KVM is an opensource software program program program program, KVM’s elements are licensed beneath pretty a few GNU licenses.

All by way of the KVM improvement the digital machine is utilized as frequent Linux course of. This allows KVM to be taught out of your full choices of the Linux kernel. Gadget emulation is handled by a modified mannequin of QEMU. Since KVM is a part of Linux any machine supported by Linux shall be utilized by KVM.

libvirt is an open current API, daemon and administration machine for managing platform virtualization. It might probably be used to deal with Linux KVM, Xen, VMware ESX, qemu and fully completely completely different virtualization utilized sciences. Libvirt is utilized by pretty a few virtualization capabilities/softwares/platforms. Graphical Interfaces are provided by Digital Machine Supervisor and others. The favored command line interface is (virsh), and higher diploma devices like oVirt.

Implementing KVM with CentOS

1. Checking the processor compatibility.

For Intel Processors grep vmx /proc/cpuinfo –color

For AMD processors grep svm /proc/cpuinfo –color

If we get any output for the above directions that time out our processor is suitable for KVM.

Sample output for Intel(R) Core(TM)2 Duo CPU E8500 @ three.16GHz is given beneath

flags: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dts tpr_shadow vnmi flexpriority

flags: fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dts tpr_shadow vnmi flexpriority

2. Placing in and dealing KVM Packages

yum set up kvm libvirt virt-manager bridge-utils

service libvirtd restart

Bundle deal Description(As given by ‘yum knowledge’)

kvm: A full virtualization reply for Linux on x86 .

libvirt: A C toolkit to work along with the virtualization capabilities of newest variations of Linux (and fully completely completely different OSes).

virt-manager: Digital Machine Supervisor affords a graphical machine for administering digital machines for KVM, Xen, and Qemu.

bridge-utils: This bundle incorporates utilities for configuring the linux ethernet bridge. The linux ethernet   shall be utilized for connecting a complete lot of ethernet devices collectively.

From this stage we’ll use devices like virsh or virt-manager to deal with your digital machine.

three. Configuring Ethernet Bridge

NetworkManager service need to be stopped whereas working with bridge.

service NetworkManager stop

chkconfig NetworkManager off

Create a file /and so forth/sysconfig/network-scripts/ifcfg-br*

DEVICE=br*

ONBOOT=certain

TYPE=Bridge

BOOTPROTO=none

IPADDR=<IP_Address>

NETMASK=<Subnet_Mask>

GATEWAY=<Default_Gateway>

Edit the interface recordsdata(/and so forth/sysconfig/network-scripts/ifcfg-eth*) as given beneath

DEVICE=eth*

ONBOOT=certain

BRIDGE=br0

TYPE=Ethernet

Restart the group service

service group restart

We’re prepared to deal with the VMs with the graphical machine virt-manager (Digital Machine Supervisor) or command line devices like virsh or virt set up. For extra particulars regarding the picks accessible with it you could even see the precise specific individual pages. These commandline devices are very useful in creating scripts for managing Vms.

for extra info :   ” data-sheets-userformat=””>cryptocurrency

Leave a Comment