hypervms
v0.0.3
Published
P2P Virtual Machine Networks
Readme
hypervms
P2P Virtual Machine Networks. Run VMs that can communicate over encrypted peer-to-peer networks.
Requirements
- Bare runtime
- QEMU with
qemu-system-aarch64(ARM64) orqemu-system-x86_64 - A qcow2 VM image (e.g., Ubuntu Minimal Cloud)
Installation
npm install
npm run buildQuick Start
# Start the daemon
hypervms daemon start
# Import a VM image
hypervms image import /path/to/ubuntu-minimal.qcow2 --name ubuntu
# Create and start a VM
hypervms vm create myvm --image ubuntu
hypervms vm start myvm
# Create a network and connect the VM
hypervms network create mynet
hypervms network connect mynet myvmMulti-Machine Setup
Machine A (network owner):
hypervms daemon start
hypervms network create mynet
# Note the descriptor from output
hypervms vm create alice --image ubuntu
hypervms vm start alice
hypervms network connect mynet aliceMachine B (participant):
hypervms daemon start
hypervms network add <descriptor>
hypervms vm create bob --image ubuntu
hypervms vm start bob
hypervms network connect mynet bob
# Note the public key from outputBack on Machine A (add the remote peer):
hypervms network add-peer mynet <bob-public-key> --name bobDNS Resolution
VMs can resolve each other by name using the .internal TLD:
# Inside a VM (use getent, not ping directly)
getent hosts bob.internal
# Returns: 10.0.0.2 bob.internal
# Then ping by IP or use applications that respect system DNS
ping 10.0.0.2Note: BusyBox ping has its own resolver that bypasses /etc/resolv.conf. Use getent hosts or applications that use libc for DNS.
CLI Reference
# Daemon
hypervms daemon start|stop|status
# VMs
hypervms vm create <name> --image <image> [--memory 1G] [--cpus 1]
hypervms vm start|stop|rm <name>
hypervms vm list
hypervms vm inspect <name>
hypervms vm ssh <name>
# Images
hypervms image import <path> [--name <name>]
hypervms image list
hypervms image rm <name>
# Networks
hypervms network create <name>
hypervms network add <descriptor> [--name <name>]
hypervms network rm <name>
hypervms network list
hypervms network inspect <name>
hypervms network connect <network> <vm> [--name <peer-name>]
hypervms network disconnect <network> <vm>
hypervms network add-peer <network> <public-key> --name <name>
hypervms network remove-peer <network> <id>
# Info
hypervms infoGlobal Flags
--storage, -s <path> Storage directory (default: ~/.hypervms)
--json Output as JSON
--quiet, -q Minimal outputLicense
MIT
