[vbox-dev] Good News: GuestRobot project completed using VirtualBox API; plus some remarks on the API
Alexey Eromenko
al4321 at gmail.com
Fri Mar 18 15:28:29 GMT 2011
As an exercise, I learned the VirtualBox python API, and built a
project around it, named "GuestRobot".
This software does automated installation of GuestOSes, and can be
used as a QA tool for VirtualBox.
"GuestRobot" is based on parts of "kvm-autotest" project and on parts
of "vboxshell.py", and on some other old code.
It is based on some old components, and was originally written for
Qemu/KVM, but is now ported to VirtualBox, by me.
A future possibility for VirtualBox QA effort, would be porting
"kvm-autotest" project as a whole to VirtualBox.
I provide a demo, with support for Linux hosts and 2 guest OSes:
Fedora 7 and Windows XP. (this ancient Fedora was chosen due to
historical roots of this project)
You can download "GuestRobot" here:
http://www.yousendit.com/download/eURCOU1kR0ZtNEpjR0E9PQ
===========================================================================
Remarks about VirtualBox API:
The good news, is that API is feature-complete, and allowed me to do
everything I needed.
However, when 3rd party, non-Oracle person (such as myself) tries to
use the API, I did uncover some things to improve.
# Bad news: developer's documentation is hard to use, and unclear
in some cases: (SDKref.pdf)
# 1. keyboard putScancode() -- scancodes not documented. At least
a link should be provided, or document ourselves.
# 2. createMachine() -- docs unclear -- what does parameter 1 &
parameter 2?
# paremeter 3 (osTypeId) is not documented. I had to decipher it.
# 3. tutorial: unclear
# I re-read sections 2.3.1 and 2.3.2 of SDK about Python bindings, still
# it did not allow me to start wirint things. Too unclear,
lacking exmple how-to start a VM.
#
# needs at least tell users how-to start VM, and which classes
are absolutely critical:
# (vbox / session / machine / mgr ...)
# 4. VBox constants: docs unclear (had to use "vboxshell.py" as reference)
#
# I can fix some of the documentation.
#
# API itself:
# 1. more parameters could be automatic, have default values
# 1.a. example: createMachine() -- only "name" parameter is
absolutely required,
# all others computer should guess.
# 2. Keyboard: higher-level function(s) should be written.
# (I did this in python) Even your own app, "vboxshell.py"
wrote them all.
# 3. lockMachine() -- why does it return void? It can return
mutable machine object.
# In python, it looks like this:
# mach.lockMachine(session, 0)
# lockedmachine = session.machine
# it could look like:
# lockedmachine = mach.lockMachine(session, 0)
# 4. Why is createHardDisk() a separate function ?
# maybe it's functionality could get integrated into
createBaseStorage() and createDiffStorage() ?
#
Basically convenience, more documentation and higher-level keyboard
functions is all that needed.
--
-Alexey Eromenko "Technologov"
More information about the vbox-dev
mailing list