Hands-On Kernel-Based Virtual Machine (KVM)

Hands-On Kernel-Based Virtual Machine (KVM)

Khaleel Ahmad, Ahamed Shareef
Copyright: © 2018 |Pages: 12
DOI: 10.4018/978-1-5225-2785-5.ch007
OnDemand:
(Individual Chapters)
Available
$37.50
No Current Special Offers
TOTAL SAVINGS: $37.50

Abstract

In this chapter, we will discuss in the introduction to KVM, how to create KVM, both command line and using GUI, briefly on KVM management. This chapter also describes the pre-requisites and a brief introduction on all the pre-requisite software. KVM utilizes the CPU virtualization technology on modern AMD and Intel processors, known as AMD-V and Intel-VT. KVM a is free virtualization solution and does not require any licensing, but if your CPU does not support virtualization KVM will be a waste of time. Linux OS, which is used in this chapter, is Cent OS.
Chapter Preview
Top

1. Introduction

KVM (Kernel Based Virtual Machine) this is virtualization software to install and run multiple guest Operating Systems. It uses the hardware virtualization feature to run multiple OS. It is a virtualization infrastructure for the Linux kernel; it was merged into the Linux kernel mainline in kernel version 2.6.20 (“Kernel-based Virtual Machine,” n. d.).

KVM can be done in two ways,

  • 1.

    KVM using Command Line

  • 2.

    KVM using GUI tools

In this Hands-on chapter, we will see how to install and run KVM, using both command line and GUI tools.

Pre-Requisite

The supported Operating Systems are: Linux, Windows, Solaris, Haiku, REACT OS and more.

KVM will work only if the CPU has a support of hardware virtualization. You can verify if your CPU supports KVM by running the following command on terminal:

[root@server ~]#egrep '(vmx|svm)' /proc/cpuinfo

This command will return output like the one displayed below, if no output is displayed, then your CPU does not support virtualization, if the output has ‘vmx’ or ‘svm’ then your CPU supports hardware virtualization.

Sample Output
flags         : fpuvme de psetscmsrpaemce cx8 apicsepmtrrpgemcacmov pat pse36 clflushdtsacpi mmx fxsrsse sse2 ssht tm syscallnx lm constant_tscpni monitor ds_cplvmxest tm2 ssse3 cx16 xtprlahf_lm

If you have a Windows OS, you can still use ‘Oracle VM VirtualBox’ on which you can install your Linux OS where we can create KVMs and for such users, CPU virtualization can also be verified using ‘Intel(R) Processor ID Utility’. Navigate to CPU technologies tab and check the value of Intel(R) virtualization technology will be either yes/no shows your CPU’s support for virtualization. Only unsupported combination is 64-bit guest on a 32-bit host. Make sure that the Virtualization Technology (VT) is not disabled in your Computer’s BIOS (“How to Create Virtual Machines in Linux Using KVM,” n.d.).

Table 1.
Hardware requirement
System ComponentMinimum RequirementRecommended
CPUAMD 64-bit / Intel 64-bit, 1.5GHz.
[allows 32-bit and 64-bit guests (KVMs)]
AMD-V 64-bit / Intel-VT 64-bit, 2 GHz plus multi core CPU.
Memory2GB of RAM for host plus additional RAM for guests.6GB of RAM for host plus 1GB RAM for each guest.
Disk Space6GB for guest10GB plus for guest
Network Interface Cards (NICs)One (eth0) → network managementTwo (eth0, eth1) → network management, virtual machine data network
Top

2. Installing Kvm On Centos

We are using CentOS to show how to install KVM, now we have the minimum requirement to deploy virtual platform on our host, but we also still have useful tools to administrate our virtual machines such as:

Complete Chapter List

Search this Book:
Reset