VirtualBox Power Driver for MAAS (Metal as a Service)

Overview

vboxpower

VirtualBox Power Driver for MAAS (Metal as a Service)

A way to manage the power of VirtualBox virtual machines via the MAAS webhook driver.

What is MAAS?

MAAS (Metal as a Service) is a tool to turns real servers into bare-metal cloud. With MAAS, you can automate server provisioning and installing OS remotely on both physical and virtual servers. MAAS.io for more information.

What is vboxpower?

vboxpower is a wrapper to enabling MAAS to manage VirtualBox virtual machines power directly. As you know, MAAS does not natively support VirtualBox power management. Before vboxpower, you had to use manual power type for VirtualBox machines, the process of starting/stopping virtual machines did manually but with vboxpower this process is done automatically. So to speak, the prophecy of the vboxpower is translating power commands between VirtualBox and MAAS.

How to install vboxpower:

Both MAAS and vboxpower are written in Python language. So, you don't need another language to run vboxpower.

Prerequisites:

  1. VirtualBox 6+ installed and running.
  2. VirtualBox SDK https://www.virtualbox.org/wiki/Downloads
  3. VirtualBox Extension Pack to support PXE boot.

VirtualBox SDK installation tips:

Download and extract VirtualBox SDK and run the following command.

sudo VBOX_INSTALL_PATH=/usr/lib/virtualbox python vboxapisetup.py install

Get started:

To deploy vboxpower, you need python3-pip to install the required packages.

The deploy script creates systemd service and copies vboxpower.py to /opt/maas/vboxpower directory.

After deployment, the deploy script starts the vboxpower service.

sudo apt update && apt install -y python3-pip
sudo ./start

Test vboxpower:

The vboxpower is listening on port 5241/tcp on all interfaces.

You should be able to see the list of available VirtualBox virtual machines with curl command.

curl 192.168.56.1:5241
{
  "machines": [
    {
      "links": {
        "off": "/pfsense/off",
        "on": "/pfsense/on",
        "status": "/pfsense/status"
      },
      "name": "pfsense",
      "status": "running"
    },
    {
      "links": {
        "off": "/maas/off",
        "on": "/maas/on",
        "status": "/maas/status"
      },
      "name": "maas",
      "status": "running"
    }
  ]
}

Integration with MAAS:

Each virtual machine exposes three endpoints that are used for vm power management.

  • http://HOST_IP:5241/VM_NAME/on
  • http://HOST_IP:5241/VM_NAME/off
  • http://HOST_IP:5241/VM_NAME/status

Use these endpoints on MAAS Webhook power URI, respectively.

I have tested the process on Ubuntu 20.04, MAAS 3.0, and VirtualBox 6.1.16 completely.

Other versions should be work without problem.

demo

How to contribute:

All contributions are welcomed. If you find any bugs, please file an issue.

Copyright 2021 Saeid Bostandoust [email protected]

Owner
Saeid Bostandoust
DevOps Engineer
Saeid Bostandoust
This is a repository built by the community for the community.

Nutshell Machine Learning Machines can see, hear and learn. Welcome to the future 🌍 The repository was built with a tree-like structure in mind, it c

Edem Gold 82 Nov 18, 2022
Cross-Encoder-with-Bi-Encoder를 활용한 WebPage 데모

Retrieval_Streamlit_Demo Cross-Encoder-with-Bi-Encoder를 활용한

5 Dec 29, 2021
Python framework to build apps with the GASP metaphor

Gaspium Python framework to build apps with the GASP metaphor This project is part of the Pyrustic Open Ecosystem. Installation | Documentation | Late

5 Jan 01, 2023
Stack BOF Protection Bypass Techniques

Stack Buffer Overflow - Protection Bypass Techniques

ommadawn46 18 Dec 28, 2022
A streaming animation of all the edits to a given Wikipedia page.

WikiFilms! What is it? A streaming animation of all the edits to a given Wikipedia page. How it works. It works by creating a "virtual camera," which

Tal Zaken 2 Jan 18, 2022
A python script developed to process Windows memory images based on triage type.

Overview A python script developed to process Windows memory images based on triage type. Requirements Python3 Bulk Extractor Volatility2 with Communi

CrowdStrike 245 Nov 24, 2022
A modern Python build backend

trampolim A modern Python build backend. Features Task system, allowing to run arbitrary Python code during the build process (Planned) Easy to use CL

Filipe Laíns 39 Nov 08, 2022
This package tries to emulate the behaviour of syntax proposed in PEP 671 via a decorator

Late-Bound Arguments This package tries to emulate the behaviour of syntax proposed in PEP 671 via a decorator. Usage Mention the names of the argumen

Shakya Majumdar 0 Feb 06, 2022
This is a library to do functional programming in Python.

Fpylib This is a library to do functional programming in Python. Index Fpylib Index Features Intelligents Ranges with irange Lazyness to functions Com

Fabián Vega Alcota 4 Jul 17, 2022
Pipenv-local-deps-repro - Reproduction of a local transitive dependency on pipenv

Reproduction of the pipenv bug with transitive local dependencies. Clone this re

Lucas Duailibe 2 Jan 11, 2022
AMTIO aka All My Tools in One

AMTIO AMTIO aka All My Tools In One. I plan to put a bunch of my tools in this one repo since im too lazy to make one big tool. Installation git clone

osintcat 3 Jul 29, 2021
A play store search module

A play store search module

Fayas Noushad 5 Dec 01, 2021
A simple project which is a ecm to found a good way to provide a path to img_dir in gooey

ECM to find a good way for img_dir Path in Gooey This code is just an ECM to find a good way to indicate a path of image in image_dir variable. We loo

Jean-Emmanuel Longueville 1 Oct 25, 2021
Coinloggr - A learning resource and social platform for the coin collecting community

Coinloggr A learning resource and social platform for the coin collecting commun

John Galiszewski 1 Jan 10, 2022
Desafio Final do Mod1 do Bootcamp EDC - v2 usando a RAIS

IGTI - Bootcamp Engenheiro de Dados Cloud Módulo 1 - Desafio Final - RAIS 2020 Código do Desafio Final V2 do Bootcamp Engenheiro de Dados Cloud do IGT

Neylson Crepalde 17 Nov 02, 2022
Exploiting Linksys WRT54G using a vulnerability I found.

Exploiting Linksys WRT54G Exploit # Install the requirements. pip install -r requirements.txt ROUTER_HOST=192.169.1.1 ROUTER_USERNAME=admin ROUTER_P

Elon Gliksberg 31 May 29, 2022
Drop-down terminal for GNOME

Guake 3 README Introduction Guake is a python based dropdown terminal made for the GNOME desktop environment. Guake's style of window is based on an F

Guake 4.1k Dec 25, 2022
Audio2Face - a project that transforms audio to blendshape weights,and drives the digital human,xiaomei,in UE project

Audio2Face - a project that transforms audio to blendshape weights,and drives the digital human,xiaomei,in UE project

FACEGOOD 732 Jan 08, 2023
HashDB Binary Ninja Plugin

HashDB Plugin (v0.1) Author: Vector 35 Inc Plugin for interacting with the OALABS HashDB service. Description: Plugin that can be used to lookup hashe

Jordan 3 Jul 30, 2022
Python template for Advent of Code event

Advent of Code Python Starter A tamplate for Advent of Code write in Python. Usage The project use poetry for project manager. Clone this repository a

Leonardo Gago 6 Dec 31, 2022