Blog Article:

Docker-Machine OpenNebula Plugin

Jaime Melis

Feb 29, 2016

Ever since the last post about Docker Machine things have evolved quite a bit, and we would like to keep you up to date!

Docker-Machine has changed its plugin architecture, and we have since then adapted to this new architecture and registered the OpenNebula plugin.

It’s very easy to install OpenNebula support for Docker Machine. You will need to have a fully working OpenNebula cloud, and it must be accessible from your client machine, you can use ONE_AUTH and ONE_XMLRPC to connect to OpenNebula. Read more here: OpenNebula Shell Environment.

NOTE: This guide is specific for KVM, if you would like to try this plugin out with the vCenter hypervisor, or with vOneCloud, there are a few small differences, so make sure you read this: Docker Machine OpenNebula plugin with vCenter. In particular you will need to use the option –opennebula-template-* instead of –opennebula-image-*.

You will also need to download a Boot2Docker image, don’t worry, we’ve got that covered! We have uploaded two images to the official OpenNebula MarketPlace prepared to be used as Docker Engine machines:

You can download either of those two images into your OpenNebula instance and use them for Docker Machine. Or, you can prepare your own image, using your favourite distribution, as long as it’s supported by Docker Machine and it has the latest OpenNebula Contextualization packages.

The following diagram visualizes how we are going connect from a local computer, the docker client, to a docker engine deployed in a provider: OpenNebula in our case.


Once the requirements have been fulfilled, let’s go ahead with this simple installation:

  • Step 1: Install Docker Machine in your client machine.
  • Step 2: Follow these instructions to build the driver again in the client machine. In a nutshell you will need to do the following:

    $ go get
    $ cd $GOPATH/src/
    $ make build
    $ make install

    However, for any clarifications, please make sure to read the Docker Machine OpenNebula Driver plugin guide.

Once you have installed it, you will be able to use Docker-Machine with OpenNebula as your backend:

$ docker-machine create --driver opennebula --opennebula-network-name private --opennebula-image-name boot2docker --opennebula-data-size 10240 mydockerengine
$ eval $(docker-machine env mydockerengine)

As simple as that! This will start a new VM in OpenNebula, and it will be your new Docker Engine!

I would like to personally thank Marco Mancini for doing the new plugin integration and helping devising and designing this integration!

This is not the last you’ll hear from us. We will publish soon a guide on how to use Docker Machine to deploy Docker Swarm using OpenNebula as the backend. We also have some more surprises involving OneFlow. Stay tuned!

And now, go try it out and have fun!

1 Comment

  1. Oleg

    [oneadmin@controller ~]$ docker-machine ls
    mydockerengine – opennebula Error Unknown [VirtualMachinePoolInfo] User couldn’t be authenticated, aborting call.


Submit a Comment

Your email address will not be published. Required fields are marked *