Skip to content

Anmol202005/ServerMVM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MicroVM Provisioner

A Go-based service that creates microVMs using Firecracker and provides SSH access.

Prerequisites

  • Linux operating system (required for Firecracker)
  • Go 1.21 or later
  • Root/sudo access (for network setup)

Setup

  1. Clone the repository:
git clone <repository-url>
cd microvm-provisioner
  1. Run the setup script:
chmod +x setup.sh
sudo ./setup.sh
  1. Install Go dependencies:
go mod download

Running the Service

  1. Start the service:
go run main.go
  1. The service will be available at http://localhost:8080

API Usage

Create a VM

curl -X POST http://localhost:8080/vm \
  -H "Content-Type: application/json" \
  -d '{
    "os": "ubuntu",
    "memory": 512,
    "cpus": 1,
    "disk_size": 2
  }'

Response:

{
  "id": "vm-uuid",
  "ip_address": "172.16.0.2",
  "ssh_key": "ssh-rsa ..."
}

Health Check

curl http://localhost:8080/health

Notes

  • The service currently supports Ubuntu and Linux VMs
  • Memory is specified in MB
  • Disk size is specified in GB
  • SSH keys are generated automatically for each VM
  • VMs are assigned IP addresses in the 172.16.0.0/24 range

Security Considerations

  • The service requires root access for network setup
  • Firecracker provides strong isolation between VMs
  • Each VM gets its own SSH key pair
  • Network access is restricted to the tap interface

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published