VirtualBox CLI bindings
Project description
License: BSD.
Yet another Python library of Python bindings for Virtual Box CLI (Command Line Interface).
Motivation
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.
Features
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.
Requirements
Just a reasonably recent version of Python.
How do I use it?
Deployment
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).
API
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( vbox.General( name="foo", osType="Windows95", ), vbox.Storage(), )
VM with 10gb HDD and an empty DVD drive
import vbox vm = vbox.VM( vbox.General( name="foo", osType="Windows95", ), vbox.Storage( api.HDD(size=10*1024), api.DVD(), ), )
VM object API
vm.start()
vm.powerOff()
vm.wait(timeout=None) – wait for machine to get from running state to some other state.
Contributions
Please do feel free to email me your suggestions on how to improve this library. Just email me (address can be found in the setup.py file or just googled for).
Can I has code?
Sure. That is why I am hosting VBox on the GitHub. :-)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file vbox-0.2.5.zip
.
File metadata
- Download URL: vbox-0.2.5.zip
- Upload date:
- Size: 36.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa4d37cc3e545c9ecc9dada62d8e65142d8a1faa75a6a8ce8f8355a04090265c |
|
MD5 | 4d75b203d933dcb451dc99484b7a1ea6 |
|
BLAKE2b-256 | ef05ccc27b006d83653decc5f1c6abfb90cd828178769eabf23f2b1c6d09d8ed |
File details
Details for the file vbox-0.2.5.win-amd64.exe
.
File metadata
- Download URL: vbox-0.2.5.win-amd64.exe
- Upload date:
- Size: 281.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15b71b8dfded09a5eaa1021c7ad2ac8dbe80522ccd2d8873e8ef60ba1d9c90f4 |
|
MD5 | 6606e41e99db02eae8cd251308d6f1f5 |
|
BLAKE2b-256 | 09e60cfdf0712e511814e0d41745214a5f2796de2b39ff18aab534725b91b1d8 |
File details
Details for the file vbox-0.2.5-py2.7.egg
.
File metadata
- Download URL: vbox-0.2.5-py2.7.egg
- Upload date:
- Size: 145.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44ff041ce8075ff3bcd8fbb7ac6ab2dc31ea0328f54472665af1955cef1a44a3 |
|
MD5 | eb3020ba18b28e731b8c7e71f623e665 |
|
BLAKE2b-256 | 32381e297b1be7cf5af762680e686dad9734cee1f02e411c2c095c0c50df670e |