Skip to content

Offer to resize a Podman machine too small for setup on a Mac, and say plainly what it lacks - #1492

Open
davidmckayv wants to merge 4 commits into
mainfrom
fix/podman-machine-too-small
Open

davidmckayv wants to merge 4 commits into
mainfrom
fix/podman-machine-too-small

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What happened

Setup on a Mac with a Podman machine too small for OpenBot stopped at one sentence with the fix crammed into it:

OpenBot has 2 free CPUs. It needs 4. Stop your Podman machine, run podman machine set --cpus 6, start it again, then Retry.

A person who isn't technical can't act on that. Since Intelligence 0.16.0-rc.12 (#1506) the CLI counts every CPU the engine has, so a CPU shortfall means fewer than 4 CPUs in all; memory is still measured free in the machine.

What changes

  • The row says only what happened: "Your Podman machine has 2 CPUs. OpenBot needs 4." (memory: "Your Podman machine has 6 GB of memory, and 2.9 GB of it is free. OpenBot needs 4 GB free.")
  • Resize my Podman. Under the row, a card offers to fix it. Only on a click, OpenBot stops the machine the CLI runs on, raises whichever of its CPUs and memory is short, starts it again with the containers that were running in either of its engines, and sets up again. CPUs go to 6; memory to what runs in it plus the 4 GB free, with 2 GB to spare, at least 8 GB. Never past this Mac (Podman refuses more), never lower than now, nothing else about the machine changes. On a Mac with fewer than 4 CPUs nothing is offered. A size Podman refuses still ends with the machine started as it was. OpenBot's own openbot machine is started its own way, with its networking.
  • Where OpenBot can't do it (a disk short too, or Podman refused), the same fix is numbered steps, each command in its own monospace block with Copy, named by the machine, then Retry.
  • Setup's other CPU messages count CPUs as the CLI now does: "Docker Desktop has 2 CPUs. OpenBot needs 4." where they said "free CPUs".

Podman 6.1 constraints, from its source: podman machine set --cpus/--memory works on applehv and libkrun only while the machine is stopped ("unable to change settings unless vm is stopped"), takes effect at the next start, and may not exceed the host's CPUs or memory. No rootful switch is involved: the machine OpenBot uses on a Mac is already rootful. WSL machines refuse both ("changing CPUs not supported for WSL machines"), so nothing new is offered on Windows.

Tests

  • machine_size (Rust): the plan for a 2-CPU machine (raised to 6), the host cap and a Mac with too few CPUs, memory targets; the resize sequence against a fake Podman answering as Podman 6.1.1 does on a Mac (real machine inspect JSON, ps --quiet, stop/start output, applehv's refusal of a running machine, the host-CPU limit), including a refused size and OpenBot's own machine.
  • LocalIntelligence.test.tsx: the row's sentence and the card, Resize calls the native side with 6 CPUs and sets up again; the manual steps render three commands with Copy; a refused resize falls back to the steps.
  • localReadiness.test.ts: the CPU messages without "free".

Not yet tried against a real Podman machine.

…y why 4 CPUs measured 3.9

Setup on a Mac with a person's own 4-CPU Podman machine stopped at "OpenBot has 3.9 free CPUs.
It needs 4. Stop your Podman machine, run podman machine set --cpus 6, start it again, then
Retry." The CLI's resource check counts free CPUs: the engine's NCPU less what the containers
already running in it use over a one-second sample. Any container running in a 4-CPU machine
leaves it below 4, so the number was right and the sentence read as a mistake, with the command
crammed into it.

- The row now says the machine's size and why less is free: "Your Podman machine has 4 CPUs, and
  what's already running in it uses some, so 3.9 are free. OpenBot needs 4 free."
- Under it, a card offers Resize my Podman. Only on a click, OpenBot stops the machine the CLI
  runs on, raises whichever of its CPUs and memory is short (enough for what runs in it plus the
  4 free, one to spare, at least 6 CPUs or 8 GB, never past this Mac), starts it again with the
  containers that were running in either engine, and sets up again. Only upwards, nothing else
  changes, and a size Podman refuses still ends with the machine started as it was. OpenBot's own
  machine is started its own way, with its networking.
- Where OpenBot can't do it (a disk short too, or Podman refused), the same fix is numbered steps,
  each command in its own block with Copy and named by the machine, then Retry.
- Windows WSL machines can't be resized by podman machine set, so nothing new is offered there.

Tests: the plan from the reported numbers (4 CPUs, 3.9 free, raised to 6) and the CLI's other
fixtures; the resize sequence against a fake Podman answering as Podman 6.1.1 does on a Mac,
including applehv's refusal of a running machine and a size past the host; the window's card,
its Resize path back into setup, the numbered steps with Copy, and a refused resize.
davidmckayv and others added 3 commits November 11, 2026 09:48
…CLI counts them

The bundled CLI now judges CPUs on the engine's total (Intelligence 0.16.0-rc.12, #1506), so a CPU
shortfall means fewer than 4 CPUs in all, and the 3.9-of-4 case can't happen. The row says the
machine's size beside what OpenBot needs ("Your Podman machine has 2 CPUs. OpenBot needs 4."), the
resize plan raises a short machine to 6 CPUs (never past this Mac, nothing offered on a Mac with
fewer than 4), and setup's other CPU messages drop "free": "Docker Desktop has 2 CPUs. OpenBot needs
4." Memory is still measured free and said so. The resize button and the copyable steps stay.
@davidmckayv davidmckayv changed the title Offer to resize a Podman machine too small for setup on a Mac, and say why 4 CPUs measured 3.9 Offer to resize a Podman machine too small for setup on a Mac, and say plainly what it lacks Nov 12, 2026

This branch has not been deployed

No deployments
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.

1 participant