Installing and Configuring LXD on OpenNebula

Translation of the article prepared in advance of the start of the course Linux Administrator.


In this article, you will find a step-by-step guide to the basics of the OpenNebula cloud-based orchestration system on LXD. First, we will use the simple MiniONE tool to create a single-node cloud environment in a physical or virtual machine for users who want to try out OpenNebula functionality, then look at a regular working session with a GUI and CLI, and finally give some links that will help in creating a distributed production environment .

Automated Deployment with MiniONE

MiniONE is a tool that configures a physical host or virtual machine as a single-node cloud to quickly deploy a simple but fully functional test case.

To evaluate LXD, MiniONE requires a dedicated virtual machine or physical host with a fresh installation of Ubuntu 18.04 or 18.10 with at least 2GB of RAM and 20GB of free disk space, as well as privileged root access. For example, MiniONE makes it easy to build an LXD / OpenNebula environment on an Amazon virtual machine. The minimum recommended size is most likely t2.medium. Simple give her 25 GB of disk space and access to TCP port 9869, where WebUI is running.

Run the MiniONE script on the dedicated system:

wget https://github.com/OpenNebula/minione/releases/download/v5.8.0/minione
chmod u+x minione
sudo minione --lxd

Getting to know the GUI

After the step with MiniONE, you will receive instructions for connecting to the web interface like the following:

### Report
OpenNebula 5.8 was installed
Sunstone (the webui) is runninng on:
  http://192.168.100.101:9869/
Use following to login:
  user: oneadmin
  password: o6ARsMAdGe

After completing MiniONE, the first thing we will do is log in as oneadmin and look at Admin view in Sunstone, where there will be much more options than other interfaces for ordinary users. Look at all the downloaded cloud resources.

IN Admin view you can do anything with OpenNebula, but you don’t need to give these same opportunities to end users! Switch to Cloud View and see what end users will see in OpenNebula.

Interface Cloud view much simpler because it is targeted at end users. Create a new virtual machine by clicking on the + button. Select the only template available and click the Create button. After pressing the button Create You will be taken to the dashboard, where you can see all the running virtual machines.

To open the control panel, you can click on your virtual machine. There you can access it from VNC, save its state, reboot it, etc.:

By clicking on the console icon, you get to the console as root user via VNC

Using role oneadmin You can customize what your cloud users can see and do.

Meet the CLI

OpenNebula runs as oneadmin, and the main administrator must execute commands on behalf of that user, so the first thing you need to do is switch to oneadmin:

su - oneadmin

From account oneadmin you can see the loaded resources:
We have one visualization node:

onehost list

Created CentOS Image

oneimage list

Registered Virtual Machine Template:

onetemplate list

You can see the configuration of the template in more detail.

onetemplate show 0

Access MarketPlace

OpenNebula comes with pre-installed MarketPlace, from which you can get a lot of ready-made images (Apps). There is also integration with images, one of the public LXD image servers:

There are various Linux distributions: Alpine, Centos, Debian, etc., as well as some service images with pre-installed applications, such as WordPress or GitLab.

There are containers from the public LXD image server. You can find, for example, a completely fresh Ubuntu.

And download it to the repository.

Now if you go to the section Template -> VMs, you can instantiate it.

Installation Assembly on Production

If you want to deploy the cloud on production, you can read the documentation. Deploying an environment with a frontend and multiple LXD nodes requires the following steps:

Now you can deploy virtual machines using applications from MarketPlace.


Learn more about the course


Similar Posts

Leave a Reply