kimchi_v2

39
© 2009 IBM Corporation Kimchi: An On-Ramp Virtualization Management Application Zhengsheng Zhou, Shaohe Feng, Wenruo Lv – IBM Linux Technology Center – Open Virtualization 20 Aug 2014

Upload: carlos-torres-hanna

Post on 13-Dec-2015

214 views

Category:

Documents


1 download

DESCRIPTION

Manual de la interfaz KIMCHI para KVMS.

TRANSCRIPT

Page 1: kimchi_v2

© 2009 IBM Corporation

Kimchi: An On-Ramp Virtualization Management Application

Zhengsheng Zhou, Shaohe Feng, Wenruo Lv – IBM Linux Technology Center – Open Virtualization20 Aug 2014

Page 2: kimchi_v2

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

Page 3: kimchi_v2

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

Page 4: kimchi_v2

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

Page 5: kimchi_v2

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

Page 6: kimchi_v2

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

Page 7: kimchi_v2

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

Page 8: kimchi_v2

8 © 2014 IBM Corporation

Kimchi

Templates and VMs - A List View

Page 9: kimchi_v2

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)

Page 10: kimchi_v2

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)

Page 11: kimchi_v2

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

Page 12: kimchi_v2

12 © 2014 IBM Corporation

Kimchi

Storage – A List View

Page 13: kimchi_v2

13 © 2014 IBM Corporation

Kimchi

Storage – Supported Back-Ends

■ Directory

■ NFS

■ iSCSI

■ SCSI/FC

■ Logical Volume

Page 14: kimchi_v2

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

Page 15: kimchi_v2

15 © 2014 IBM Corporation

Kimchi

Storage - NFS example

■ Using an NFS server for the first time

■ Kimchi probes all the usable exports

Page 16: kimchi_v2

16 © 2014 IBM Corporation

Kimchi

Storage - NFS example

■ Using the NFS server for the second time

■ Kimchi presents the user with known NFS servers

Page 17: kimchi_v2

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

Page 18: kimchi_v2

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)

Page 19: kimchi_v2

19 © 2014 IBM Corporation

Kimchi

Virtual Networks - Private Virtual Network

nic

VM1

br1

nic

VM2nic

VM3

br2

nic

VM4

eth1Host

Page 20: kimchi_v2

20 © 2014 IBM Corporation

Kimchi

nic

VM1

br1

nic

VM2nic

VM3

br2

nic

VM4

eth1Host

NAT

Virtual Networks - Masqueraded Virtual Network

Page 21: kimchi_v2

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

Page 22: kimchi_v2

22 © 2014 IBM Corporation

Kimchi

Virtual Networks

■ Creating a Virtual Network

Page 23: kimchi_v2

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

Page 24: kimchi_v2

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

Page 25: kimchi_v2

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

Page 26: kimchi_v2

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

Page 27: kimchi_v2

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”, ...}]

Page 28: kimchi_v2

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

Page 29: kimchi_v2

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

Page 30: kimchi_v2

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

Page 31: kimchi_v2

31 © 2014 IBM Corporation

Kimchi

Demo

■ Live Demo

■ Backup Screenshots

Page 32: kimchi_v2

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! 谢谢!

Page 33: kimchi_v2

33 © 2014 IBM Corporation

Kimchi

Create a VM – Step[0] – Select an ISO to Create a Template

Page 34: kimchi_v2

34 © 2014 IBM Corporation

Kimchi

Create a VM – Step[1] (optional) – Customize the Template

Page 35: kimchi_v2

35 © 2014 IBM Corporation

Kimchi

Create a VM – Step[2] – Create a VM from the Template

Page 36: kimchi_v2

36 © 2014 IBM Corporation

Kimchi

VM Display Inside Browser

Page 37: kimchi_v2

37 © 2014 IBM Corporation

Kimchi

Host Management – Basic Information

Page 38: kimchi_v2

38 © 2014 IBM Corporation

Kimchi

Host Management – Software Updates & Repositories

Page 39: kimchi_v2

39 © 2014 IBM Corporation

Kimchi

Host Management - Ginger