Skip to content

fix(vm): free a VM's SSH port before it boots - #168

Merged
mattmattox merged 1 commit into
mainfrom
fix/vm-harness-stale-qemu
Nov 16, 2026
Merged

mattmattox merged 1 commit into
mainfrom
fix/vm-harness-stale-qemu

Conversation

@mattmattox

Copy link
Copy Markdown
Contributor

#161's VM suite failed this way on .66. A VM 1 boot ran past the login wait, and the harness lost track of its QEMU, which kept SSH port 2720. Every later VM 1 boot then failed with "Could not set up host forwarding rule".

Before each boot, the harness now checks the port. A QEMU for this VM from this checkout's runtime is killed. Anything else holding the port fails the boot with its pid and command line.

Tested on .66 in a separate checkout on port 3522:

  • Leftover QEMU: boot VM 1, delete its pid file, boot it again. main fails twice with "QEMU exited"; this branch kills the old QEMU and boots.
  • Foreign holder: with a python3 -m http.server on the port, the boot fails and names that pid.

🤖 Generated with Claude Code

A QEMU the harness lost track of kept the port, so every later boot of that VM
failed. Kill it when this checkout started it; otherwise name the pid that holds
the port.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mattmattox
mattmattox merged commit 909635e into main Nov 16, 2026
17 checks passed
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