Introduction to KVM
Kernel-based Digital Device (KVM) is a virtualization infrastructure for the Linux kernel. KVM supports native virtualization (where we can simulate a entire components surroundings on which we can operate unmodified visitor running system) on processors with hardware virtualization extensions (Intel VT or AMD-V). It consist of a loadable kernel module, kvm.ko, that provides the main virtualization infrastructure and a processor specific module, kvm-intel.ko or kvm-amd.ko. The kernel ingredient of KVM is provided in mainline Linux, as of 2.6.20. KVM is an opensource software program, KVM's pieces are certified underneath a variety of GNU licenses.
In the KVM architecture the digital device is implemented as standard Linux procedure. This lets KVM to gain from all the capabilities of the Linux kernel. System emulation is dealt with by a modified model of QEMU. Given that KVM is a element of Linux any components gadget supported by Linux can be used by KVM.
libvirt is an open up source API, daemon and administration instrument for handling platform virtualization. It can be utilized to take care of Linux KVM, Xen, VMware ESX, qemu and other virtualization technologies. Libvirt is applied by various virtualization courses / softwares / platforms. Graphical Interfaces are delivered by Virtual Machine Manager and some others. The most well-known command line interface is (virsh), and greater level resources 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 –coloration
If we get any output for the higher than commands that suggest our processor is appropriate for KVM.
Sample output for Intel (R) Main (TM) 2 Duo CPU E8500 @ 3.16GHz is offered under
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_fantastic 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_very good aperfmperf pni dtes64 watch ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm dts tpr_shadow vnmi flexpriority
2. Putting in and managing KVM Offers
yum set up kvm libvirt virt-manager bridge-utils
assistance libvirtd restart
Package deal Description (As specified by 'yum info')
kvm: A total virtualization solution for Linux on x86 hardware.
libvirt: AC toolkit to interact with the virtualization capabilities of the latest variations of Linux (and other OSes).
digital-manager: Digital Equipment Supervisor supplies a graphical tool for administering virtual devices for KVM, Xen, and Qemu.
bridge-utils: This deal includes utilities for configuring the linux ethernet bridge. The linux ethernet bridge can be applied for connecting several ethernet units alongside one another.
From this point we can use equipment like virsh or virt-supervisor to manage your virtual equipment.
3. Configuring Ethernet Bridge
NetworkManager service need to have to be stopped while doing the job with bridge.
company NetworkManager quit
chkconfig NetworkManager off
Generate a file / and so forth / sysconfig / network-scripts / ifcfg-br *
Device = br *
ONBOOT = certainly
Style = Bridge
BOOTPROTO = none
Edit the interface information (/ and so forth / sysconfig / network-scripts / ifcfg-eth *) as presented under
Device = eth *
ONBOOT = indeed
BRIDGE = br0
Form = Ethernet
Restart the network services
service community restart
We can deal with the VMs with the graphical tool digital-supervisor (virtual equipment manager) or command line instruments like virsh or virtual set up. For much more facts about the choices offered with it you can see the person internet pages. These commandline resources are incredibly handy in creating scripts for handling Vms.
We can make a virtual machine and commence PXE set up by working the command offered beneath.
digital-install –vnc –identify = server6 –ram = 1024 –arch = x86_64 –vcpus = 1 –os-form = linux -os-variant = rhel6 –disk = / var / lib / libvirt / visuals / server6.img -w bridge = br0 –mac = 54: 52: 00: 00: 00: 06 –pxe