{"id":19826697,"url":"https://github.com/ssbostan/vboxpower","last_synced_at":"2025-08-19T11:09:11.679Z","repository":{"id":43453710,"uuid":"390303217","full_name":"ssbostan/vboxpower","owner":"ssbostan","description":"VirtualBox Power Driver for MAAS","archived":false,"fork":false,"pushed_at":"2023-12-05T05:56:17.000Z","size":1962,"stargazers_count":144,"open_issues_count":1,"forks_count":19,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-01T14:42:58.244Z","etag":null,"topics":["driver","maas","provisioning","ubuntu","virtualbox"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ssbostan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-07-28T10:04:10.000Z","updated_at":"2025-03-10T17:14:10.000Z","dependencies_parsed_at":"2025-05-01T14:37:46.244Z","dependency_job_id":"cf49fac7-262b-4cb7-9bc5-3946cb9eee2c","html_url":"https://github.com/ssbostan/vboxpower","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ssbostan/vboxpower","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbostan%2Fvboxpower","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbostan%2Fvboxpower/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbostan%2Fvboxpower/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbostan%2Fvboxpower/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssbostan","download_url":"https://codeload.github.com/ssbostan/vboxpower/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssbostan%2Fvboxpower/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271143398,"owners_count":24706346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["driver","maas","provisioning","ubuntu","virtualbox"],"created_at":"2024-11-12T11:11:18.737Z","updated_at":"2025-08-19T11:09:11.647Z","avatar_url":"https://github.com/ssbostan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vboxpower\n\n[![GitHub license](https://img.shields.io/github/license/ssbostan/vboxpower)](https://github.com/ssbostan/vboxpower/blob/master/LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/ssbostan/vboxpower)](https://github.com/ssbostan/vboxpower/stargazers)\n![Twitter Follow](https://img.shields.io/twitter/follow/saeidbostan?style=social)\n![LinkedIn Follow](https://shields.io/badge/style-ssbostan-black?logo=linkedin\u0026label=LinkedIn\u0026link=https://www.linkedin.com/in/ssbostan)\n\nStargaze ![GitHub Repo stars](https://img.shields.io/github/stars/ssbostan/vboxpower?style=social) if you find it useful.\n\nVirtualBox Power Driver for MAAS (Metal as a Service)\n\nA way to manage the power of VirtualBox virtual machines via the MAAS webhook driver.\n\n## What is MAAS?\n\nMAAS (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](https://maas.io/) for more information.\n\n## What is vboxpower?\n\n`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.\n\n## How to install vboxpower:\n\nBoth MAAS and vboxpower are written in Python language. So, you don't need another language to run vboxpower.\n\n### Prerequisites:\n\n  1. VirtualBox 6+ installed and running.\n  2. VirtualBox SDK https://www.virtualbox.org/wiki/Downloads\n  3. VirtualBox Extension Pack to support PXE boot.\n\n### VirtualBox SDK installation tips:\n\nDownload and extract VirtualBox SDK and run the following command.\n\n```bash\nsudo VBOX_INSTALL_PATH=/usr/lib/virtualbox python3 vboxapisetup.py install\n```\n\n### Get started:\n\nTo deploy vboxpower, you need `python3-pip` to install the required packages.\n\nThe deploy script creates systemd service and copies `vboxpower.py` to `/opt/maas/vboxpower` directory.\n\nAfter deployment, the deploy script starts the vboxpower service.\n\n```bash\nsudo apt update \u0026\u0026 sudo apt install -y python3-pip python3\nsudo ./deploy\n```\n\n### Test vboxpower:\n\nThe vboxpower is listening on port 5241/tcp on all interfaces.\n\nYou should be able to see the list of available VirtualBox virtual machines with `curl` command.\n\n```bash\ncurl 192.168.56.1:5241\n{\n  \"machines\": [\n    {\n      \"links\": {\n        \"off\": \"/pfsense/off\",\n        \"on\": \"/pfsense/on\",\n        \"status\": \"/pfsense/status\"\n      },\n      \"name\": \"pfsense\",\n      \"status\": \"running\"\n    },\n    {\n      \"links\": {\n        \"off\": \"/maas/off\",\n        \"on\": \"/maas/on\",\n        \"status\": \"/maas/status\"\n      },\n      \"name\": \"maas\",\n      \"status\": \"running\"\n    }\n  ]\n}\n```\n\n### Integration with MAAS:\n\nEach virtual machine exposes three endpoints that are used for vm power management.\n\n  - http://**HOST_IP**:5241/**VM_NAME**/on\n  - http://**HOST_IP**:5241/**VM_NAME**/off\n  - http://**HOST_IP**:5241/**VM_NAME**/status\n\nUse these endpoints on MAAS Webhook power URI, respectively.\n\nI have tested the process on Ubuntu 20.04, MAAS 3.0, and VirtualBox 6.1.16 completely.\n\nOther versions should be work without problem.\n\n![demo](https://raw.githubusercontent.com/ssbostan/vboxpower/master/demo.gif)\n\n## Recommended Architecture\n\nIf 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.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"vboxpower architecture\" src=\"https://raw.githubusercontent.com/ssbostan/vboxpower/master/architecture.png\"\u003e\n\u003c/p\u003e\n\nThe ![PURPLE](https://via.placeholder.com/15/9673A6/000000?text=+) path shows the path of the way the MAAS machine accesses the internet.\n\nThe ![RED](https://via.placeholder.com/15/B85450/000000?text=+) path shows the path of power management of the target machine.\n\nThe ![GREEN](https://via.placeholder.com/15/82B366/000000?text=+) path shows the path of how the MAAS deploys the target machine.\n\nThe ![YELLOW](https://via.placeholder.com/15/D6B656/000000?text=+) path shows the path of the way the target machine accesses the internet.\n\n## How to contribute:\n\nAll contributions are welcomed. If you find any bugs, please file an issue.\n\nCopyright 2021 Saeid Bostandoust \u003cssbostan@linuxmail.org\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssbostan%2Fvboxpower","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssbostan%2Fvboxpower","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssbostan%2Fvboxpower/lists"}