Skip to main content

VirtualBox CLI bindings

Project description

License: BSD.

Yet another Python library of Python bindings for Virtual Box CLI (Command Line Interface).


It appears that VirtualBox binary API is rather unstable, while CLI interface is quite stable. Plus, using binary interface means that one has to compile bindings library for particular host being used. This can be not as simple as it should be on some systems (e.g. Windows). Binary bindings are also of a concern when packaging ones’ program in to the redistributable packages.

To the best of my current knowledge, the only competing project worth noting is pyvb. But it seems to be rather dead at the moment with last release dating back to the 2008. And its GPL license is sadly not really suitable for my current needs.


The main difference of this library of bindings is that I am making “smart” objective bindings rather just set of Python functions that call corresponding CLI commands.

I am attempting to hide as much of low-level VM management as possible and to represent all VM–related entities (NICs, HDDs, etc. ) as Python objects with functions of their own and properties parsed to their corresponding Python objects. Plus, I am attempting to make more consistent interface than VirtualBox’es CLI is.


Just a reasonably recent version of Python.

How do I use it?


You should be able to install this project via easy_install vbox route.

Alternatively, you can include this library as git submodule. If you do that, please make sure to include this projects’ release branch, not master. As release is the one that will contain versions of code that were actually released to the VBox pypy package page , so you will get automatic code updates than, but won’t get all the frustration of me accidentally breaking something via committing stuff to the master branch (that is development/testing branch).


I will write this part eventually. Please refer to the VBox tests for now.

Creating VM

VM with no drives and default amounts of RAM for the selected OS type is created with the following command:

import vbox

vm = vbox.VM(

VM with 10gb HDD and an empty DVD drive

import vbox

vm = vbox.VM(

VM object API

  1. vm.start()

  2. vm.powerOff()

  3. vm.wait(timeout=None) – wait for machine to get from running state to some other state.


Please do feel free to email me your suggestions on how to improve this library. Just email me (address can be found in the file or just googled for).

Can I has code?

Sure. That is why I am hosting VBox on the GitHub. :-)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution (36.1 kB view hashes)

Uploaded source

Built Distributions (281.6 kB view hashes)

Uploaded any

vbox-0.2.5-py2.7.egg (145.0 kB view hashes)

Uploaded 2 7

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page