[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Basic Xen administration tool

On Thu, Apr 13, 2006 at 03:25:34PM -0300, Eduardo Costa Lisboa wrote:

> Hi, everyone. Me and my co-worker are planning to build a very basic
> Xen admin tool. We know that there are some projects in progress, and
> that there is a API to access Xen's resources. However, all what we
> want to do is a simple shell script which does the following tasks:

  I use a couple of perl systems:

    xen-tools : Creates, Clones, Deletes, and updates xen images.

    argo: Manage xen instances via a number of clients.

> 1. What does it do?
> R. It creates a new virtual machine based on a existing one.
> R. It does a snapshot or a distinct image copied from a matrix;

  What about from scratch?

  This is good if you have existing image(s) already to copy from
 but it might be nice to have a default template for a minimal system.

> defines the swap size; changes it's IP address, host and vm name and
> creates a swap volume as well. Also, it creates the Xen configuration
> file, changes the root password, sets the gateway and the DNS IP
> address (each machine may have a distinct DNS IP address).

  Sounds good.  One thing you might want to think about is the
 handling of different image types.

  My xen-tools package, for example, works with Debian Sarge, Etch
 and Testing.  However it doesn't work with SuSE / RedHat.

  You might want to consider how you'll handle different distributions
 which have files in different locations.  (Not a big deal to be honest,
 but certainly something to think about if you're being ambitious.  I
 know that I'm going to look at creating images of Fedora, etc, soon.)

> 5. Will it have the ability to remove created machines?
> 6. What will be done in order to remove them?
> R. Xen's config file; the snapshot/image copy and swap volumes.
> R. Shutdown the machine (via xm). If the machine's state is "s", then
> wait. Otherwise, kill it, then remove the machine.

  I've not honestly considered this before, but it is a useful addition.
 (Shutting down machines before removing them.)

  This is another thing to consider when creating - how do you
 allow people to use files / LVM / partitions?  Something I got
 a lot of questions about when I only supported file creation.

> 8. Will it return iformations about the machines?
> R. Yes.

  This is logically distinct from creating/removing since those are
 "offline" activities which can be conducted without even running
 under Xen.

  To get other information you need to interface with a real xen
 system - this is why my code is in two parts.

> 9. What kind of information?
> R. How different is the snapshot from the original; machine's memory
> usage;  it's state; it's CPU usge; IP and network status (via
> pinging).


> 10. Will this program have the ability to administrate the virtual
> machines, such as start and shutdown, as well as connect to their
> console?
> R. No. This will be done via xm.

  I'm thinking that if you're going to interface with XM, or some
 library, to get information then adding primitives for 'start',
 'stop' is trivial and useful.

  Certainly it sounds like your deletion code will need to do this
 in order to test if the instance is running to shut it down first.

> I would you all to comment if you find that there is lacking some
> feature, or give any ideias to it. We are not discussing
> implementation details yet, only the software's features. Anyway, if
> it works pretty well, we are planning to build a better one, then,
> using Xen's API.

  The one thing I'd like is a decent way of connecting to xen consoles
 over a network socket, or similar, so that I don't need to give users
 local shell access + setup sudo.

  There may be something I've missed here since I've not looked at this
 for a while.

> That's all for now, and forgive my sob big e-mail and possible
> grammatical erros.

  Sounds like an interesting project, and I wish you luck with it.

http://www.steve.org.uk/Software/xen-tools   - xen-tools
http://www.steve.org.uk/Software/argo        - argo

Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.