Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: VBoxTool: VirtualBox automation framework  (gelezen 5285 keer)

Offline markba

  • Lid
    • http://markbaaijens.nl/
VBoxTool: VirtualBox automation framework
« Gepost op: 2008/09/24, 10:13:45 »
Mijn meest recente Open Source-project: VBoxTool

Citaat
Easy control of virtual machines of VirtualBox  (virtualization solution) on a Linux headless server, published as free and open source software.

Currently VirtualBox lacks a decent management environment for controlling virtual sessions on a headless server environment. VBoxTool mimics partly Virtual Machine Manager  which controls sessions for other virtualization solutions like qemu, kvm, etc. Unfortunately, VirtualBox is not in the list of supported engines (nor will be in the near future).

Heart of the framework is a script with which it is possible to start, stop, save, backup and show status of registered sessions in batch mode; execution is by command line. Next to develop is a webserver which points to the control script. With this you can activate all functions from the script, all by a web page.
Met behulp van een script kun je dus eenvoudig, snel en betrouwbaar vbox-sessies besturen (starten, stoppen, backuppen, etc.) alsmede de status opvragen. Dit is met name in een omgeving zonder GUI (headless server) erg handig, want als je wel een GUI hebt als GNOME, kun je terugvallen op de bij VirtualBox meegeleverde GUI manager.

Veel kan geconfigureerd worden in een apart bestand. Daarmee wordt het mogelijk om gecontroleerd een aantal sessies op te starten, waarbij bovendien de VRDP-poort (dynamisch) ingesteld kan worden. Daarmee/daardoor kun je door middel van een willekeurige RDP-client contact kunt krijgen met de sessie, handig als de sessie op (aparte) server draait en benaderd moet worden via een desktop-client.

Ook dynamische port-forwarding kan geconfigureerd worden middels een configuratiebestand. Daarmee is host-interfacing niet meer nodig (nogal een crime onder Linux) maar kun je 'lekker' met NAT verdergaan, eenvoudiger kan niet.
Hier wat achtergrond: http://vboxtool.sourceforge.net/portforwarding.html

Het is de bedoeling om het raamwerk verder uit te bouwen met bijvoorbeeld een webserver (die dan weer dat script bestuurt en een Munin-plugin om performance en status runtime te monitoren (via een aparte Munin-webserver).

Versie 0.2 staat ter download op de Sourceforge-pagina, iedereen die hier iets mee wil, kan er mee aan de slag. Ben benieuwd naar een terugkoppeling.

Website: http://vboxtool.sourceforge.net/
Download: http://sourceforge.net/project/showfiles.php?group_id=239993
Sourceforge: http://sourceforge.net/projects/vboxtool

EDIT. Aanpassing voor 0.2.

Offline kennywest

  • Lid
    • http://kennywest.blogspot.com
VBoxTool: VirtualBox automation framework
« Reactie #1 Gepost op: 2008/09/24, 18:47:04 »
De beta van VMWare Server 2 (nog altijd gratis overigens) heeft de meeste zaken die je aanhaalt (zoniet alle) ook al een tijdje aan boord :)

Offline markba

  • Lid
    • http://markbaaijens.nl/
VBoxTool: VirtualBox automation framework
« Reactie #2 Gepost op: 2008/09/24, 20:51:20 »
Ach, vrijheid is een keuze. Bovendien laat vbox zich in tegenstelling tot VMware zeer eenvoudig installeren. Maar bovenal, zo'n framework bedenken en ontwikkelen is vooral leuk!

Offline markba

  • Lid
    • http://markbaaijens.nl/
VBoxTool: VirtualBox automation framework
« Reactie #3 Gepost op: 2008/10/02, 22:27:13 »
Voor de geinteresseerden: versie 0.2 van VBoxTool is uitgebracht.

Aanpassingen:
- configureerbare port forwarding: geen host interfacing meer nodig
- mogelijkheid om regels uit te commentarieren uit /etc/vbox/machines.conf met '#'

Voor port forwarding, hier wat achtergrond-info: http://vboxtool.sourceforge.net/portforwarding.html

Website: http://vboxtool.sourceforge.net/
Download: http://sourceforge.net/project/showfiles.php?group_id=239993
Sourceforge: http://sourceforge.net/projects/vboxtool

Offline markba

  • Lid
    • http://markbaaijens.nl/
Re: VBoxTool: VirtualBox automation framework
« Reactie #4 Gepost op: 2009/07/04, 20:40:59 »
Voor de geinteresseerden: versie 0.4 van VBoxTool heb ik vandaag uitgebracht.

Belangrijkste punten is dat het nu werkt met VBox > 2.2, en onder Jaunty.

Website: http://vboxtool.sourceforge.net/
Download: http://sourceforge.net/project/showfiles.php?group_id=239993
Sourceforge: http://sourceforge.net/projects/vboxtool

Een volledig overzicht van wijzigingen:
http://vboxtool.svn.sourceforge.net/viewvc/vboxtool/tags/release-0.4/changelog.txt?view=markup

    * Major bug fixes
          o Auto start en stop stopped working in Ubuntu Jaunty (bug 2789649)
          o VBoxTool is working again with VirtualBox >= 2.2 (bug 2775886)
          o Command 'vboxtool stop' stops sessions (by poweroff). (bug 2317852)
    * Enhancements
          o Configurable backup folder (feature request 2213713)
          o Added logging (feature request 2275101).
          o Added option 'vboxtool showconfig' (feature request 2275280)
          o Sessions are paused in stead of saved prior to backup (feature request 2805829).
    * Minor bug fixes & enhancements
          o Extracting of default folders is working again; due to changed CLI-output from VBoxManage (bug 2815159)
          o Output of vboxtool does now contain 'backup' (feature request 2813155)
          o Modifying vboxtoolinit to work with OpenSolaris/Solaris (bug 2527710).
          o Backup destination path is shown in logfile (feature request 2806034)
          o Added a generic -nologo for VBoxManage command (feature request 2393874).
          o Expanded readme.txt, added configuration details (feature request 2275085).
          o When issuing vboxtoolinit, it produced an error. (bug 2317839).
          o  Documented backup option in help (feature request 2216423).
          o Pause state was not detected. (bug 2318332).
          o Modified output of 'show' and 'showrun' command for consistency and easy text manipulation
          o Code refactoring, changed all variable name: consistent separator '_'
« Laatst bewerkt op: 2009/07/04, 21:14:20 door markba »

Offline markba

  • Lid
    • http://markbaaijens.nl/
Re: VBoxTool: VirtualBox automation framework
« Reactie #5 Gepost op: 2012/04/30, 09:51:13 »
Na een lange tussenperiode, heb ik weer een update van mijn projectje gedaan en deze naar versie 0.5 gebracht. Nu is het script compatibel met 4.x (downwards naar 3.x) en werkt het ook voor de OSE-versie.
http://vboxtool.sourceforge.net/

Een compleet revisielog:
Citaat
0.5 2012-04-29
  - This version will break compatability of 2.x versions, i.e. these are not supported anymore
    but they may still work
  - Extended compatability:
    - compatible with version 4.x while providing backwards compatability with 3.x
    - compatible with ose version (3.x/4.x) while providing backwards compatability with non-ose
  - Option syntax single dash is deprecated in VBox 3.1.x. These should be replaced by a double
    dash. (bug 2908385)
  - Backup repaired. In 3.x, de extraction for the main vdi-file is changed, grep for "Primary
    master" is changed into "(UUID:". Also added log-messages and made copying of snapshots
    conditional. (bug 2954442 & 2903768; note that this bug in not entirely solved, because
    handling multiple vdi's is not yet supported).
  - Extraction of PID for status purposes is made more specific. This is done by using UUID for
    identification and an extra grep on "[v]irtualbox". This solves the problem that there are
    multiple PID's returned (thus resulting in an error); this is the case when the name of a
    session is a substring of another session and also when the name of the session is, by
    coincidence the same as another daemon (say: oracle for the vbox-session and for the
    database server). (bug 2961192 & 2836110)
  - When there is no VRDP-port defined in machines.conf, do not apply this (bug 2893328)
  - Repair double dash option syntax in $vbox_command modifyvm $uuid -vrdpport
  - Removing the requirement of having a trailing comma in machines.conf (bug 2952485)
  - When a vm is not or registered invalid in machines.conf, show and log a warning; this will
    facilitate debugging
  - Dynamic setting of the vbox starttype: either 'vrdp' or 'headless'. On version 4.x only the
    option 'headless' exist, both in ose or non-ose. But in version 3.x, option 'vrdp' is
    available, but *only* in the non-ose variant; the ose version only has 'headless'. Using
    'headless' on a non-ose version essentially disables vrdp functionallity so it is not safe
    to use headless on the only option. The strategy is to find out if a vrdp option is available,
    otherwise use headless. This strategy means compatability between 3.x and 4.x to both versions
    ose and non-ose.
    - bug 3151695
    - feature request 2854538
    - patch 2948748
  - Do not use VRDP because it is deprecated, use VRDE. To provide backwards compatability with 3.x,
    the correct syntax is determined dynamically (bug 3518250)
  - Do not set VRDP-ports when VRDP is disabled. This is the case when using 3.x/ose or 4.x without
    an extension pack. It is not only useless but also risky because the setting seems to work but
    the VRDP-port is not stored, so everytime the session starts, the current state is discarded as
    the first step of (trying to) set to VRDP-port. Discarding state multiple times can lead to
    data loss of session corruption (bug 3518251)

 Inmiddels heeft de download-teller over het totaal de 20.000 al gepasseerd (sinds eind 2008), dus blijkbaar is er best behoefte aan zoiets.
« Laatst bewerkt op: 2012/04/30, 09:53:18 door markba »