Open main menu

CDOT Wiki β

Web-based Virtual Machine Management

Revision as of 16:58, 14 December 2007 by Jb (talk | contribs) (v0.3 release)

Project Name

Web-based Virtual Machine Management (aka virtbuilder)

Description

A web application which allows users to request and access custom virtual machines. Targeted use case: temporary VMs for one-time use, i.e. testing new configurations, operating systems, etc.

Project Leader(s)

Details

  • Uses libvirt, KVM, QEMU
  • "Templates" are virtual machines created by hand with existing Linux virtual machine tools like virt-manager. There are two parts to templates: the installed system partition itself, and an XML description of the VM in the libvirt XML format.
  • "Instances" are snapshots of the templates: a user can log in and select a template, and be assigned an instance of that template. Changes to the user's VM are not persistent.

Unresolved issues

  • Design issue: Expiry of virtual machines (how long should they last? when should they be cleaned up?)
  • Design issue: Validating RAM/disk space usage (how to stop users from bringing server to a grinding halt?)
  • Known bug: Cannot boot more than one virtual machine because VNC port is in use - must modify this.

Related bugs

Since I'm not hacking on Firefox or any Mozilla products per se, finding bugs related to my project is sort of difficult. To get in the right direction I tried searching Bugzilla for 'vmware', 'xen', 'kvm', and 'try server'. Here are a few results:

Update: As of October 21 2007 I've noticed that I'm going to be using the Redhat bugzilla a lot more than Mozilla's. Here are a few actually relevant bugs:

Update: On November 17 2007 I filed a bug against virt-manager in Fedora 8. I am unable to create guests in virt-manager from CDROM installation media (must use a .iso file).

Goals

v0.1

  • very simple CLI tool that will boot a pre-built Xen machine, using either libvirt or virsh
  • if time, very rudimentary control of virtual machine (i.e. change RAM)
  • [added in lieu of above] HTML mockup

v0.2

  • something to make modifications to XML
  • shell out to make LVM volumes

v0.3

  • web-based front end to v0.2

Releases

v0.1 release (OBSOLETE)

  • Python script which boots a prebuilt KVM virtual machine via libvirt
  • Barebones mockup of web interface: the project in a nutshell
  • Download virtbuilder0.1.zip

v0.25 release (OBSOLETE)

v0.3 release

Description

  • Pylons web application
  • Handles simple actions such as create, destroy, and list VMs

Download

Not yet.

Requirements

Environment:

  • Recent Linux distribution (Fedora 8 was my testing platform, YMMV)
  • An LVM volume group with a bit of free space.
  • An Intel-VT compliant CPU (hardware assisted virtualization), for KVM.
  • A preinstalled virtual machine to be cloned, installed to an LVM volume.

Python:

  • libvirt python bindings
  • BeautifulSoup
  • Pylons

Installation and usage

  • Download and untar.
  • Edit development.ini:
    • virtbuilder.lvm.vg: Provide the name of your LVM volume group.
    • virtbuilder.vmtemplates: Provide the directory your template XMLs are stored in. (optional, default will work)
  • Change permissions on libvirt, and set LVM as suid, so Pylons doesn't need privileged access:
    • chmod +s /usr/sbin/lvm
    • chmod -R 777 /var/run/libvirt*
  • Run the Pylons project from the top-level virtbuilder dir:
    • paster serve development.ini
  • We're done. Go to http://127.0.0.1:5000 and start making VMs.

Project News

2007-09-17: Project claimed. Must contact bhearsum for further information.

2007-09-18: Discussion with bhearsum, ctyler.

2007-09-30: v0.1 goal stated.

2007-10-10: Installed Fedora 7 successfully.

2007-10-11: Began experimenting with virt-install, KVM and QEMU.

2007-10-12: Successfully installed Fedora 7 inside KVM/QEMU virtual machine.

2007-10-19: Completed a v0.1 goal: create simple CLI program to boot prebuilt virtual machine.

2007-10-20: Completed a v0.1 goal: create mockup.

2007-10-21: Released v0.1. New, temporary name is 'virtbuilder': (criteria: less than 36 chars, 0 google results)

2007-11-28: Released v0.25-r07.

2007-12-14: Released v0.3.

Related links