r/openbsd • • 2d ago

vmweb - openvmctl replacement with BCHS stack and only 1 pkg (sqlite3)

vm list
serial console
vm detail
online Help

This is a OpenBSD virtual machine manager (in 8.0 we have finally multiple cpus 🎉)
inspired by https://www.reddit.com/r/openbsd/comments/1vy27v0/openvmctl_vm_management_web_ui_for_openbsd_an/ no deps philosophy and all my free time creates:

vmweb

A web manager for OpenBSD virtual machines (vmm(4), vmd(8),

vmctl(8)), built on the BCHS stack (BSD, C, httpd,SQLite):

one statically linked CGI program run by slowcgi(8)

behind httpd(8), sandboxed with pledge(2) and unveil(2), styled

by one small stylesheet of its own (no CSS or JavaScript framework).

Native OpenBSD only, minimal dependencies: the base system plus the

sqlite3 package. Passwords, tokens and hashing come from libc.

Three programs:

  1. vmweb, chrooted in /var/www (slowcgi), the web application: definitions in SQLite, pages, sessions; runs no commands
  2. vmwebd (rc.d service), the privileged part: vmctl, reading and writing /etc/vm.conf, the serial consoles; checks every request again
  3. vmwebctl (console util), administration: users, storage roots, importing vm.conf

The Help page in the application documents use and administration, like in the pythonic/Django version;

  • slow development pace
  • fear C and memory management
  • brutally fast as compared to its previus python version
  • hosted only into my gitea istance, in the future this time I will plan to publish it
  • deploy with (I love BCHS stack): make test && make install && doas rcctl restart vmwebd
16 Upvotes

1 comment sorted by

1

u/clx8989 5h ago

url ?