All Projects → ssbostan → vboxpower

ssbostan / vboxpower

Licence: Apache-2.0 license
VirtualBox Power Driver for MAAS

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to vboxpower

maasta
MAAS Terraform Ansible
Stars: ✭ 132 (+23.36%)
Mutual labels:  provisioning, maas
Foreman
an application that automates the lifecycle of servers
Stars: ✭ 2,102 (+1864.49%)
Mutual labels:  provisioning, maas
Packer Templates
Scripts and Templates used for generating Vagrant images
Stars: ✭ 219 (+104.67%)
Mutual labels:  virtualbox, driver
hwidspoofer
HardwareID Spoofer using kernelmode
Stars: ✭ 68 (-36.45%)
Mutual labels:  driver
laravel-postal
This library integrates Postal with the standard Laravel mail framework.
Stars: ✭ 20 (-81.31%)
Mutual labels:  driver
rust-radio-sx127x
Rust driver for the Semtech SX127x series of Sub-GHz LoRa/ISM radio transceivers
Stars: ✭ 21 (-80.37%)
Mutual labels:  driver
linux nvidia jetson
Allied Vision CSI-2 camera driver for NVIDIA Jetson Systems. Currently supporting Nano, TX2, AGX Xavier, and Xavier NX. Support for TX2 NX coming soon.
Stars: ✭ 68 (-36.45%)
Mutual labels:  driver
docker-hands-on-guide
Hands on guide for docker, k8s cluster lightweight virtualization.
Stars: ✭ 25 (-76.64%)
Mutual labels:  virtualbox
vm-automation
VirtualBox automation using Python
Stars: ✭ 1 (-99.07%)
Mutual labels:  virtualbox
KMAC
Some usefull info when reverse engineering Kernel Mode Anti-Cheat
Stars: ✭ 31 (-71.03%)
Mutual labels:  driver
maas-ui
The UI for MAAS (metal-as-a-service)
Stars: ✭ 20 (-81.31%)
Mutual labels:  maas
soxy-driver
A docker networking driver that transparently tunnels docker containers TCP traffic through a proxy
Stars: ✭ 25 (-76.64%)
Mutual labels:  driver
remote-virtualbox
🍰 Little package to do simple things with VirtualBox remotely using it's SOAP API
Stars: ✭ 18 (-83.18%)
Mutual labels:  virtualbox
crystal-sqlite3
SQLite3 bindings for Crystal
Stars: ✭ 118 (+10.28%)
Mutual labels:  driver
tx2-flash
Guidance to flash JetPack to NVIDIA TX2 with Mac through a VirtualBox (VM)
Stars: ✭ 40 (-62.62%)
Mutual labels:  virtualbox
ant-arduino
An implementation of a ANT driver for Arduino, Mbed and ESP-IDF
Stars: ✭ 69 (-35.51%)
Mutual labels:  driver
kickoff
Project Bootstrapping Tool
Stars: ✭ 22 (-79.44%)
Mutual labels:  provisioning
warewulf
Warewulf is a stateless and diskless container operating system provisioning system for large clusters of bare metal and/or virtual systems.
Stars: ✭ 90 (-15.89%)
Mutual labels:  provisioning
embedded-ccs811-rs
Platform agnostic Rust driver for the CCS811 ultra-low power digital gas sensor for monitoring indoor air quality
Stars: ✭ 12 (-88.79%)
Mutual labels:  driver
insaneworks-packer-template
CentOS 7-8 8Stream / AlmaLinux 8 / FreeBSD 12 - 13 x64 + VirtualBox / VMWare for Packer Template + FreeBSD 13 / AlmaLinux 9 + Parallels
Stars: ✭ 38 (-64.49%)
Mutual labels:  virtualbox

vboxpower

Visits Badge GitHub license GitHub stars Twitter Follow LinkedIn Follow

Stargaze GitHub Repo stars if you find it useful.

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 python3 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 && sudo apt install -y python3-pip python3
sudo ./deploy

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

Recommended Architecture

If you want to deploy MAAS inside a virtual machine as well, I recommend you to make an environment like the following architecture. In this architecture, you need two virtual machines to create the MAAS stack. The former is a firewall which I suggest use pfSense, OpenWrt, Ubuntu (MASQUERADE), and the latter is a virtual machine that the MAAS is deployed on that. In addition to these essential virtual machines, create target virtual machines, the machines that you want to be deployed by the MAAS platform.

vboxpower architecture

The PURPLE path shows the path of the way the MAAS machine accesses the internet.

The RED path shows the path of power management of the target machine.

The GREEN path shows the path of how the MAAS deploys the target machine.

The YELLOW path shows the path of the way the target machine accesses the internet.

How to contribute:

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

Copyright 2021 Saeid Bostandoust [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].