Kimchi: An On-Ramp Virtualization Management Application · Kimchi: An On-Ramp Virtualization...
Transcript of Kimchi: An On-Ramp Virtualization Management Application · Kimchi: An On-Ramp Virtualization...
© 2009 IBM Corporation
Kimchi: An On-Ramp Virtualization Management Application
Zhengsheng Zhou, Shaohe Feng, Wenruo Lv – IBM Linux Technology Center – Open Virtualization20 Aug 2014
2 © 2014 IBM Corporation
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)
IBM Presentation Template Full Version
3 © 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
4 © 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– Português– 中文
■ Extensible– Back-end: plugins, API– Front-end: tabs
Userspace Libs, Tools
VM, Template, Storage, Network, ... Controllers (Python)
CherryPy (Web Application Server)
VM, Template, Storage, Network, ... Models (Python)
UI (HTML 5, Javascript,CSS, ...)
libvirt
VM VM VM
5 © 2014 IBM Corporation
Kimchi
Kimchi Architecture – Plugin Framework
VM Controllers
VM Models
/vms/vms/vm_x/ifaces
/vms/vm_x/storages
Storage Controllers
Storage Models
/storagepools/storagepools/poolx
Plugin Controllers
Plugin Models
/plugins/plugin_x/plugins/plugin_x/foo
CherryPy: Accept Request and Dispatch
VM UI Tab Storage UI Tab Plugin_x UI Tab
Front-end
Back-end
6 © 2014 IBM Corporation
Kimchi
Kimchi Architecture - Proxies
■ Nginx is a reverse proxy, run as normal user
■ Kimchi daemon (CherryPy) runs as root
■ WebSockify translates between HTTPs and TCP
■ Back-end sets VNC/Spice ticket to prevent anonymous VM console access
Nginx
WebSockify
CherryPyBrowserhttps
Browser QEMUhttps VNC
Spice
7 © 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
8 © 2014 IBM Corporation
Kimchi
Templates and VMs - A List View
9 © 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)
10 © 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)
11 © 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
12 © 2014 IBM Corporation
Kimchi
Storage – A List View
13 © 2014 IBM Corporation
Kimchi
Storage – Supported Back-Ends
■ Directory
■ NFS
■ iSCSI
■ SCSI/FC
■ Logical Volume
14 © 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
15 © 2014 IBM Corporation
Kimchi
Storage - NFS example
■ Using an NFS server for the first time
■ Kimchi probes all the usable exports
16 © 2014 IBM Corporation
Kimchi
Storage - NFS example
■ Using the NFS server for the second time
■ Kimchi presents the user with known NFS servers
17 © 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
18 © 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)
19 © 2014 IBM Corporation
Kimchi
Virtual Networks - Private Virtual Network
nic
VM1
br1
nic
VM2nic
VM3
br2
nic
VM4
eth1Host
20 © 2014 IBM Corporation
Kimchi
nic
VM1
br1
nic
VM2nic
VM3
br2
nic
VM4
eth1Host
NAT
Virtual Networks - Masqueraded Virtual Network
21 © 2014 IBM Corporation
Kimchi
nic
VM1
br1 br2
nic
VM2
eth1Host1 bond0
eth0
Vlan1 Vlan2
nic
VM3
br1 br2
nic
VM4
eth1Host2 bond0
eth0
Vlan1 Vlan2
Virtual Networks - Aggregated Public Network
22 © 2014 IBM Corporation
Kimchi
Virtual Networks
■ Creating a Virtual Network
23 © 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
24 © 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
25 © 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
26 © 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
27 © 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
BrowserKimchi
Front-end
CherryPyKimchi
Back-end
GET host/vms
libvirtlistAllDomains()
200 OK JSON
[{“name”:“vm1”, ...}]
28 © 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
29 © 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
30 © 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
31 © 2014 IBM Corporation
Kimchi
Demo
■ Live Demo
■ Backup Screenshots
32 © 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 [email protected]
http://lists.ovirt.org/mailman/listinfo/kimchi-devel– User Feedback [email protected]
http://lists.ovirt.org/mailman/listinfo/kimchi-users
Thanks for attending! Obrigado! 谢谢!
33 © 2014 IBM Corporation
Kimchi
Create a VM – Step[0] – Select an ISO to Create a Template
34 © 2014 IBM Corporation
Kimchi
Create a VM – Step[1] (optional) – Customize the Template
35 © 2014 IBM Corporation
Kimchi
Create a VM – Step[2] – Create a VM from the Template
36 © 2014 IBM Corporation
Kimchi
VM Display Inside Browser
37 © 2014 IBM Corporation
Kimchi
Host Management – Basic Information
38 © 2014 IBM Corporation
Kimchi
Host Management – Software Updates & Repositories
39 © 2014 IBM Corporation
Kimchi
Host Management - Ginger