/ vm

Create a Linux Server for VM and manage through the web with KVM + Kimchi + Wok

Kimchi is an HTML5 based management tool for KVM. It is designed to make it as easy as possible to get started with KVM and create your first guest. - Kimchi project

In this tutorial, I'll show you how to create a Linux Server to manage VMs (Virtual Machines) through the web.

About the girl in the cover image, she is using a red hat... Red Hat... RedHat... Do you got it?

Requirements

We'll use the KVM as our virtualization hypervisor tool. Your system require virtualization technologies:

  • an Intel processor with the Intel VT-x and Intel 64 virtualization extensions for x86-based systems; or
  • an AMD processor with the AMD-V and the AMD64 virtualization extensions.

You can find more information at official RedHat website.

Execute the command below and check it if return some value. If returns so your hardware has support for KVM's hypervisor:

grep -E 'svm|vmx' /proc/cpuinfo

Environment

In this tutorial I'll show you how to prepare and install kimchi, wok and ginger-base on Ubuntu 16.04 but it should work perfectly with Ubuntu 14.04 too.

ONE BUG HAS BEEN FOUND WITH UBUNTU 18.04. A new release wasn't created yet. Please, use Ubuntu 16.04 or 14.04.

So prepare a clean machine with Ubuntu 16.04. This machine will be your server so could be good choose some different flavor of Ubuntu. If you're an experience Linux user you can choose the Ubuntu Server 16.04 or if you need a GUI (Graphic User Interface) the Xubuntu 16.04 can be a perfect choice to you cause it's lightweight, intuitive and beautiful desktop environment.

What will be installed?

KVM

"Kernel-based Virtual Machine (KVM) is an open source virtualization technology built into Linux®. Specifically, KVM lets you turn Linux into a hypervisor that allows a host machine to run multiple, isolated virtual environments called guests or virtual machines (VMs)." What is KVM? - RedHat

Kimchi

"Kimchi is an HTML5 based management tool for KVM. It is designed to make it as easy as possible to get started with KVM and create your first guest.

Kimchi manages KVM guests through libvirt. The management interface is accessed over the web using a browser that supports HTML5." - Kimchi project

Wok

"Wok is a cherrypy-based web framework with HTML5 support originated from Kimchi. It can be extended by plugins which expose functionality through REST APIs." - Wok project

Ginger base

"Ginger Base is an open source base host management plugin for Wok (Webserver Originated from Kimchi), that provides an intuitive web panel with common tools for configuring and managing the Linux systems." - Ginger project

Installation

Update your system repository and your system packages:

# sudo apt-get update
# sudo apt-get dist-upgrade -y
# sudo apt-get autoremove -y

Install the nginx. This is a hack cause some bugs was found during the original installation process:

# sudo apt-get install -y nginx

Install the wget. It'll be used to download the kimchi, wok and gingerbase packages:

# sudo apt-get install -y wget

Now create a new dir, go to there and download the kimchi, wok and gingerbase packages:

$ mkdir -p kimchi-packages
$ cd kimchi-packages
$ wget https://github.com/kimchi-project/wok/releases/download/2.5.0/wok-2.5.0-0.noarch.deb
$ wget http://kimchi-project.github.io/gingerbase/downloads/latest/ginger-base.noarch.deb
$ wget https://github.com/kimchi-project/kimchi/releases/download/2.5.0/kimchi-2.5.0-0.noarch.deb

Install the packages. After install some errors will raise telling that some dependencies wasn't found. The second command will fix it and install all dependencies:

# sudo dpkg -i *.noarch.deb
# sudo apt-get install -f

Start the processes

As default the Ubuntu enable the services from packages during the installation process. So the kimchi dependencies are already enable but not started.

Restart you system in order to start all services and check if everything is working:

# sudo shutdown -r 0

Access

Now you can access the kimchi web interface at:

https://127.0.0.1:8001

An error message related to certificate validation will be showed. This happens cause you are using HTTPS without a domain name without a pubic IP address and a signed certificate. If you want to learn more check the video Encryption as Fast As Possible from Techquickie.

Just add the address to Ignore list of your browser and go to the login page.

The login and password are the same as Linux users. If you want to add more users to Kimchi you just need to add new users Linux system. This authentication method are called PAM authentication. You can learn more about at RedHat: Chapter 2. Using Pluggable Authentication Modules (PAM)

Referencies

Create a Linux Server for VM and manage through the web with KVM + Kimchi + Wok
Share this