2b8c93b99fa0aab1fa35097949aba94073299cd7
bearnet
This repository contains necessarities to build a VM image and corresponding hypervisor image using Dockerfiles.
Edit corresponding files in image/overlay to customize VM behaviour. Privileges are required for building VM images as some scripts are depending on /dev/nbd.
Build & Running
# cp .env.example .env
# vim .env
# VM_OPTS="--no-cache" HY_OPTS="--no-cache" make
# fallocate -l 128G ./data/data.raw
# sgdisk -o -n 1:0:0 -t 1:8300 ./data/data.raw
# losetup -Pf ./data/data.raw
# mkfs.ext4 /dev/loop0p1
# losetup -d /dev/loop0
# vim docker-compose.yml
# docker compose up
The given compose file is for reference only. It must be edited according to your situation.
Once the image is built and udhcpd is ready, VM's IP will be shown in logs.
By default, a OpenSSH server will be listening on :2222.
FAQ
udhcpc: socket(AF_PACKET,2,8): Address family not supported by protocol
Clear build cache for both images to unify kernel version.
Languages
Shell
91%
Makefile
4.9%
Dockerfile
4.1%