Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

pypm install vboxn

How to install vboxn

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install vboxn
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
0.2.3 Available View build log
Linux (64-bit)
0.2.3 Available View build log
Lastest release
version 0.2.3 on Nov 23rd, 2012

vboxn automates the creation of VirtualBox machines.


vboxn is a Python/Bash library for creating new VirtualBox machine images in a repeatable and unattended fashion. It is intended as a developer utility similar in scope to veewee, (from which it borrows a few deploy templates).

The package includes three user-facing scripts:

  • vboxn-init for creating and bootstrapping a new virtual machine (Bash).
  • vboxn-postinstall for further provisioning of the machine via default or user-supplied scripts (Bash).
  • vboxn for manipulating existing machines (Python).

The default postinstall scripts are intended to configure the virtual machine in a way that is compatible with Vagrant. Once the postinstall step has completed (and the machine has been shutdown), you ought to be able to immediately package the vm as a Vagrant base box - for example, if the vm you created is called pangolin32

vagrant package --base pangolin32 --output pangolin32.box

The new box can then be further configured and added to an existing Vagrant installation as follows:

vagrant box add pangolin32.box

See the docs on Vagrant base boxes for more info.


The Ubuntu 12.04 guest install works, the archlinux guest install is not complete - the default postinstall script fails after a certain point. Since Ubuntu is all I need at the moment, there are no immediate plans to go beyond that.


Install from pypi:

pip install vboxn


pip install -e git+https://github.com/devopsni/vboxn.git#egg=vboxn


python bootstrap.py && ./bin/buildout


The following will create and start a new VirtualBox machine in GUI mode, and install Ubuntu 12.04 as the guest OS:

vboxn-init pangolin32 ubuntu auto

If all went well and the OS was successfully installed, shutdown the virtual machine (either from the GUI, or with sudo shutdown -h now), and run the postinstall script.:

vboxn-postinstall pangolin32

If that succeeded, shutdown the machine again and launch it in headless (GUI-less) mode:

vboxn headless pangolin32

Now, wait enough time for the machine to boot and, assuming that you had a public RSA key in the usual place (~/.ssh/id_rsa.pub) and it was copied to the new machine successfully, you should be able to ssh to the running instance (by default on address via the hostonly adapter with address

The root password is set to vboxn and there is an admin user called vboxn also with this password.

Both the init and postinstall phases will lauch "one-shot" web servers on the host using the netcat utility, if the installation fails then these may still be running and should be killed.


vboxn-init is a Bash script which will be installed as part of the standard Python package installation, but could also be used standalone without requiring either Python or vboxn itself.

vboxn-init <vm_name> <os_type> <auto|auto64|iso_source_file> [properties_file] [vm_option=..., vm_option=...]


    Automate the creation of VirtualBox machine instances.


    vboxn-init testbox0 ubuntu auto
    vboxn-init testbox0 ubuntu auto kickstart=no
    vboxn-init testbox0 ubuntu auto kickstart_file=bootstrap.sh
    vboxn-init testbox0 ubuntu auto postinstall=no
    vboxn-init testbox0 ubuntu auto vm_basefolder=/srv/vbox
    vboxn-init testbox0 archlinux archlinux-2011.08.19-core-i686.iso
    vboxn-init testbox0 archlinux iso/archlinux-2011.08.19-core-i686.iso conf/vm.properties


  - Specifying 'auto' or 'auto64' for the iso source will download
    the latest generic 32/64-bit installation image for the OS

  - A properties file can optionally be used to supply overrides to the
    default VM config options, it is sourced by vboxn-init and should be a
    valid shell script.

  - Properties can additionally be defined as command line
    arguments. If both a properties file and command line properties
    are given, then those specified on the command line will take

  - If 'kickstart=yes' (the default) and 'kickstart_file' is
    unspecified, then a generic kickstart file will be downloaded
    from this project's github repository and run on the new guest
    machine. Similarly for 'postinstall=yes' and 'postinstall_configure_files'.

  - 'postinstall_configure_files' should be a space delimited list
    of files which will be concatenated in the order given and run
    on the guest after the OS is installed.  'postinstall_configure_root'
    can optionally be defined as a prefix for the postinstall files.

  - The kickstart and postinstall files are made available to the
    guest machine by running a "one shot" web server on the host.
    The default address for this web server to listen on is the inet
    IP address of the host, and the default port is 8585. This can be
    changed by specifying the 'kickstart_listen_on' parameter:

        vboxn-init testbox0 ubuntu auto kickstart_listen_on=

Subscribe to package updates

Last updated Nov 23rd, 2012

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.