diff --git a/README.md b/README.md index 705a928..f08dd85 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A page to start and stop the VMs of the server, one at a time. **Rust** backend (axum + sqlx + aide) driving **libvirt**, serving a **Vue 3** frontend (TypeScript + vue-query + shadcn-vue), on **PostgreSQL** with **dbmate** migrations. -The VMs (`win11`, `arch-hyprland` and `cs-477`) share the same hardware and may never run +The VMs (`win11`, `arch-hyprland`, `cs-477` and `cs477-project`) share the same hardware and may never run together: starting one while the other is up asks first, shuts that one down, waits for it to be really off, and only then boots the wanted one. The state is read from libvirt on every request, so a VM shut down from inside the guest shows up as diff --git a/db/migrations/20261107120000_add_cs477_project_vm.sql b/db/migrations/20261107120000_add_cs477_project_vm.sql new file mode 100644 index 0000000..c95a474 --- /dev/null +++ b/db/migrations/20261107120000_add_cs477_project_vm.sql @@ -0,0 +1,11 @@ +-- migrate:up +-- Fourth VM: the CS-477 project guest. Like the others it is configuration, not +-- demo data, so a fresh deployment shows it without manual seeding. +-- +-- `domain` must match the libvirt domain name exactly (`virsh list --all`). +INSERT INTO vms ("domain", "display_name", "icon", "position") VALUES + ('cs477-project', 'CS-477 Project', 'server', 4) +ON CONFLICT ("domain") DO NOTHING; + +-- migrate:down +DELETE FROM vms WHERE "domain" = 'cs477-project';