Skip to content

ReturnInfinity/BareMetal-Cloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BareMetal-Cloud

Important

This has only been tested with Digital Ocean and Proxmox. Support for other hypervisor/cloud providers (AWS, Azure, and Google Cloud) is coming soon.

BareMetal Cloud is a minimal version of the BareMetal exokernel specifically geared for running in public/private cloud instances. This minimal version of BareMetal contains only the relevant drivers, is 10,240 bytes in size, and only uses 4 MiB of memory. All other memory is allocated to the payload.

An instance of BareMetal is running in Digital Ocean at http://baremetal.returninfinity.com and will respond to HTTP and ICMP.

Prerequisites

The script in this repo depends on a Debian-based Linux system. macOS is also supported to build and test if you are using Homebrew.

  • NASM - Assembler to build the loader and kernel.
  • QEMU - Computer emulator if you plan on running a virtual machine for quick testing.
  • Git - Version control software for pulling the source code from GitHub.

In Linux this can be completed with the following command:

sudo apt install nasm qemu-system-x86 git

In macOS via Homebrew this can be completed with the following command:

brew install nasm qemu git

Components

BareMetal Cloud consists of two different projects:

Getting Started

Initial configuration

git clone https://github.com/ReturnInfinity/BareMetal-Cloud.git
cd BareMetal-Cloud
./baremetal.sh setup

baremetal.sh setup automatically runs the build and install functions. Once the setup is complete you can execute baremetal.sh run to verify that everything installed correctly.

Building

./baremetal.sh build

This command builds the boot sector, loader (Pure64), and kernel

Installing

./baremetal.sh install

This command installs the software to the disk image.

Running

./baremetal.sh run

This command will run BareMetal-Cloud in a QEMU VM. Output to the serial port will be displayed to the console.

Running in the Cloud

Create a VMDK disk image

./baremetal.sh vmdk

The resulting BareMetal_Cloud.vmdk in sys/ will be required.

Digital Ocean

In Digital Ocean click on Backups & Snapshots and then Custom Images. Click on the Upload Image button and select the .vmdk file on your filesystem. Once the file is uploaded you can start a droplet of it by clicking on the More dropdown and selecting Start a droplet.

On the Create Droplets page you can select the Droplet Type and CPU Options. Give the droplet a name and click on Create Droplet.

Proxmox

1) Create a new VM

In Proxmox click on the "Create VM" button. Configure the following settings:

  • General - Give the VM a name
  • OS - "Do not use any media"
  • System - Machine: q35
  • Disks - Remove the existing disk
  • CPU - Provision as needed
  • Memory - Provision as needed
  • Network - Model: VirtIO
  • Confirm - Click "Finish"

2) Copy the .vmdk file

Use a utility like scp to copy the .vmdk file to the filesystem of the Proxmox server.

3) Import the disk

qm importdisk <VMID> <vmdk_filename> <storage_location>

Example - qm importdisk 101 /root/BareMetal_Cloud.vmdk local-lvm

4) Attach the new disk

In the Proxmox web interface select the new VM. In the Hardware section, find the new unused disk, and attach it to the VM.

Verify the "Boot Order" in the VM "Options".

5) Start the VM

Click "Start" on the VM.

//EOF

About

BareMetal for the private/public cloud

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published