kvm Hypervisor on CentOS7

0
(0)

Installing KVM on CentOS 7


KVM is an open source hardware virtualization software that allows Linux-based and Windows-based virtual machines to run simultaneously. Called a Kernel-based Virtual Machine, KVM is an alternative to VMware ESXi and Xen, where by installing the KVM package, loading the KVM module into the current kernel and forming a hypervisor from a Linux machine.

kvm_diagram

This article shows how to install a KVM hypervisor on CentOS 7.x and RHEL 7.x to install virtual machines afterwards.

Installation

Before proceeding with the KVM installation, check whether the CPU of the system supports hardware virtualization. To do this, perform the following command in the root shell

The word vmx or svm should appear in the output, otherwise the CPU does not support virtualization. It may be worth going into the BIOS system to activate the VT-x boot setting.

The KVM packages and their modules are installed.

The KVM service can now be activated and started.

We check if the KVM modules have actually been started.

If there is a Minimal CentOS 7 or RHEL 7 installation, the virt-manager does not start, so we still have to install X-Window.

Restart the server and then try to start the virtual manager.

Before we start deploying VMs, let’s first create a bridge interface. The bridge interface is required if you want to access virtual machines from outside the network to the hypervisor. In our example, the Ethernet interface is called ifcfg-eth0.

Now edit the interface file ifcfg-eth0 and enter the following:

Edit the ifcfg-br0 bridge file and specify the following:

Restart the network service to activate the bridge.

Check the bridge interface with the following command:

If you prefer to make the Network Manager, you can create the bridge interface as follows:

Virtual machines can now be created either from the command line with the virt-install command or from the GUI virt-manager.

In the GUI, go to the File option and click New virtual Machine.

virtual_machine_manager

The virtual machine is now created with the help of the wizard.

Create virtual machines from the command line:

From the virtual manager, the VMs are booted up and managed, the status and system load is displayed, similar to what you know from vSphere.

kvm_virtual_manager
Illustration: KVM virtual Manager

Furthermore, virt-manager from Cygwin is executable in Windows 10, for this Cygwin64 must be installed with the Xorg server and virt-manager, with the virt-manager one connects to the KVM hypervisor.

virt-manager
Illustration: Cygwin virt-manager Inindung
virt-manager-new
Illustration: Cygwin virt-manager

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Leave a Reply

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