VtM Description

VtM (Virtualization Manager)

This is a main function from VtM package. VtM manages life cycle of a virtual machine, including creation, destroying and resource management.

VtM class have 2 identificators: Id automatic generated by Xen and the own identificator used in the Java program.

Imporant to know that Domain is a Virtual Host and checkpoint does not work when the virtual machine is turned. Many of the funcions of this class writte in a log file. And Checkpoint Manages the creation of checkpoints.

This class works with this methods: ConfigManager, ScriptManager, DiskManager, DomainStore, ResourceManager, XenMonitor and Configuration Variables (dynamic/static and StaLevel)

This is the list of the defined functions of the class:

- Run: Background process that maintains checkpoints of each Virtual Machine. Done by disk manager.
- GetInformation: Provide system information. Get informacion about the System, for example Arquitecture, bandwidth, disk, cpu, number of cpu’s, cpu speed, extensions.
- GetInformation (with domain Id,): Gets detailed information of a given domain (CPU/Memory used, assigned, calculated, request, priority,…)
- Create: Create domain. Domain Null if it couldn’t be created.
- Destroy: Destroy a domain.
- Modify: Modify resource allocation manually.
- Pause: (@param uuid) Pause a Virtual Machine.
- Unpause: (@param uuid) Unpause a VM.
- migrateIn: Receive a migration of a domain.
- migrateOut: Migrate a domain to another host.
- checkpoint: Create a checkpoint of a domain.
- recover: Recover a checkpointed domain.
- checkParameters: Check if this new domain request default parameter setting and assigns it.
- lock & unlock: Block and Unblock all background cache processes
- askMoreResources: Assign more resource to a domain.
- WaitingMigration: A thread that waits until the input migration of a Domain has finished.


This exception is thrown by Resource Fabrics to indicate any error. Creates a new exception (VtMException) using the parameter sent (String messages).


This class is used to stores information about domains. You can create a new store for domains, add domains, remove domain from the store, get the domain using its identifier, name or IP. Get resources, destroy domains…..

Too you can pause, unpause, get information about domains. Use the DomainStore, get a list with all domains or running domain controllers.

In conclusion DomainStore: Store, manages, have a getters and a setters, and It does others thinks to manage domain store.


This class works together with VtM.java. VtMBase manages the Virtual Machine.

In VtMBase uses methods how:
DataManagement: is used to upload and download files.
Task execution: tasks of a VM, domain of a task, and JSDL of tasks.
TaskDomain: controls Tasks
taskJSDL: is the Task ubication. Remmember thath JSDL (Job Submission Description Language) is a language for describing the requirements of computational jobs for submission to Grids and other systems.
keys: Store SSH keys about each Machine.
RMSlave: Is a Resource monitor.
VtM: Basic methods to use Virtual Machines.

Function Create: Creates a domain. To do this, you need domain and JDSL. Domain Information of the domain that is being created and JSDL description, including the data needed by the system.

The steps to create the domain are:
1 ) Check domain and JDSL are correct
2 ) Data stage-in phase. Download files and create Image
3 ) Create SSH key
4 ) Sending creation order to VtM core
“ 5 ) Create logs table ”


- Destroy: Destroy a domain with the vmId identifier sending to VtM core. Later there is data management.
- Checkpoint: Creates a checkpoint of a domain with Name of the domain to checkpoint.
- Recover: Recovers a domain from a checkpoint
- migrateIn: Receives a migrated domain.
- prepareMigrateOut: Retrieve information for migrating a domain to another domain.
- migrateOut: Migrates a domain to another host.
- runTask: Submits a job to a VM.
- getJobStatus: This function take a parametre Virtual Machine ID and get the status of the tasks being executed in this virtual Machine:
- getTaskStatus: Get status o a task that is being executed in the system.
- getKey: Get SSH Key of a Virtual Machine (ID) and the function return a string (null if there isn’t key)
- isReady: Check if a VM is ready to submit jobs
- isPortOpen: With IP and Port and the function Socket check the port of a Virtual Machine
- checkRequirements: Check Pool for its cached contents.
- installImage: Install image phase: prepare a file system and installs the software requirements.
- checkApplication: Check if an application
- getApplications: Reads a file containing application equivalencies.
- checkJSDLFiles: Checks the input files of a JSDL and converts the BSS files.
- …and a set of methods to monitor resource and Information of the system.


  • Commons

Commons methods used in VtM.

DomainToCreateMachineDescription: This class is used to extract the CreateMachineDescription from a Domain. Add new hardware description.

It receive the parameter domain, get the information about the domain and It set new information to “HardwareDescriptionType” (hdt).

For example: hdt.setIP(domain.getIp())

DomainToMachineDescription: This class is used to convert a Domain into a MachineDescriptionDocument. Similar than DomainToCreateMachineDescription.
: Execute a command that you pass how parameter and the result is the command script output.
: This class represents a Lock, to be used to access Pool and Store in mutual exclusion.
: Machine description to domain. Similar than DomainToCreateMachineDescription and DomainToMachineDescription.


  • Config

ConfigManager: initializes the configuration file. This class have a function to checks if the configuration file already exists in the system, have a function to obtains the configuration file location, extract a given entry from its JAR file and getters (getGateway, getNetworkAddress,…). and others functions.


  • Disk

Cache.java: Creates a cached image using an already existing copy. This method can create a Swap Image, Home Image, Base Image and Application image and in a future It will create Delta Image.
: Compresses and uncompress a file (bz2, gz, zip) with java.util.zip API
: Manages the creation of checkpoints. Checkpoint is used to create or recover snapshots of the Domains.
: DiskManager.java Manages the disk images and has two basic variables (locked and running), a log list and two methods (Cache and checkpoint).
Run function is used to check the cached images status and manage them.
ProgressCopy.java: Based on FileUtils. This copy files taking into account if is it possible or not.

Checkpoint -> Disckmanager

  • Executor

Executor has 2 classes. Gloubus java file executes tasks using Globus (more information about gloubs http://en.wikipedia.org/wiki/Globus_Alliance) and SSH java file executes tasks using SSH.

Globus java file has a methods to Execute a job using Globus, obtain job status, generates a temporal EPR file, generates a temporal Job Description file and others.

and a SSH java file has a methods to Creates a SSH executor in a given host, Executes a Job in a remote location, Get the status of a job, SSH executor and others.

  • Resource

This package monitors, manages and give information about resources (Manages resource assignment, give measures,stores the time and the stored values, monitors the execution of domains controlled by the VtM, store resource assignation to a domain, etc.)

  • Resource.assigner

This package have a main ResourceAssigner class. And four class (Surplus, Dummy, Global and Calculated) inherit from main class, ResourceAssigner.

ResourceAssigner assigns the resources to a domain. This ResourceAssigner have 4 specialized class:

GlobalResourceAssigner: Calculate the assignment of resources of the global system.
SurplusResourceAssigner: Assigns resources taking into account the surplus resources.
DummyResourceAssigner: A resource assigner that just assigns the amount of resources requested by the job.
CalculatedResourceAssigner: Assigns resources taking into account the surplus resoruces.


  • Rm

RMSlave.java: Resource Monitor slave. Provides information to the Resource Manager.
Sensor.java: This gets the values of a Virutal Machine. Values as CPU, Memmory, Machine Type, Disk, OS Release, etc.

  • Script

The name of the class describe perfecty the function about this. ScriptManager can create, run, destroy a domain, Unify paths for migrated domains or checkpointed domains, install virtual images and others usefulls utilitis to Manage the Scripts.




Similar than VtM package. This package works with Amazon EC2. VtME is Virtualization Manager adaptation to Amazon EC2.