From: "Mark A. Williamson" Subject: Re: Automation scripts Date: Tue, 28 Sep 2004 23:59:51 +0000 Sender: xen-devel-admin@lists.sourceforge.net Message-ID: <200409282359.51892.mark.williamson@cl.cam.ac.uk> References: <200409280723.57130.pauld@cwa.co.nz> <200409272246.19464.mark.williamson@cl.cam.ac.uk> <200409280950.06268.pauld@cwa.co.nz> Reply-To: mark.williamson@cl.cam.ac.uk Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_3rfWBDKkO8Vt3Fo" Return-path: In-Reply-To: <200409280950.06268.pauld@cwa.co.nz> Content-Disposition: inline Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Paul Dorman Cc: xen-devel@lists.sourceforge.net List-Id: xen-devel@lists.xenproject.org --Boundary-00=_3rfWBDKkO8Vt3Fo Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline > I would certainly appreciated this. Then I can keep my automation roughly > in line with what's going to happen anyway, so I can move from my system to > the official one without too much pain. I'm certain the official one will > be much better anyhow :o) OK, here's some thoughts that clarify the existing control structure and what a cluster controller ought to do. I attach an old design doc from before the current set of control tools, which I've updated to correspond better to reality. The crux of the cluster controller is that it really consists of two parts: * Stuff to manage the cluster resources in a uniform way (e.g. migration, start / stop domains anywhere in the cluster, monitor domains... + the console concentrator) * Stuff to manage VMs (image templates, etc) more effectively. These are pretty independent. We imagine all state being stored in an SQL server. Hopefully, the SQL server can provide us replication of this data, etc. On top of this, command line (and at some stage) web-based interfaces would be required to run the show. A lot of the code shouldn't be too technically difficult, just time-consuming. The SQL database will need to be carefully designed. We would probably tend to implement daemon code in Python, like all the rest of the tools. We would love to see contributions in this area. HTH, Mark > Another little query about the LVM stuff: I'm using kernel 2.6 so does this > rule out the LVM option? The package note for Sarge's LVM2 says that it > works with 2.4 only. > > Thanks Mark. > > Regards, > Paul > > On Tuesday 28 September 2004 09:46 am, Mark A. Williamson wrote: > > > I wonder if anyone on the list has written any scripts to automate the > > > management of VMs with loopback images. Here's what I want to be able > > > to do: > > > > Managing loopback block devices (and other non-physical block devices) > > will get friendlier than it currently is. They'll get automatically > > allocated, deallocated etc by Xend. > > > > However, the functionality you want is much like we'd envisaged for the > > "cluster controller" some time in the future. The idea behind it is to > > simplify the management of multiple Xen machines as a single pool of > > resources. > > > > We have some preliminary design documents on this but no implementation > > as yet. There are other people working on their own cluster management > > schemes (hi Brian, hi Steve ;-) but there's not a general-purpose Xen > > package for doing this. > > > > If you're interested, we can post some of our design docs on this > > subject. > > > > Cheers, > > Mark --Boundary-00=_3rfWBDKkO8Vt3Fo Content-Type: text/plain; charset="iso-8859-1"; name="xen-ctl-plane.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-ctl-plane.txt" Xen Cluster Control Tools ================================= by Mark Williamson (C) 2004 Intel Research Cambridge This document gives an overview of the functionality currently available and discusses some of the issues involved in the design of a Xen cluster controller. Decomposition of functionality ------------------------------ Logically, the control software required for managing Xen servers can be divided into three components: Basic control functions: All Xen nodes, whether they are standalone or part of a cluster will need a set of basic control functions to be performed locally. - (de)multiplex console messages - (de)multiplex other control messages - any other low-level management functions required - supervising operations associated with domain migration - domain reboots - startup & shutdown domains on request - suspend / resume domains given a location on disk for the state file - coredump / reap domains that exit with an error code Standalone node management: Standalone Xen servers require some higher-level management functionality. This is currently provided by a web interface and by the xm command-line tool. This software does: - automate startup & shutdown domains when the main system starts / shuts down - manage domain memory and disk images within one machine to provide an abstraction of a persistent "virtual machine" that the user can assign some name to - recovers from restart, so Xend crashes shouldn't necessarily be fatal to domains running on the host It would be nice to have: - provide some means to move, copy or remotely access the local disk state, etc of a "virtual machine" to another machine, either whilst suspended or whilst running, when requested by the user, as well as transferring things like memory images using the functionality provided by the basic control layer. This is to facilitate migration of domains that have state on the local disk and could be requested directly by the user, or by the cluster controller. Cluster management: This software would be used to manage a cluster of heterogeneous Xen services in a uniform way. This software should ideally provide: - global awareness of the cluster (where virtual machines are running, what resources are available in the cluster...) * resource awareness could also include - free IPs, free MAC addresses - intelligent application of migration to facilitate load balancing, taking down physical hosts for maintenance, etc. - some means for detecting and recovering from failed cluster nodes. This could sensibly be achieved by polling all running Xends for their current state and noting failures to respond. Once a node has failed a few times, the cluster controller would take corrective action or report an error. - recovery from cluster controller failure, possibly using redundant controller nodes - provide a separate layer of indirection for domain consoles so that migration can occur transparently without breaking console TCP connections - a concept of a virtual machine class and a virtual machine instance (i.e. "Fedora dynamic web server" vs. "Fred's server"). Instances can be created based on classes. The last point makes virtual machine management nicer but could be quite complex in itself. It is also largely orthogonal to the other points, which are concerned with managing already-defined virtual machines. Thoughts on the implementation ------------------------------ The cluster management software will likely utilise a full-featured database server to maintain global state for the cluster. A control daemon would run on the cluster's "master" machine and would monitor the cluster and issue commands to nodes on behalf of the user. The cluster management software in particular is a very complex problem and so its feature set should be carefully chosen for the initial implementation in order to ensure that a product is eventually completed! Not all of the above is required for it to be useful. --Boundary-00=_3rfWBDKkO8Vt3Fo-- ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl