Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

Plugin Information

View VirtualBox on the plugin site for more information.

This plugin is up for adoption. Proposing a new maintainer to support plugin. Click here to learn more!

This plugin integrates Jenkins with VirtualBox (version 3, 4.0, 4.1, 4.2 and 4.3) virtual machine.

Configuration

VirtualBox cloud

The first step is the VirtualBox cloud configuration:

  1. Configure the VirtualBox server, that allows to remotely manage VMs, and start it.

    VBoxManage setproperty websrvauthlibrary null
    vboxwebsrv

  2. Manage Jenkins -> Configure System -> Cloud -> Add a new cloud -> VirtualBox
  3. Set Name, URL, Username and Password
  4. Test connection

    If it doesn't work, then you can try to disable authentication library by executing following command on VirtualBox host:
    VBoxManage setproperty websrvauthlibrary null

    If you got this error:

    Runtime modeler error: Wrapper class org.virtualbox_3_1.IWebsessionManagerLogon is not found. Have you run APT to generate them?

    Then you should upgrade Java (probably it is a bug in jax-ws). Also note that plugin was tested on Java 1.6.0_19.

VirtualBox slave

Now you can setup your nodes in Jenkins and use them to build your projects:

  1. Add Manage Jenkins -> Manage Nodes -> New Node
  2. Set Node name for VirtualBox Slave
  3. Select VirtualBox Host, Virtual Machine Name and Virtual Machine Type

TODO

  1. restore snaphot (beta version available in the github repository as branch (snap))
  2. build wrapper

Changelog

Version 0.7 (October 21, 2013)
  • Added VirtualBox 4.3 support
Version 0.6 (October 7, 2012)
Version 0.5 (September 21, 2012)
Version 0.4.6 (March 1, 2012)
  • Added Virtual Machine Types 'gui' and 'sdl' (issue #9752)
Version 0.4.4 (February 22, 2012)
  • Added support for VirtualBox version 4.0 and 4.1 (issue #8634)
Version 0.2.1 (April 27, 2010)
  • Fixed critical bug, which prevented creation of node (JENKINS-6375)
Version 0.2 (April 18, 2010)
  • Used official virtualbox library, reimplemented launch process
  • Fixed delegation to user-specified launcher (JENKINS-6276)
  • Added type of start - headless or vrdp (JENKINS-6279)
  • VirtualBoxBuildWrapper disabled
Version 0.1 (April 12, 2010)
  • Added VirtualBoxBuildWrapper
  • Added VirtualBoxSlave
  • Tested on VirtualBox 3.1.6 r59338, Jenkins 1.346, Java 1.6.0_19
  • First version published

21 Comments

  1. Unknown User (alex.lavoro.propio@gmail.com)

    Could you please provide more documentation ? I understand this is a turn-key plugin. I'd search everywhere but in vain.

    I have no idea what to setup in order to fill the fields required to add a "cloud". Where should I obtain the URL, username, password?

    In the issue 6721, it suggested the use of 'vboxwebserv' but I still don't get it.

  2. Unknown User (alex.lavoro.propio@gmail.com)

    I am picking up the 2 tasks in the TODO list and doing modification to this plugin so that a job can start a VM with a specified snapshot (or the current state), and optionally discard all changes and restore the VM state after the build finishes. If anyone is also working on these, please let me know.

    1. Unknown User (espen@albrektsen.net)

      Any progress?

      I would love to use VirtualBox for installation testing.The snapshot rollback feature would of course extremely helpfull then...

      Espen

  3. In my case the cloud has been configured successfully.

    But in the node configuration page, after selecting the cloud ('VirtualBox Host'), no 'Virtual Machine Name' is available for selection.

    Any idea on why this is happening?

    Thanks

  4. Unknown User (daniel.tkatch@smeet.com)

    Does the plugin also shut down the Virtual Box nodes after they are not necessary or marked offline?

  5. Unknown User (nyoung02)

    Hi, Are there any plans to update this plugin so that it works with more recent releases of Jenkins/VirtualBox? It would be very useful to know if this is a dead project or not.

  6. Unknown User (pburden)

    Some additional help:

    - URL line is in the format http://host:port:

    http://192.168.0.100:18903

    - The instructions to launch vboxwebserv only work if jenkins and vbox is on the same system and accessed via localhost. On a separate box add arguments (where 192.168.0.100 is replaced with your vbox machine's host or IP from the URL line) : 

    vboxwebsrv -H 192.168.0.100 -p 18083 -F /tmp/vbox.log 

  7. Unknown User (krikar)

    • I run the latest plugin from from github branch snap.
    • I have 10 different virtual boxes defined as 10 different nodes, with a label VIRTUALBOX.
    • These 10 nodes, are defined to be taken off-line when idle, and o-nline when in demand.
    • I have 1 job that will use any node that matches the label VIRTUALBOX.

    Thing is that the when the 1 (one) job is launched, Jenkins brings all 10 machines on-line. I expected only 1 virtualbox to be brought on-line.
    What happen here?

    1. Unknown User (hgomez)

      Did you opened a ticket ?

  8. Unknown User (sfarbota)

    I am having an issue which I described here on SQA.StackExchange.com.

    Does anyone know what my issue may be?

  9. Unknown User (beefsalad)

    I'm having issues with this plugin (I suspect)  Details can be found at

    https://gist.github.com/f2551eafc61061ef8334

    I am beefsalad on IRC, so I'm easy to find ;)

  10. Unknown User (testwhat)

    I meet a problem, the plugin failed to add any of my VBox machine nodes.
    I start the command successfully in the virtualbox host:

    VBoxManage setproperty websrvauthlibrary null 
    vboxwebsrv

    and I have connected to VirtualBox host successfully in Jenkins("Manage Jenkins" page)
    But still can't add node, this is the output on Jenkins slave log:

    [VirtualBox] Sleep before stage 2 launcher, attempt 1
    [VirtualBox] Starting stage 2 launcher (JNLPLauncher)
    [VirtualBox] Stage 2 launcher completed
    [VirtualBox] Sleep before stage 2 launcher, attempt 2
    [VirtualBox] Starting stage 2 launcher (JNLPLauncher)
    [VirtualBox] Stage 2 launcher completed
    [VirtualBox] Sleep before stage 2 launcher, attempt 3
    [VirtualBox] Starting stage 2 launcher (JNLPLauncher)
    [VirtualBox] Stage 2 launcher completed
    [VirtualBox] Sleep before stage 2 launcher, attempt 4
    [VirtualBox] Starting stage 2 launcher (JNLPLauncher)
    [VirtualBox] Stage 2 launcher completed
    [VirtualBox] Sleep before stage 2 launcher, attempt 5
    [VirtualBox] Starting stage 2 launcher (JNLPLauncher)
    [VirtualBox] Stage 2 launcher completed

    Jenkins try to connect to Virtual Machine continuously
    I'm not sure what the problem is...

    Jenkins settings for VirtualBox:

    1. Unknown User (bjones14)

      You need to setup the slave to launch the Jenkins JNLP at startup - the plugin doesn't actually execute the JNLP agent on the slave, it just waits for a connection.

  11. Unknown User (mesulog)

    I am facing the same issue as 'test what'.

    The VirtualMachine starts but not the Jenkins-slave agent via JLNP.

    What is the procedure for using this plugin on a Windows VirtualBox guest ?

    1. Unknown User (bjones14)

      You need to setup the slave to launch the Jenkins JNLP at startup - the plugin doesn't actually execute the JNLP agent on the slave, it just waits for a connection.

  12. Unknown User (michel117)

    Hello,

    is it planned to integrate the snapshot mechanism to a release? I would test it if you like!

    Is this project still active?

    Thank you for your awesome work!

  13. Unknown User (michel117)

    Hello,

    is it planned to integrate the snapshot mechanism to a release? I would test it if you like!

    Is this project still active?

    Thank you for your awesome work!

    P.S.: Could someone help me installing the "snap" branch ? It contains no *.hpi file and I don't know how to convert it to a plugin.

  14. Unknown User (mesulog)

    Hello,

    Can we expect a version of this plugin which will provide compatibility with VirtualBox 5.0 ?

    Regards,

  15. Unknown User (ruderik)

    Hi,

    I'm successfully using this fork with VirtualBox 5.1.6; https://github.com/swurzinger/virtualbox-plugin

     

  16. Unknown User (bjones14)

    I have forked this and added support for VirtualBox 5.2 and 6.0.

    I have also added a feature to limit the amount of machines that can be active at once on a given host.

    https://github.com/bjones14/virtualbox-plugin


  17. Unknown User (bjones14)

    Also, for those struggling to get JNLP to work, this article solved my issue:

    JENKINS-39232 - Getting issue details... STATUS

    This line needs to be executed either on Jenkins start or through the script console

    jenkins.slaves.DefaultJnlpSlaveReceiver.disableStrictVerification=true

    This will fix the issue with Jenkins claiming that your node is not a valid JNLP agent.