Difference between revisions of "Web-based Virtual Machine Management"

From CDOT Wiki
Jump to: navigation, search
(Project News)
 
(5 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
Web-based Virtual Machine Management (aka virtbuilder)
 
Web-based Virtual Machine Management (aka virtbuilder)
  
== Project Description ==
+
== Description ==
  
"Create a web-based rapid provisioning system for virtual machines, building on work started by Ben Hearsum. A user could select an operating system, toolchain, and source branch and the VM would be configured and started (using Xen, KVM, or another hypervisor/backend). Resources: bhearsum"
+
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) ==
 
== Project Leader(s) ==
Line 11: Line 11:
 
[[User:Jb|Jesse Buchanan]]
 
[[User:Jb|Jesse Buchanan]]
  
== Project Contributor(s) ==
+
== Details ==
  
I will want a lot of technical help. As of right now I have nothing specific to ask for: but, read [http://jbopensrc.wordpress.com/2007/10/21/virtbuilder-v01-1-part-code-1-part-mockup-3-parts-questions/ my blog] and answer some of the questions if you can.
+
* 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.
  
== Project Details ==
+
== Unresolved issues ==
  
=== Related bugs ===
+
* 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:
 
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:
Line 31: Line 37:
 
* [https://bugzilla.redhat.com/show_bug.cgi?id=246354 RH246354 2 pointer cursors diverging under -vnc option]
 
* [https://bugzilla.redhat.com/show_bug.cgi?id=246354 RH246354 2 pointer cursors diverging under -vnc option]
  
 +
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).
  
=== v0.1 goal ===
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=389101 RH389101 virt-manager fails to create KVM guests from CD-ROM installation media]
 +
 
 +
== Goals ==
 +
=== v0.1 ===
  
 
* very simple CLI tool that will boot a pre-built Xen machine, using either libvirt or virsh
 
* 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)
 
* if time, very rudimentary control of virtual machine (i.e. change RAM)
 
* [added in lieu of above] HTML mockup
 
* [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 ==
 
== Releases ==
  
=== v0.1 release ===
+
=== Current: v0.3 release ===
 +
 
 +
==== Description ====
 +
 
 +
* Pylons web application
 +
* Handles simple actions such as create, destroy, and list VMs
 +
 
 +
==== Download ====
 +
 
 +
* [http://matrix.senecac.on.ca/~jabuchan/virtbuilder0.3.zip Download virtbuilder0.3.zip]
 +
 
 +
==== 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.
 +
 
 +
=== Obsolete releases ===
 +
 
 +
==== v0.1 release (OBSOLETE) ====
  
 
* Python script which boots a prebuilt KVM virtual machine via libvirt
 
* Python script which boots a prebuilt KVM virtual machine via libvirt
Line 46: Line 104:
 
* [http://matrix.senecac.on.ca/~jabuchan/virtbuilder0.1.zip Download virtbuilder0.1.zip]
 
* [http://matrix.senecac.on.ca/~jabuchan/virtbuilder0.1.zip Download virtbuilder0.1.zip]
  
=== v0.25 release ===
+
==== v0.25 release (OBSOLETE) ====
  
 
* Python script which:
 
* Python script which:
Line 55: Line 113:
 
* [http://matrix.senecac.on.ca/~jabuchan/virtbuilder/CHANGELOG Download CHANGELOG]
 
* [http://matrix.senecac.on.ca/~jabuchan/virtbuilder/CHANGELOG Download CHANGELOG]
 
* [http://matrix.senecac.on.ca/~jabuchan/virtbuilder0.25-r07.zip Download virtbuilder0.25-r07.zip]
 
* [http://matrix.senecac.on.ca/~jabuchan/virtbuilder0.25-r07.zip Download virtbuilder0.25-r07.zip]
 +
  
 
== Project News ==
 
== Project News ==
Line 77: Line 136:
  
 
2007-11-28: Released v0.25-r07.
 
2007-11-28: Released v0.25-r07.
 +
 +
2007-12-14: Released v0.3.
  
 
== Related links ==
 
== Related links ==

Latest revision as of 17:04, 14 December 2007

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)

Jesse Buchanan

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

Current: v0.3 release

Description

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

Download

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.

Obsolete 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)


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

KVM homepage

QEMU homepage

libvirt homepage

Redhat bugzilla