/ Ubuntu 18.04

Ubuntu server 18.04 as a Hypervisor using KVM and Kimchi for VM Management

How to install Kimchi in Ubuntu 18.04

Introduction:

In this guide, we will be making our own Hypervisor in Ubuntu 16.04 by installing KVM (Kernel-based Virtual Machine) as well as Kimchi, which is a free, open-source web-based virtualization management platform so we can manage our hypervisor easily through the web browser.

You can find more info on Kimchi here

Installing kvm
Connect to your server as the admin user via SSH.

ssh [email protected]r.server.ip

Update and upgrade your web server

sudo apt update && sudo apt upgrade -y

Install KVM and all dependencies required for Kimchi and Wok

sudo apt install qemu qemu-kvm libvirt-bin python-paramiko python-pil novnc python-libvirt python-ethtool python-ipaddr python-guestfs libguestfs-tools spice-html5 spice-html5 python-magic keyutils libnfsidmap2 libtirpc1 nfs-common rpcbind python-configobj python-parted -y

Verify the kvm installation

$ kvm-ok

This is what you should see if KVM is supported
INFO: /dev/kvm exists
KVM acceleration can be used

Installing Kimchi:

sudo apt install nginx -y

wget https://github.com/kimchi-project/kimchi/releases/download/2.5.0/wok-2.5.0-0.noarch.deb

wget https://github.com/kimchi-project/kimchi/releases/download/2.5.0/kimchi-2.5.0-0.noarch.deb

Installing dependencies:

sudo dpkg -i wok-2.5.0-0.noarch.deb

sudo apt install -f -y

sudo dpkg --ignore-depends=python-imaging -i kimchi-2.5.0-0.noarch.deb

#reboot here
sudo shutdown -r now

#If you have UFW enabled please add the port
sudo ufw allow 8001/tcp

Now open the web interface on

https://Server_IP:8001
You should see the following
Kimchi Login
Now lets create our first VM, we need to log in using your normal ubuntu username and password.
Kimchi
For testing we will download an Ubuntu Server image to the /var/lib/kimchi/isos directory which is the default path to the ISO repository

cd /var/lib/kimchi/isos

sudo wget http://releases.ubuntu.com/16.04.2/ubuntu-16.04.2-server-amd64.iso

Now from the web interface we go to Virtualization > Templates > + Add Template

In this case i am selecting, the 16.04.2 Template and then click on Create this should add a new template as shown below
Kimchi Template

Feel free to add more ram, CPU, disk space as desired using the actions > edit button, at this point, it is just a template and not yet a vm.

Now we will create a vm using this template.

From the web interface we go to Virtualization > Guests > + Add Guest

Then we choose the VM Name and the template to use and hit create.

Important Note: Do not include any spaces in your VM name or you will be unable to start your VM.

Kimchi Add Guest

Once this is done, it is time to start your VM by pressing the Actions Menu > Start option

That's it you now have a working Ubuntu VM running, you can press the view console link to access your VM's console.

Kimchi VM

Optional Change Port to 443:

Change the port in the Nginx Config

sudo nano /etc/nginx/conf.d/wok.conf

Look for the following line

listen 0.0.0.0:8001 ssl;

Change it to

listen 0.0.0.0:443 ssl;

Also locate inside of location / config

proxy_redirect http://127.0.0.1:8010/ https://$host:8001/;

Change this to

proxy_redirect http://127.0.0.1:8010/ https://$host:443/;

Change the port in the Wok config

sudo nano /etc/wok/wok.conf

Uncomment the following line

#proxy_port = 8001

Change it to

proxy_port = 443

If you have UFW enabled please add the port

sudo ufw allow 443/tcp

Restart Wok and Nginx

sudo service wokd restart
sudo service nginx restart

That is it now you can open the web interface on

https://Server_IP

10$ off on me with This Link, if you don't have your own server visit DigitalOcean servers starting at 5$ a month
10$ off on me with

Jaco Toledo

Jaco Toledo

Hi, I am a System Administrator that Lives in Jacksonville Florida and loves to experiment with anything IT, my favorite Linux Distro is Ubuntu I Love its simplicity.

Read More
Ubuntu server 18.04 as a Hypervisor using KVM and Kimchi for VM Management
Share this

Subscribe to UbuntuBoss: Easy Ubuntu Tutorials | How to for Ubuntu Linux