Categories: TutorialsUbuntu

How to setup a hypervisor in ubuntu 16.04 with KVM and Kimchi

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]

Update and upgrade your web server

sudo apt-get update && sudo apt-get upgrade -y

Install KVM and all dependencies required

sudo apt-get install qemu qemu-kvm libvirt-bin

Verify the kvm installation

$ kvm-ok

INFO: /dev/kvm exists
KVM acceleration can be used

Installing Kimchi:

sudo apt-get install nginx

wget https://github.com/kimchi-project/kimchi/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

Installing
Sponsored
dependencies:

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

sudo apt-get install -f

sudo service wokd start

sudo dpkg -i ginger-base.noarch.deb

sudo apt-get install -f

sudo service wokd restart

#reboot here
sudo shutdown -r now

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

sudo apt-get install -f

#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

Now lets create our first VM, we need to log in using your normal ubuntu username and password.

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

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.

Sponsored

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

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.

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
Ubuntu Server Admin

Recent Posts

Cut data center energy costs with bare metal automation

Data centers are popping up everywhere. With the rapid growth of AI, cloud services, streaming…

18 hours ago

Build the future of *craft: announcing Starcraft Bounties!

Our commitment to building a thriving open source community is stronger than ever. We believe…

18 hours ago

NodeJS 18 LTS EOL extended from April 2025 to May 2032 on Ubuntu

The clock was ticking: Node.js 18’s upstream End of Life (EOL) The OpenJS Foundation is…

18 hours ago

Native integration now available for Pure Storage and Canonical LXD

June 25th, 2025 – Canonical, the company behind Ubuntu, and Pure Storage, the IT pioneer…

2 days ago

Revolutionizing Web Page Creation: How Structured Content is Slashing Design and Development Time

Co-authored with Julie Muzina A year ago, during our Madrid Engineering Sprint, we challenged ourselves…

3 days ago

Ubuntu Weekly Newsletter Issue 897

Welcome to the Ubuntu Weekly Newsletter, Issue 897 for the week of June 15 –…

3 days ago