Clones and ephemeral VMs
hobo clone copies a stopped VM instantly, since APFS shares the disk blocks until either VM
changes them, and the copy can run beside the original. hobo start --ephemeral goes one step
further: it boots a throwaway clone that deletes itself when it stops, or after half an hour
idle. Build a VM once, then try anything in a fresh copy.
$ hobo start dev --ephemeralCloned dev to dev-6b62Starting dev-6b62 waiting for a DHCP lease waiting for SSH on 192.168.64.6dev-6b62 is running (192.168.64.6); deleted after 30m idle
$ hobo stop dev-6b62 shutting down over SSHStopped and deleted dev-6b62, which was ephemeralClone
hobo clone dev experimenthobo clone dev throwaway --ephemeral # deleted after its first runA clone is left stopped, and clone says how to boot it. For a throwaway copy to boot right away,
hobo start dev --ephemeral clones and boots in one step.
- The source must be stopped.
- A clone gets its own machine identifier, serial number and MAC address, so it runs beside the original with its own network address.
- It shares the source’s disk blocks until either one changes them, so a clone of an 80 GB VM
takes a few seconds and almost no space.
hobo list’sTOTALcounts shared blocks once. - Snapshots aren’t copied.
Ephemeral VMs
hobo start dev --ephemeral # clone, start, print the clone's namehobo start dev --ephemeral --idle-timeout 2h # or 90s, 30m, offAn ephemeral VM is named <vm>-<4 hex digits>, and hobo list marks it ephemeral, with the time
it has left. It’s deleted:
- when it stops, however it stops:
hobo stop, a shutdown inside the guest, or a crash; - when it has sat idle for its timeout, 30 minutes unless
--idle-timeoutsays otherwise. Any hobo command on it exceptlistresets the clock; plain SSH doesn’t.
A suspended ephemeral VM is kept, and hobo discard deletes it. Ephemeral VMs can’t have snapshots.
Keep one
hobo set dev-6b62 --keephobo rename dev-6b62 repro-1234--keep turns an ephemeral VM into a regular one, even while it’s running, so an experiment that
found something can stay. rename needs it stopped or suspended, so to keep what it is running,
hobo suspend it first and hobo start it under its new name.