Real-world use case
You want to manage your KVM hypervisor from a simple web interface: discover how to install and configure Kimchi.
The Kimchi project
Having a simple, accessible management tool for Kernel-based Virtual Machine (KVM) is possible with Kimchi. Developed in Python, installing the Kimchi project is accessible to everyone, and a few commands are enough to get a ready-to-use platform. Web browser access is ideal, the project is licensed under LGPL and was incubated by the larger oVirt project. Let's install and configure Kimchi on CentOS 7 together.
Table of contents
- The Kimchi project's modules
- Installing the Kimchi project (CentOS)
- Changing wok's listening port (nginx)
- Conclusion
The Kimchi project's modules
The project's main engine is Wok, a web framework based on Cherrypy. It can be extended with plugins that expose features via REST APIs:
- Kimchi (virtualization management).
- Ginger Base (basic host management).
- Ginger (system administration).
Installing the Kimchi project (CentOS)
The Wok interface runs on a web server, here we add the nginx repository:
nano /etc/yum.repos.d/nginx.repo
Let's add the following content:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
Let's download the nginx package signing key:
wget https://nginx.org/keys/nginx_signing.key
Let's install the nginx package signing key:
rpm --import nginx_signing.key
Let's install the dependencies for wok and Kimchi:
yum install nginx gcc make autoconf automake gettext-devel git rpm-build libxslt python-cherrypy python-cheetah PyPAM m2crypto python-jsonschema python-psutil python-ldap python-lxml openssl python-websockify logrotate
Let's download wok and Kimchi:
wget https://github.com/kimchi-project/wok/releases/download/2.5.0/wok-2.5.0-0.el7.centos.noarch.rpm
wget https://github.com/kimchi-project/kimchi/releases/download/2.5.0/kimchi-2.5.0-0.el7.centos.noarch.rpm
Let's install wok and Kimchi:
yum install wok-2.5.0-0.el7.centos.noarch.rpm kimchi-2.5.0-0.el7.centos.noarch.rpm
The management interface is now accessible from any interface (e.g.: 127.0.0.1:8001). It's also possible to make port 8001 accessible externally with CentOS's firewall:
firewall-cmd --zone=public --add-port=8001/tcp --permanent
Or with UFW:
ufw allow 8001/tcp
Or with iptables:
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 8001 -j ACCEPT
Installing the dependencies for ginger-base:
yum install hddtemp libuser-python python-augeas python-netaddr python-ethtool python-ipaddr python-magic tuned lm_sensors python2-crypto
Downloading ginger-base and ginger:
wget http://kimchi-project.github.io/gingerbase/downloads/latest/ginger-base.el7.centos.noarch.rpm
wget http://kimchi-project.github.io/ginger/downloads/latest/ginger.el7.centos.noarch.rpm
Installing ginger-base and ginger:
yum install ginger-base.el7.centos.noarch.rpm ginger.el7.centos.noarch.rpm
Changing wok's listening port in nginx
The wok interface runs on port 8001, here's how to change the listening port:
Let's edit the wok.conf configuration file in nginx:
nano /etc/nginx/conf.d/wok.conf
Let's look for the following line:
listen 0.0.0.0:8001 ssl;
Let's replace the port with:
listen 0.0.0.0:443 ssl;
Next, we look for the line:
proxy_redirect http://127.0.0.1:8010/ https://$host:8001/;
Let's replace the port like this:
proxy_redirect http://127.0.0.1:8010/ https://$host:443/;
Let's now edit the wok.conf file in wok:
nano /etc/wok/wok.conf
Let's uncomment proxy_port:
#proxy_port = 8001
Let's change the value:
proxy_port = 443
Let's restart the wokd and nginx services:
service wokd restart
service nginx restart
The wok console is accessible from https://localhost, or if you've opened port 443: https://your\_ip.




