Building blocks for managing virtualized systems

Daniel P. Berrangé

Overview

Stable, standard, simple application APIs

Local administration & control tools

Services for constructing policy

libVirt API

Stable, standard, simple

Interface to the hypervisor

Library for application development

Community directed project (http://libvirt.org)

LGPL license

libVirt: Stable API

Isolation from Xen hypervisor changes

Isolation from XenD / XenStoreD changes

Stable library API

Error handling

libVirt: Standard API

Vendor neutral library

Hypervisor portable (QEMU, L4, ...)

IBM & Novell CIM providers

Well-defined XML hardware definition

Distributed in Fedora Core 5+

libVirt: Simple API

Privileged or unprivileged (read only) usage

Core C API

Python & Perl bindings

Shell scriptable tool

Tools

Local administration

Developer / QA assistance

Layer above libVirt APIs

virsh

Exposes libVirt functionality

Command line administration tool

Interactive administrator shell

Scriptable batch operations

Distributed with libVirt in Fedora Core 5+

gnome-applet-vm

Desktop panel applet

Status of active virtual machines

Built using libVirt

Distributed in Fedora Core 5+

Interface to manager via DBus

gnome-virt-manager

Virtual machine management

Local desktop GUI tool

Live resource utilization graphs

Hardware configuration & tuning

Graphical guest OS console

Services

Higher level services for applications

Stateful interaction with guest OS

Interface for remote services

Co-operating building blocks

Services: Monitoring

Hypervisor resource utilization

Guest OS kernel statistics

Application performance statistics

Feed to desktop manager application

Feed to policy daemon

Services: Events

Analyse performance statistics

Generate events for abnormal conditions

Asynchronous hypervisor events

Application event feed from guest OS

Execute scripts associated with events

Services: Resource Policy

VM resource allocation profiles

Required hardware capabilities

Runtime execution SLA

Hypervisor, realtime policy

Local host, live policy

Remote host, long term policy

Review

libVirt - Stable, simple, standard APIs

Tools - local administration & developer / QA

Services – performance, events, resources

- Member of Emerging Technologies Team

- Talk for 40 minutes

- Time for Questions at the end

- Demos at the Red Hat booth

To discuss 3 layers in the stack

* libvirt as the standard API for development of applications managing Xen.

* Local administration tools focused on system administrators, and desktop developers

* Services provided to assist in defining & implementing runtime policy

*Provides a generic API for interacting with the hypervisor.

* Enables developers to build applications which interact with the hypervisor

* Started by Daniel Viellard as an inclusive community driven project.

* LGPL license allows vendors to use the APIs in existing closed source applications

* Xen tools are not yet providing a long term stable API /ABI at this time. LibVirt isolates applications from changes in the Xen tools

* App has to choose between HV, XenD or XenStore APIs / protocols. XenD protocol under groing major changes from (SEXPR to XML-RPC).

* libVirt provides a single ELF library API in C which is versioned & provides a stable interface

* The error conditions for each API are well formally defined & easily handled

* Defines a clear format for defining virtual machine hardware – compare to raw python code(config) used by in XM

* Founded by Red Hat, but not controlled by RH. Operated as a independant community project (cf libxml, and GNOME).

* Developers from Novell & IBM prototyping CIM providers based on libvirt API (xen-cim list)

* Driver API allows portability of libVirt to other hypervisor impls. Eg, QEMU, “mock” test library

*libVirt distributed since Fedora Core 5, and wil lbe in RHEL-5

* Allows either full read/write connection (if app has privileged access to HV), or a read-only connection if app does not have sufficient privileges.

* Core API is written in C, with language specific bindings built on top

* Language bindings currently provides for Python and Perl

* The virsh tool also provides basic shell scripting capability

* Tools for local system adminsitration tasks

* Tools aimed at developing using virt on a desktop system

* Aimed at testers using virt to QA products on variety of Oss

* All tools built using the libvirt APIs

* Exposes all the libvirt functionaity via a simple command line administration tool

* Interactive shell for administrators

* Batch scriptable operation for automating administrative jobs / tasks

* Distributed as standard part of libVirt in Fedora Core 5

* Preferred tool for local VM administration tasks. To replace 'xm

* A light weight GNOME panel applet

* Provides summary of the status of active virtual machines on the host

* Shows CPU utilization of each domains

* Built using the libVirt APIs

* Distributed with Fedora Core 5

* See a demo at the virtualization booth

* Interfaces with full management tools via Dbus API – create new VM, edit VM, launch VM console, etc.

* Tool for managing virtual machines

* Local desktop GUI tool, aimed at developers / test teams.

* Live updated graphs of domain CPU, memory, network, disk utilization statistics

* Graphic console to the guest machine

* Hardware configuration and performance tuning

* Exports a Dbus API allowing applet to display key windows / perform tasks

* Broader ecosystem of services useful in managing virtual machines

* Most in early planning stages of development

* Some use libVirt, but are useful outside arena of virtualization

* Facilitate definition and implementation of system / VM farm policy

* Provide interaction outside scope of single host

* Hypervisor provides metrics on CPU time slice allocated to a VM. Cannot give finer utilization breakdown

* Agent in guest OS collects & distributes stats on OS utilization

* Channel to allow applications to feed in data

* API for applications to transmit & receive stats feeds – feed into manage app, or policy daemon

* Distributed web of nodes across data center

* Only provides data formatting & transport - integrate with external tools – RRDtool, libstatgrab, libVirt, ganglia, etc

* Define conditions to measure against VM resource statistics

* Generate events when “interesting” conditions are satisfied

* Feed events async from HV (eg VM started, stopped ,paused, etc)

* Feed application events from guest OS via spectre

* Associate shell scripts with events allowing automation of responses when abnormal conditions arise – shutdown VM, notify pager, adjust resource usage

* Define the capabilities of a host – eg, 32/64 bit, PAE/non-PAE, architecture, free memory / cpu, SAN connectivity

* Template VM requirements, “Dedicated 1 CPU, share of 2nd CPU”. “Share all CPUs”.

* Policy measures host usage against VM requirement – decline / allow startup/migration of VM

* Integrate event & monitoring system to measure effective utiilziation of system

* All applications engaged in VM management should use libvirt - the stable, simple & standard API

* Command line tools provide easy scripting and automation of tasks.

* GUI tools targetted at developers allow monitoring & managmenet of Vms on a local host.

* Services being developed allow for distributed monitoring, event dispatch, and definition / implenentation of resource policy

* libvirt.org

* Recommend Rik van Riel talk on Thursday 3.30

2005-12-15T16:36:48