VMShop - Virtual Machine Management System for Grid Computing

Introduction

VMShop is a virtual machine management system built with the goal of providing application execution environments for Virtual Machine (VM) Grid Computing. The system supports following operations on VMs:
  1. Creating new VM.
  2. Configuring existing VM.
  3. Estimate cost of creating a new VM.
  4. Attribute-value based querying of VMs.
  5. Collect (or destroy) VM.

The figure above shows the architecture of VMShop Grid Service. It consists of the following components:

  1. VMShop client which is any Grid middleware that requires a virtual machine (eg. InVIGO). These VMs provide native application environments for Grid applications.
  2. VMPlant server which is a classical virtual machine (VMware/Xen/UML) server that handles the actual creation, configuration or destruction of virtual machines.
  3. VMShop server which manages a number of heterogeneous VMPlant servers, and takes client requests. VMShop operates at the level of abstract virtual machines, and provides an API that hides the details of the virtualization technology. Upon receiving a create VM request, VMShop server picks the VMPlant where the VM can be created with least cost.

Describing VMs

VMs are described using a Directed Acyclic Graph (DAG) encoded in XML strings. The start node in the DAG is a blank VM with certain hardware specifications. All other nodes in the DAG describe the set of configuration steps that are performed on the VM to prepare the application environment. These include OS install and all exotic libraries and packages the application might need. The DAG can also be used to enforce Grid work-flow. It is possible to put together all these steps to setup the application environment into a single node that is uniquely named by the application installer. This unique node describes OS and relevant package installation steps.

The VMPlant servers maintain a library of cached VM images, from which new VMs can be cloned. The images are created by application installer and put in what we called the VM warehouse accessible to the VMPlants. These images are uniquely named by the application installer.

The new VM DAG starts with the node identifying the cached image (unique name) from which to clone, followed by nodes which may include configuring network, mounting application data files etc.

Some sample DAGs are available in the "VMShop/scripts" directory of the VMShop directory tree (See next section).

Downloading and Installation

VMShop is implemented primarily in Java. The VMPlant scripts for operating on VMs are written in Perl (for VMware) and Python (for Xen).
Download Untar the file and change directory to the VMShop directory.
To setup VMShop, do the following:
  1. Run the script called "configure_vmshop.py".The script asks you for the port on which VMShop server listens, and prepares a file called "configuration_vmshop.xml".
  2. The VMShop directory also contains a directory called "addreses". There is a file in this directory called "vmplant_addreses.txt". This file contains IP address and port number of each of the VMPlant servers (one per line). Edit the file for your environment.
The script to start VMShop is available inside the "script" directory and is called "run_vmshop".
To setup VMPlant:
  1. Run the script called "configure_vmplant.py".The script asks you for the following: The script prepares a file called "configuration_vmplant.xml".
  2. The VMShop directory also contains a directory called "addreses". There is a file in this directory called "vmshop addreses.txt". This file contains IP address and port number of each of the VMShop servers (one per line). Edit the file for your environment.
  3. Setup the VM warehouse: Create a file called "index.txt" inside the VM warehouse directory, that contains absolute path names of the configuration files for VM images. These VM images should meet certain requirements which are described later.
  4. Set up the network store. Change directory to the network store directory. Some more instructions on configuring a Xen VMPlant are available here. I would suggest you first go through the next section on VM warehouse setup.

VM warehouse setup

The index file inside the VM warehouse directory only contains path names to the VM config files. The VM images must meet certain requirements for both VMware and Xen.

Xen VMPlant - Special instructions

The Xen plant uses NFS shares to pass configuration scripts inside the guest. In the last, section we described the settings needed inside the VM guest to achieve the same. Now we describe in detail the Xen plant setup.
  1. Create a directory called script directory and sub-directories inside it for each new domain. Create export entries ("/etc/exports") like:
    $ cat /etc/exports
    192.168.77.1 /script/1(rw,no_root_squash)
    192.168.77.2 /script/2(rw,no_root_squash)
    192.168.77.3 /script/3(rw,no_root_squash)
    $
    Every new domain that is created checks-out a private IP address and mounts the corresponding script directory.
  2. Download the VBD init.dsk inside dom0. This device becomes the sda3 inside guest and contains a script that sets up NFS mounts in domUs.
  3. Edit the file "VMShop/vmplant/xen/init.py". The file has the initialization values used by the Xen plant scripts located in the same directory. The following fields ned to be edited:
  4. Creating an IP file. Look at the sample file "VMShop/vmplant/xen/ip.txt". It has the following fields:
    1. host-only IP address
    2. software bridge name to which the domain connects in the host-only network. To provide isolation, we may want to create separate bridges in domain0, and each domain connects to a different bridge in the host-only network. This is however not supported in the current implementation. There is a single host-only bridge to which all domains connect. It is called "test" in the sameple file.
    3. exported directory (the NFS share).
    4. copy-on-write (COW) directory (not supported). But continue to have this field.
    5. VFS proxy port nfsd for COW (not supported).
    6. VFS proxy port mountd for COW (not supported).
    7. server port (deprecated).
    8. Last field is be named "unused" depicting an unassigned host-only IP address. Once the IP address gets assigned this will be replaced by details of domU.
    Please do not delete any field that is not-supported or deprecated. Continue to have them, although they will not be used. This file is created with all "unused" IP address entries, and from then onwards is edited only by Xen plant scripts.

    The COW support is still not built into Xen, and we have been using redirect-on-write Virtual File System to achieve the same. This mechanism is under testing, and not in the current release. We are currently do full root disk copy.