virtenv is a QT4 application that lets you configure light virtual machines based on Linux Containers (LXC) functionality in Linux kernel.

A virtual machine created by virtenv uses a copy of your current filesystem mounted copy-on-write. Any filesystem modifications in the virtual machine are not carried over onto your main filesystem.

The virtual machine also starts its own X server with a minimal window manager (Openbox), and it has full network access. root privileges are needed to start the environment.

virtenv is released under GPL v2 license and it was tested so far on Ubuntu (12.04 and 13.04), openSUSE (12.3), and Debian "wheezy". It can run on any Linux workstation with OverlayFS support in Linux kernel.


May 2014 - Version 0.9 released

Jan 2014 - Version 0.8.8 released

August 2013 - Version 0.8.6 released

May 2013 - Version 0.8.4 released

April 2013 - Version 0.8.2 released

March 2013 - Version 0.8 released



The filesystem is mounted using OverlayFS. Currently, OverlayFS is not officially included in the Linux kernel. As a result, virtenv is supported on a small number of distributions. The list so far includes Ubuntu and openSUSE. Debian "wheezy" is supported via an Ubuntu kernel.

For Ubuntu 14.04 and later use the .deb package provided:

    $ sudo apt-get install xserver-xephyr bridge-utils lxc openbox
    $ sudo dpkg -i virtrenv_X.Y.Z_1.deb
To install it from sources, download and unpack the source archive:
    $ tar -xjvf virtenv-X.Y.Z.tar.bz2
    $ cd virtenv-X.Y.Z
Dependencies: QT4 development libraries, Xephyr, LXC, Openbox. Compile and install the software:
    $ ./configure
    $ make
    $ sudo make install
For Debian "wheezy" install an Ubuntu kernel as follows:
    $ wget http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-image-3.2.0-51-generic_3.2.0-51.77_amd64.deb
    $ apt-get install crda iw libnl-3-200 libnl-genl-3-200 wireless-regdb
    $ dpkg -i linux-image-3.2.0-51-generic_3.2.0-51.77_amd64.deb

How it works

Start virtenv from a terminal.

   $ virtenv

Create a new virtual environment or pick up an exiting one.

virtenv wizard

Configure the environment.

virtenv wizard

Save and start the virtual machine. As a result, a new terminal is created. This is the virtenv-console. Enter the sudo password to start the environment. If the environment was configured for X11 support, a new xserver is started (Xephyr) running a lean windows manager (Openbox). Use this window as your virtual desktop.

virtenv wizard

To stop the environment just type exit in virtenv-console or close the window.

Usage scenarios

Application sandboxing: the fundamental idea behind sandboxing is to reduce risk by limiting the environment in which certain code executes. The current virtenv solution is based on Linux Containers feature of Linux kernel and allows the separation of the process space, filesystem and networking stack.

Application development and testing: virtenv allows the isolation of untested code changes and outright experimentation from the production environment.

Virtualization: virtenv creates very lean virtual machines. Only the necessary processes are started in such virtual machines. For example, in order to run a webserver virtual machine, you only need to start the webserver process and a syslog process.


Discussions and bug reports.