Skip to content

Conversation

@delan
Copy link
Member

@delan delan commented Oct 30, 2025

this seems more viable than #62.

@delan delan force-pushed the utm-macos15-arm branch 2 times, most recently from 74547fd to d4f6451 Compare October 30, 2025 07:35
@delan delan changed the base branch from main to virtual-workspace-at-root October 30, 2025 09:25
Base automatically changed from virtual-workspace-at-root to main November 6, 2025 04:23
@delan delan mentioned this pull request Nov 10, 2025
delan added a commit that referenced this pull request Nov 10, 2025
this patch gives us a better foundation for documenting the new images
in #64.
@delan delan force-pushed the utm-macos15-arm branch 7 times, most recently from d52d04f to 332f544 Compare November 11, 2025 13:15
delan added a commit that referenced this pull request Nov 25, 2025
so far, we’ve managed the lifecycle of an image like servo-ubuntu2204
like this:

- rebuild the image by building a new _profile guest_ (libvirt guest
named “**servo-ubuntu2204**”)
  - destroy the guest with that name, if it exists
  - recreate the guest from profiles/servo-ubuntu2204/guest.xml
  - set the disk to /path/to/base/servo-ubuntu2204/base.img@[timestamp]
- start the guest, so that it can install tooling, bake in cached
builds, etc
  - destroy the libvirt guest
  - recreate the guest from profiles/servo-ubuntu2204/guest.xml
  - set the disk to /path/to/base/servo-ubuntu2204/base.img (symlink)
- if successful, symlink /path/to/base/servo-ubuntu2204/base.img to
base.img@[timestamp]
- if unsuccessful, symlink /path/to/base/servo-ubuntu2204/base.img to
base.img@[oldTimestamp]
- create runners by cloning that guest into each _runner guest_
(“**ci-runner-servo-ubuntu2204.[number]**”)
- clone the disks, but not the guests, with the monitor (so it can be
parallelised)
  - clone the guest, but not the disks, with virt-clone

that works well enough for our current setup with libvirt and ZFS, but
some hypervisors, like UTM (#64), will require us to treat each virtual
machine as a self-contained object, with its own configuration and image
files. in UTM, it’s hard to destroy a guest without also destroying its
disks.

this patch moves the monitor closer to that world, by avoiding the
destroy-recreate-configure pattern in image rebuilds. the lifecycle for
servo-ubuntu2204 images now looks like this:

- rebuild the image by building a new _rebuild guest_
(“**ci-rebuild-servo-ubuntu2204@[timestamp]**”)
  - create the guest from profiles/servo-ubuntu2204/guest.xml
  - set the disk to /path/to/base/servo-ubuntu2204/base.img@[timestamp]
- start the guest, so that it can install tooling, bake in cached
builds, etc
- if successful, convert that guest to a new _template guest_
(“**ci-template-servo-ubuntu2204@[timestamp]**”)
- conversion just means renaming the guest from “ci-rebuild-…” to
“ci-template-…”
- if unsuccessful, just destroy that guest
- create runners by cloning that guest into each _runner guest_
(“**ci-runner-servo-ubuntu2204.[number]**”)
- clone the disks, but not the guests, with the monitor (so it can be
parallelised)
  - clone the guest, but not the disks, with virt-clone

bonus: with this patch, failed rebuilds will no longer leave the
template in an inconsistent state, with the old image data (good) but
the new guest configuration (bad because it may be broken).

<img width="771" height="519" alt="image"
src="https://github.com/user-attachments/assets/21898110-d243-401a-9e0d-8852d2b74a9a"
/>
@delan delan force-pushed the utm-macos15-arm branch 3 times, most recently from 284e3c1 to 098484e Compare November 26, 2025 05:12
@delan delan changed the base branch from main to hypervisor-polymorphism November 26, 2025 05:13
@delan delan force-pushed the utm-macos15-arm branch 2 times, most recently from 69d099c to c24ad97 Compare November 26, 2025 06:04
@delan delan force-pushed the hypervisor-polymorphism branch from 7686c72 to bd0dea2 Compare November 26, 2025 06:04
@delan delan force-pushed the hypervisor-polymorphism branch from bd0dea2 to d0082d1 Compare November 26, 2025 06:28
@delan delan force-pushed the utm-macos15-arm branch 2 times, most recently from 88b61d8 to c2d5249 Compare November 26, 2025 06:37
@delan delan force-pushed the hypervisor-polymorphism branch from d0082d1 to 724e717 Compare November 28, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants