Zhengsheng Zhou, Shaohe Feng, Wenruo Lv IBM Linux Technology Center Open Virtualization
20 Aug 2014
Kimchi: An On-Ramp Virtualization
Management Application
2009 IBM Corporation
IBM Presentation Template Full Version
Kimchi
Kimchi: Yet Another KVM Management Tool?
Various existing excellent virtualization management tools
API and command line: libvirt, virsh
GUI: virt-manager, gnome boxes
Cloud: oVirt, OpenStack, ...
Why do we need Kimchi?
What if the user
Is new to virtualization, but experienced in traditional IT management
Wants to evaluate KVM
Manages a few hosts and shared storage devices
Wants to use NAT, VLAN, Linux bridge, bonding, or even Open vSwitch
Wants access to management UI and VM display from Web
Wants a RESTful API to develop a KVM-based management solution
Doesn't want to setup a large complex cloud environment
Kimchi, a simple and smart KVM management tool with HTML5 interface and a REST API
LGPL 3 (Back-end), Apache License 2 (Front-end)
2014 IBM Corporation
Kimchi
Agenda
Kimchi Architecture
Templates and VMs
Storage Back-end Support
Various Virtual Networks Support
Host Management
REST API
Work In Progress
DEMO
Q&A
2014 IBM Corporation
Kimchi
Kimchi Architecture
Design Goals
Simple while Smart
Thin but provide
necessary intelligence
Cross-Platform
Fedora, RHEL,
Ubuntu, OpenSuSe
IE 10+, Chrome, Opera,
Firefox, Safari
Support I18N
English
Portugus
Extensible
Back-end: plugins, API
Front-end: tabs
CherryPy (Web Application Server)
VM, Template,
Storage, Network, ...
Controllers (Python)
UI (HTML 5,
Javascript,
CSS, ...)
VM, Template, Storage, Network, ...
Models (Python)
libvirt
VM
Userspace Libs, Tools
VM
VM
2014 IBM Corporation
Kimchi
Kimchi Architecture Plugin Framework
Front-end
VM UI Tab
Storage UI Tab
Plugin_x UI Tab
Back-end
CherryPy: Accept Request and Dispatch
/vms
/vms/vm_x/ifaces
/vms/vm_x/storages
/storagepools
/storagepools/poolx
/plugins/plugin_x
/plugins/plugin_x/foo
VM Controllers
Storage Controllers
Plugin Controllers
VM Models
Storage Models
Plugin Models
2014 IBM Corporation
Kimchi
Kimchi Architecture - Proxies
Nginx is a reverse proxy, run as normal user
Kimchi daemon (CherryPy) runs as root
Browser
Nginx
CherryPy
WebSockify translates between HTTPs and TCP
Back-end sets VNC/Spice ticket to prevent anonymous VM console access
Browser
https
https
WebSockify
VNC
Spice
QEMU
2014 IBM Corporation
Kimchi
Agenda
Kimchi Architecture
Templates and VMs
Storage Back-end Support
Various Virtual Networks Support
Host Management
REST API
Work In Progress
DEMO
Q&A
2014 IBM Corporation
Kimchi
Templates and VMs - A List View
2014 IBM Corporation
Kimchi
Templates and VMs
Template: Pre-defined VM configuration collection
CPU count, memory size, disk size, disk type
Storage pool
Graphics (VNC, Spice)
Network connectivity type (isolated, NAT, bridged)
VM: A libvirt domain
Compatible with other libvirt-based tools
Life-cycle operation
Manage extra disks (Images are reference counted)
Manage extra network interfaces
Authorization: assign users/groups to a VM
Graphics: noVNC, Spice (WebSocket and HTML5-based)
2014 IBM Corporation
Kimchi
Templates and VMs
Steps to Create the first VM
Step[0]: Select an OS installation ISO
Step[1]: Kimchi generates a template best configured for the guest OS
Step[2]: Create a VM from the template, Kimchi automatically allocates new disk
Step to Create more VMs
Goto Step[2]
ISO
Kimchi scans local ISOs in existing storage pools or /
Support using a remote ISO file directly (http://example.com/example.iso)
10
2014 IBM Corporation
Kimchi
Agenda
Kimchi Architecture
Templates and VMs
Storage Back-end Support
Various Virtual Networks Support
Host Management
REST API
Work In Progress
DEMO
Q&A
11
2014 IBM Corporation
Kimchi
Storage A List View
12
2014 IBM Corporation
Kimchi
Storage Supported Back-Ends
Directory
NFS
iSCSI
SCSI/FC
Logical Volume
13
2014 IBM Corporation
Kimchi
Storage On-Ramp
Common Use Cases
User often create storage pool from the same server
One NFS server with multiple exports, create pool from each export path
One iSCSI server with multiple LUN, each can be used as a pool
Long export path and long IQN
Kimchi
Remembers every storage server it used
Auto probes every target on the storage server
14
2014 IBM Corporation
Kimchi
Storage - NFS example
Using an NFS server for the first time
Kimchi probes all the usable exports
15
2014 IBM Corporation
Kimchi
Storage - NFS example
16
Using the NFS server for the second time
Kimchi presents the user with known NFS
servers
2014 IBM Corporation
Kimchi
Agenda
Kimchi Architecture
Templates and VMs
Storage Back-end Support
Various Virtual Networks Support
Host Management
REST API
Work In Progress
DEMO
Q&A
17
2014 IBM Corporation
Kimchi
Virtual Networks
Three Kinds of Networks from User's Perspective
Private Virtual Network (Isolated):
Masqueraded Virtual Network (Outside-reach):
Aggregated Public Network (In-outside Reach):
Macvtap (Default) + VLAN
Linux Bridge + VLAN
Open vSwitch (Work In Progress)
Bond (Planned)
18
2014 IBM Corporation
Kimchi
Virtual Networks - Private Virtual Network
VM1
VM2
VM3
VM4
nic
nic
nic
nic
br1
Host
19
br2
eth1
2014 IBM Corporation
Kimchi
Virtual Networks - Masqueraded Virtual Network
VM1
VM2
VM3
VM4
nic
nic
nic
nic
br1
Host
br2
NAT
eth1
20
2014 IBM Corporation
Kimchi
Virtual Networks - Aggregated Public Network
VM1
VM2
VM3
VM4
nic
nic
nic
nic
br1
br2
br1
br2
Vlan1
Vlan2
Vlan1
Vlan2
Host1
eth0
21
bond0
eth1
Host2
eth0
bond0
eth1
2014 IBM Corporation
Kimchi
Virtual Networks
22
Creating a Virtual Network
2014 IBM Corporation
Kimchi
Agenda
Kimchi Architecture
Templates and VMs
Storage Back-end Support
Various Virtual Networks Support
Host Management
REST API
Work In Progress
DEMO
Q&A
23
2014 IBM Corporation
Kimchi
Host Management
Host Information
Distro, processor, memory
System statistics
CPU utilization, memory usage, disk I/O, network I/O
Software Updates
Repository Management
Debug Reports Generating
24
2014 IBM Corporation
Kimchi
Host Management - Ginger
Ginger: A Kimchi Plugin
Focused on IBM PowerKVM Host Management
Power firmware update
Configuration backup
Host network configuration (IP, mask, DNS, gateway, DHCP)
Switching power profiles (tuned:latency-performance, throughput-performance,
balanced, virtual-host, virtual guest, ...)
SAN adapters information
System sensors information
https://github.com/kimchi-project/ginger
25
2014 IBM Corporation
Kimchi
Agenda
Kimchi Architecture
Templates and VMs
Storage Back-end Support
Various Virtual Networks Support
Host Management
REST API
Work In Progress
DEMO
Q&A
26
2014 IBM Corporation
Kimchi
Kimchi API
Resource maps to URI
VM List: /vms
Particular VM: /vms/vm_name
NICs of a VM: /vms/vm_name/ifaces
Disks of a VM: /vms/vm_name/storages
Use standard HTTP methods (GET, PUT, POST, DELETE) to list, create, modify and delete
resources
Kimchi front-end communicates with back-end solely using API
Browser
Kimchi
Front-end
GET host/vms
200 OK JSON
CherryPy
Kimchi
Back-end
listAllDomains()
libvirt
[{name:vm1, ...}]
27
2014 IBM Corporation
Kimchi
Kimchi API - Example
curl -k -u root \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
'https://127.0.0.1:8001/networks'
API Documentation
docs/API.md
API Schema
src/kimchi/API.json
Wrapper in the Front-end
ui/js/src/kimchi.api.js
Everyone can use Kimchi API and
develop KVM management solutions
28
2014 IBM Corporation
Kimchi
Agenda
Kimchi Architecture
Templates and VMs
Storage Back-end Support
Various Virtual Networks Support
Host Management
REST API
Work In Progress
DEMO
Q&A
29
2014 IBM Corporation
Kimchi
Work In Progress
Host Device Passthru
Directly assign host devices to VM, improve performance
PCI devices, USB devices, SCSI LUNs
Properly handling IOMMU groups and device tree
Open vSwitch Support
Bootable Image Support
Planned
Discovering Kimchi peers
Guest live migration
Download ISO file
Display detected iSCSI targets
Asynchronous event notification
Network bonding configuration
30
2014 IBM Corporation
Kimchi
Demo
Live Demo
Backup Screenshots
31
2014 IBM Corporation
Kimchi
Q&A
Github: https://github.com/kimchi-project/kimchi
IRC: irc.oftc.net, Channel #kimchi
WIKI: https://github.com/kimchi-project/kimchi/wiki
Mail List
Development kimchi-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/kimchi-devel
User Feedback kimchi-users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/kimchi-users
Thanks for attending! Obrigado!
32
2014 IBM Corporation
Kimchi
Create a VM Step[0] Select an ISO to Create a Template
33
2014 IBM Corporation
Kimchi
Create a VM Step[1] (optional) Customize the Template
34
2014 IBM Corporation
Kimchi
Create a VM Step[2] Create a VM from the Template
35
2014 IBM Corporation
Kimchi
VM Display Inside Browser
36
2014 IBM Corporation
Kimchi
Host Management Basic Information
37
2014 IBM Corporation
Kimchi
Host Management Software Updates & Repositories
38
2014 IBM Corporation
Kimchi
Host Management - Ginger
39
2014 IBM Corporation