Documentation

Table of Contents



Introduction

XenMan is an intuitive, graphical management tool aimed at operational life cycle management for the Xen virtualization platform. XenMan is built on the firm design philosophy that ease-of-use and sophistication can, and should, co-exist in a single management tool. So, XenMan should hopefully prove valuable to both seasoned Xen Administrators as well as those just seeking an introduction to Xen Virtualization.



Definitions


VM 

Virtual machine (Xen Virtual Machine in this context)

Server 

Refers to a physical host or machine

Client Machine

Server on which the XenMan is invoked is referred to as client machine.

Managed Server 

Server to be managed using XenMan.

Server Pool

A collection of managed Servers typically owned/managed by a department or used to provide related services/applications.



Whats New in v0.6?

XenMan v0.6 greatly enhances some of the key multi-server management features first introduced in v0.5. Moreover,  a comprehensive, multi-server monitoring feature is new in this release.  The major changes are, briefly:

  • A new, multi-server. performance dashboard.

Multi-Server performance and availability metrics are now available in
a single, consolidated dashboard. Common administrative tasks may
be performed directly from the dashboard.

  • A new, extremely powerful, Virtual Machine Image management and provisioning scheme.    

The Image Store, provisionable image structure and the VM provisioning
mechanisms have all been completely overhauled and vastly improved.
The new system is highly flexible, configurable and very well suited for
users wishing to define and/or use their own provisionable images/schemes.

  • SDL/VNC display support for HVMs (non-modified VMs).



Deployment Instructions

XenMan is distributed both as a source/binary tarball and as a binary rpm for a few specific distributions** (see the important note at the bottom). Depending on your method of installation, the deployment procedure may differ slightly.

I. Deployment from tar ball

1. cd to the location where you've extracted the tarball.
   
    e.g.> cd ~/xenman.0.6/

2. Make sure your environment fulfills XenMan's pre-requisites. Consult the client and managed-server configuration sections contained in the main README under the ./doc directory.

3. If you haven't already, deploy python-paramiko (an SSH client library XenMan uses for remote management) in your environment. Python-Paramiko is available for download at:

    http://www.lag.net/paramiko.

(follow the installation instructions at the site carefully).

4. Execute the default configuration script if you see one for for your distro. (e.g. configure_defaults-suse.sh for SUSE):

    e.g. > sh ./distros/suse/configure_defaults-suse.sh

5. If you see a default configuration file for your distro in the distros area (e.g. ./distros/fedora/xenman.conf for FC), rename it to xenman.conf and copy it to the top.

    e.g. > cp ./distros/fedora/xenman.conf ./xenman.conf

NOTE: If you do not see a default configuration file specific to your distro, don't worry, XenMan will create one for you upon startup. 

6. Create a local copy of the Image Store (XenMan's provisionable Virtual Machine Image repository)

    e.g. > sh ./mk_image_store

(this will create the Image Store at /var/cache/xenman/image_store)
 
7. Make sure XenMan has execute permissions:

    e.g. > chmod 0755 ./XenMan

8. Run XenMan and enjoy!

    e.g. > ./XenMan


II. Deployment from an RPM package

1. Remove any earlier versions of xenman from your environment.

    e.g.> rpm -e xenman

2. cd to the directory you've downloaded the rpm package to and
install XenMan:

    e.g.> rpm -Uvh xenman-0.6.1.fc5.noarch.rpm

If all goes well, you are good to go. Run XenMan and enjoy!

    e.g.> xenman

NOTE:  XenMan requires the python-paramiko package for remote operations over SSH. A python-paramiko rpm package is available for most distro's; however, if you cannot locate a suitable package for your distro, you can manually deploy it (see section I.3 above), and then run rpm with dependency checks disabled.

    e.g.>rpm -Uvh xenman-0.6.1.suse.noarch.rpm --nodeps

        XenMan is distributed both as a source/binary tar ball and as a binary rpm for a few specific distributions** (see the important note at the bottom). Depending on your method of installation, the deployment procedure may differ slightly.


Prerequisites

Prerequisites for running XenMan :

Client Machine :

  • Xen 3.0.2 or later installed.

  • X server (to display XenMan UI)

  • Ability to connect to Managed Server through SSH

  • Paramiko library (if you have problems installing along with xenman)

  • XenMan installed


Managed Server :

  • Xen 3.0.2 or later (booted in to Xen kernel and Xend running)

  • Xend daemon listening on TCP/IP port

  • SSH daemon running

  • X server is NOT required



Environment setup

This section describes some additional setup for managing multiple Server.
This is NOT required if you want to manage virtual machines on local host/client machine only.

Xen Server setup 

    On the server to be managed, the Xen daemon (xend) needs to start listening using tcp-xmlrpc.
To enable this, follow the following instructions.

  - login as root

  - uncomment the following line in /etc/xen/xend-config.sxp (change no to yes)
    (xend-tcp-xmlrpc-server yes)

  - and restart xend service

     # service xend restart


SSH setup 

  XenMan uses an ssh tunnel to communicate to with the Xend server. In addition,   it needs to read a bunch of configuration files, create VBDs, LVMs and   give few other remote commands.  Basically all managed servers   need to trust all client machines. (Yes, u can have more than one client machines)

   From client machine, ssh to managed server from the client machine using the account
   from which xenman would be started.

    # ssh <managed server name>

    This will prompt you to add the key to the known_hosts. Say yes.
    This will add the /etc/ssh_host_key.pub from the managed server  
    to users $HOME/.ssh/known_hosts on client machine
    
    (Alternatively you can manually add it)

   ## Repeat above steps for each managed server.

   If you want to use password based authentication, the you are done.
   You can skip the rest of the section.

   For a small environment it may be OK to use password based authentication,    but in a large setup we recommend using key based authentication for    convenience and tractability.


   Refer to SSH manuals and on line material for setting up key based trust and
   using ssh-agent.
 
   Here are some useful URL's

   http://www.suso.org/docs/shell/ssh.sdf
   http://www.linux.ie/articles/tutorials/ssh.php
 


Remote file browsing 

While managing remote servers, there are operations like, "Open VM File" etc that would require selecting a file on a remote server. For GNOME users, XenMan uses gnome-vfs to browse files on the remote server. Unfortunately this is done on a separate channel and hence would require user to enter the password again for the managed server.  When prompted for saving the password, it is recommended not to save password in key-ring for security reasons.

The user is NOT prompted for password if the key based authentication is used. The user experience is quite seamless between localhost vs remote managed server management.

NOTE : There is a small bug in paramiko library used by XenMan. The XenMan distribution contains the necessary files to patch this bug. In order to apply this patch,
If you have paramiko 1.6.4 or later, then you do not need to apply the patch.
Use the patch_paramiko script as root.

 # cd <xenman install>/patches
 # ./patch_paramiko


XenMan Features

The Dashboard

    The Dashboard is a consolidated listing of all known managed servers along with critical performance, availability and configuration metrics for each.  It provides the user the ability to ascertain the state of his/her entire deployment at a glance. In addition, most common administrative tasks can be launched by right clicking on a server.

  • Launch. The Dashboard may be launched by selecting 'Server Pool' in the navigator on the left and then clicking on the Summary Tab on the right hand side. (Note: Upon startup, XenMan launches the Dashboard by default).
  • Operations: Left-Clicking a row in the Dashboard selects the associated managed server. The following actions may be then be performed:
    • Double-Click: Connect to the managed server (if necessary) and drill down into a more detailed view. This selects the server's node in the navigator on the left hand side and brings up the Summary tab for the server on the right.
    • Right-Click: Context sensitive menu. Most server operations can be executed directly here. 
    • Sorting: Clicking on the column header will re-sort the listing based on the clicked column. (not available for all columns)
  • Data*. Each row in the Dashboard corresponds to a managed server. The fields are: 
    • Server.  The name of the managed server.
    • Connection.  Connectivity status to the managed server ( i.e. whether XenMan has an active connection to the server).
    • VM Summary. A compact listing of VM status on the server. Total(known)/Running/Paused/Crashed respectively.
    • VM CPU(%).  Aggregate processor usage by VM's running on the server. (Does not include the host OS/Domain-0's processor usage).
    • VM Mem(%). Aggregate memory usage by VM's running on the server. (Does not include the host OS/Domain-0's memory usage).
    • Server CPU(s). Number and clock speed of the physical processors on the managed server. (if available)
    • Server Mem.  Total, usable physical memory installed on the managed server. (if available)
    • Version.  The version string being reported by Xen at the managed server.

* Most of the data fields in the Dashboard listing are available for managed servers running Xen v3.0.3 or above. For servers running earlier versions of Xen, most fields will display N/A.

Server Pool Operations 

     XenMan shows a Server Pool node which refers to a pool in which all managed servers belong. XenMan supports only one server pool in this release.

A Local server is automatically added to the pool, if prerequisites are met. XenMan would manage Virtual machines on the local server.

- Add Server : Additional remote managed servers can be added by using the "Add Server"  operation.
You are prompted for basic information:

   * Host name : Name of the server/host to be added.
   * Xen Port  : Port on which Xen Daemon (xend) is listening. Typically 8005
   * username  : (typically root)
   * password  : (NOT SAVED ANYWHERE ON DISK/can be left blank if
              authentication is done using keys)  

One needs to make sure that Xen daemon (xend) listening on port 8005 on managed server.
If not,
  - login as root
  - uncomment the following line in /etc/xen/xend-config.sxp
    (xend-tcp-xmlrpc-server yes)

  - and restart xend service
     #service xend restart

Also, make sure that you can use ssh to login to the managed server.

Remove Server : A server can be removed from the list, by selecting it
               and choosing "Remove Server"

Server operations 

The following operations are allowed on a managed server.

- Start All VMs : Start all VMs on a selected server.

- Shutdown All VMs  : Shutdown all VMs on a selected server.

- Kill All VMs  : Kill all VMs on a selected server.

- Provision VM: Allows you to create a new VM with very few
parameters. (see section on Image Store for more details)

- Open VM Config File : Allows you to add a new VM file to the list
which can then be edited using the settings context menu or started
using the start button.


Virtual Machine/VM operations 

Edit VM Settings        : Change the configuration settings for the selected VM
Edit VM Config File  :  Edit the VM's configuration file directly.

Start            : Start the selected VM
Pause         : Toggle button to Pause/Resume running VM
Reboot       : Reboot a selected VM
Shutdown   : Shutdown a running VM
Kill             : Hard kill on a VM
Snapshot    : Save state of a running VM to a file
Restore      : Restore a VM from a stored snapshot.
Delete        : Delete VM file and associated VBD/LVMs.

Remove VM Config File : Removes VM file name from the list of VM known to xenman.


XenMan and user accounts

XenMan can be invoked from either root user or non-root user account

  • Root user : When XenMan is invoked from root user, it can manage local  server as well as other managed servers for which credentials need to be provided.

  • Non root user : When XenMan is invoked from non-root account, it can not do Xen management on local server. However, this user can manage other managed servers. Wherever necessary, XenMan prompts for credentials..



The Image Store 

XenMan allows administrators to define their images and create Virtual Machine configurations from them. For example, in a particular data center, four types of machines are to be provisioned frequently. They are Red hat, CentOS,  Suse and Ubuntu. You can configure XenMan to point to kernel and ramdisk of  each of these distributions and install/deploy many virtual machines using  predefined images. The collection of images are referred to  as Image Store.

XenMan ships with a default image store containing a few useful provisionable images. Sophisticated users may also construct their own, arbitrarily sophisticated image descriptions and provisioning schemes and add them to the Image Store. (For instructions on how to build custom provisionable images, please consult the 'Image Builder's Guide,' a part of this documentation set).

  • Location. The Image Store is listed in the navigator. Clicking or expanding the Image Store node results in a listing of the available, provisionable images. 
  • Image Operations
    • Click. selects the image and displays useful information about it in on the right hand side. This information typically included a brief description of the provisionable image, pre-requisites and deployment instructions. So, read this information carefully before attempting to provision the image. 
    • Right Click. brings up a context menu with various image specific tasks. These are: 
      • Provision. Start the provisioning process. Launches a dialog prompting for the managed server to target for provisioning. 
      • Edit Settings. Alter the definition of the image. Any changes made here are permanent and apply to all subsequent VM's provisioned using this image. (more detail below)
      • Edit Script. (Advanced Feature). Alter the mechanism used to provision VM's using this image. This is an advanced feature and should be left alone unless you are designing your own provisionable image.
      • Edit Description. (Advanced Feature). Edit the description associated with this image. This is the description that appears on the right hand side once the user left-clicks on an image name in the navigator. Unless you are designing your own provisionable image, leave this alone.
  •  Edit Settings Dialog. This is a multi-purpose, context sensitive dialog that can be launched to manipulate settings for provisionable images or existing VM configurations. When launched in context of an image, this dialog presents two top-level tabs, each affecting a different aspect of the provisioning process: 
    • Virtual Machine. This tab controls the various parameters and settings controlling the configuration* of the VM's provisioned with this image. In typical usage, user will likely not make any changes here, save for perhaps changing disk settings to better match the deployment environment.
    • Provisioning. This tab controls the various parameters and settings controlling the mechanism* by which VM's are provisioned using the selected image. A typical alteration here would be to change the disk size and type parameters governing the default sizes and types (VBD/LVM) of system disks created during provisioning process.

* a detailed description of the configuration/mechanism distinction and how parameters may be shared between the two is an advanced topic, more fully addressed in the 'Image Builder's Guide.'



XenMan config file (xenman.conf)

XenMan's default configuration is kept in the xenman.conf file. This file is in simple text format, so it can be easily changed to suit your environment.

Here is a brief description of important configuration parameters:

PATH section

This section contains default directory/file locations. Some important one's include:

- disks_dir: This is the location where XenMan creates Virtual Block
  Devices (VBD's) for use as disks by VMs. Make sure you have plenty of space
  available at this location. XenMan would prompt for this location if not
  already set.

- snapshots_dir: This is the location where XenMan stores snapshots of running
  VMs for the Snapshot/Restore. XenMan would prompt for this location if not
  already set.

- cache_dir: This is the location where XenMan stores the default kernel and
  ramdisk images. By default, this is set to /var/cache/xenman.
  (See ramdisk/kernel & staging_location above).

- xenconf_dir: This is the location for storing and retrieving VM
  configuration files. By default, this is set to /etc/xen.

- image_store: This is the path variable setting for image store. Typically not changed.

- log_dir: This is the location where XenMan writes its logs. By default, this is set
to /var/log/xenman

- exec_path: This is the path variable setting for remote shell operations. Default value is
$PATH:/usr/sbin.


APPLICATION section

This section keeps application specific data.

- vms  : List of virtual machine configuration files being managed by XenMan.


ENVIRONMENT section

This section contains server environment information.

- lvm_enabled : if the server has lvm and want XenMan to create LVM for new VMs.

Managed Server specific Sections

The config file has section for each manged server. This contains information required by XenMan to connected managed servers. This sections are relevant only on client machines.

example :  

[192.168.0.102]
is_remote = True
login = root
xen_port = 8005


CLIENT CONFIGURATION section

This section contains items specific to client/user preferences

- gnome_enabled : True/False. Set this to True if you are using XenMan on
                  Gnome desktop and have patched paramiko. See section on
                  Remote File Browsing for more details.

 
Additional Notes:
* Upon startup, XenMan looks for xenman.conf, in order, at the
  following locations:
    ./xenman.conf        - (current directory)
    ~/.xenman/xenman.conf     - (user's home directory)
    /etc/xenman.conf    - (global location)
  If it doesn't find a valid, writable configuration file, XenMan creates
  a default file under the current directory.


Tips

  • Always specify full path of the files, as if seen from the managed server.

  • Do not add localhost or ip addresses using Add Host.

  • XenMan does not allow editing VM config files NOT generated via XenMan. It looks at special header (first line) to make this determination. If the config files contains simple name value pairs and are not parameterized, they you may selectively choose to add the XenMan file header.



Known bugs/caveats

- When using XenMan in Xen 3.0.3+/3.0.2 mixes environments, please ensure that XenMan is run on a 3.0.3+ node. XenMan running on a 3.0.2 node isn't forward compatible for managing Xen 3.0.3+ servers.

- Occasionally, the memory/cpu usage percentages displayed in the Dashboard and elsewhere may spike momentarily to above 100%. This is due to a bug in the way Xen reports resource usage for VM's.  Hopefully this will be fixed in the near future.

- You might have to enter credentials for the same server multiple times when  password based authentication scheme is used for managed server as opposed to key based authentication.

  For example :
    - When the server is expanded
    - When terminal window is opened for selected VM
    - When an operation requires remote file access and gnome-vfs is enabled in XenMan configuration.  
    
- Sometimes, the guest VM tab showing the virtual machine terminal fails to redraw properly. Clicking on the terminal and sending a Ctrl+l and/or some keystrokes often helps.

- When the Virtual machine configuration file is changed, the directives may get saved in different order.

- On some platforms the password field generates gtk/pango warnings and displays "?" characters. Ignore this, the password is read correctly by XenMan.

- For XenMan to show vnc display correctly, vncunused in the vm config file should be set to 0.

- The image store is no more governed by entries in xenman.conf. Users upgrading will have to use the new mechanism of defining and using images.

- A property name in the xenman.conf has changed from "doms" to "vms", please make a note of this.

Platforms

Fedora Core 5
OpenSUSE 10.1
Xen 3.0.2


Licensing

GNU General Public License (GPL)
For details, see: http://www.gnu.org/licenses/gpl.html


Feedback

Do drop us a line, if you download/evaluate/use XenMan. We would appreciate feedback on the current release as well as suggestions for future releases.

Also, we are hoping for active community assistance in the following areas:

- packaging for more platforms and distributions. (e.g. debian, windows, etc.)
- ImageStore images (kernel/ramdisk pairs) for various pre-packaged Guest Os/VM's.

The best way to reach us is to pop in and say hi at our (low frequency) mailing list. To sign up, visit http://xenman.sf.net/. We look forward to hearing from you!


Copyright/Acknowledgments

Xen is registered trademark of XenSource Inc

paramiko library : By Robey Pointer
htmltextview.py : By Gustavo J. A. M. Carneiro
TreeViewToolTip.py : By Daniel J. Popowich







 

 


s
Current Version: 0.9.6
s
 

 
XRP Logo
s
s