Skip to content

vm: install EL7 boxes, choose the root filesystem, and boot guests on UEFI - #71

Merged
TusanHomichi merged 6 commits into
mainfrom
claude/vm-uefi
Oct 13, 2026
Merged

TusanHomichi merged 6 commits into
mainfrom
claude/vm-uefi

Conversation

@TusanHomichi

@TusanHomichi TusanHomichi commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Requested by Peter

What this adds

Before: tools/vm.py could only install CentOS 5, etch and trusty boxes, and only booted them on BIOS. So the centos7 -> alma10 route had no real-VM proof, and nothing proved any route on UEFI.

After:

  • vm.py replay routes/el/centos7-to-alma10.toml el/centos7-lamp installs CentOS 7 with its own anaconda.
  • vm.py --uefi ... does any of it on OVMF firmware.
  • A box can pick its root filesystem: [vm].root_fs is ext3, xfs or xfs-v4.

This is a spec change, not a route. It touches tools/, adapters/, SPEC.md and one box's [vm] table and network role on purpose, for the maintainer-run VM tier (wend#13 and #46).

How:

  • EL7 kickstart. The adapter supplies the lines that differ by release: EL7's %end, GRUB 2, and net.ifnames=0 so the NIC is eth0, as centos7-lamp's network role expects.
    • The box's customize runs in %post after set_release, the order the chroot build uses, with the mirror shim at the address the guest sees.
    • centos7-lamp's network role now accepts anaconda's quoted IPADDR="10.0.2.20". The first VM build failed on exactly that.
  • [vm].root_fs. It sets the filesystem anaconda makes for / and /boot. xfs-v4 is -m crc=0 -n ftype=0, EL 7.0 to 7.2's on-disk format, made by 7.9's installer. The checker refuses any other value.
  • --uefi.
    • Guests boot on OVMF without Secure Boot, and the UEFI box is built and cached separately from the BIOS one.
    • The installer makes an EFI system partition (part /boot/efi in the kickstart; d-i's atomic recipe makes one itself). Each disk carries its own copy of the NVRAM along the overlays.
    • After the install and after every reboot, the guest must still be running on UEFI (/sys/firmware/efi). A run records its firmware.
    • A start release whose installer predates x86-64 UEFI is refused. releases.<id>.install.uefi is set for trusty and centos7, but not for etch or CentOS 5.
  • [hardware].boot stays ["bios"] in this PR. The UEFI replays come first, then the flip.

Evidence

  • trusty-web and trusty-db on UEFI, both from scratch: PASS. Every hop to resolute rebooted onto UEFI (firmware uefi), kept its network and checks, and the prune finished: 64 to 0 and 63 to 0 (runs 20261013-050634 and 20261013-075838).
  • centos7-lamp on BIOS: the box builds and passes its own checks. At 2a251db, the installed ifcfg-eth0 is # Generated by parse-kickstart with HWADDR="52:54:00:12:34:56", written by anaconda from the ifname= boot line. The partition table shows the configured /boot size.
  • The centos7 -> alma10 route replay doesn't finish. It stalls in the alma9 hop on a live box: sshd's rexec breaks after the EL8 transit, and audit's restart hangs under systemd 252 on the 3.10 kernel. That is a route defect, filed as EL route: centos7 -> alma10 stalls in the alma9 hop on a live box (sshd rexec, auditd restart under systemd 252 on 3.10) #75. Its fix gets its own VM re-proof.
  • XFS v4 layout: vm: XFS v4 on LVM with an empty extra disk, and relocate onto it #72's relocate proof was built on this VM tier (XFS v4 on LVM plus an extra disk) and passed every stage.
  • Gates at this head: wend check passes; client fmt, clippy, tests (37) and the release build pass; parity is identical; client wend check passes; all six behaviour tests pass.

Not in this PR: multi-disk guests and an LVM layout. The rebuild-and-carry work will add those on top.

Refs #13, #46

🤖 Generated with Claude Code

… UEFI

The VM tier now installs CentOS 7 with its own anaconda. The kickstart lines
that differ by release come from the adapter: EL7's %end, GRUB 2, and
net.ifnames=0 so the NIC is eth0 as the box's network role expects. The box's
customize runs in %post after set_release, as the chroot build runs it, with
the mirror shim where the guest sees the host. centos7-lamp gets a [vm] table,
and its network role accepts anaconda's quoted IPADDR.

[vm].root_fs picks the filesystem anaconda makes for / and /boot: ext3, xfs
(v5) or xfs-v4 (-m crc=0 -n ftype=0, EL 7.0 to 7.2's on-disk format).

--uefi boots every guest on OVMF instead of SeaBIOS. The box is built and
cached apart. The installer makes an EFI system partition, and each disk
carries its own NVRAM copy along the overlays. After the install and every
reboot, the guest must still be running on UEFI. A start release whose
installer can't install on UEFI (etch, CentOS 5) is refused.
The adapters' [hardware].boot stays ["bios"] until the UEFI replays are in.

Refs #13

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Peter Permenter <[email protected]>
@TusanHomichi TusanHomichi self-assigned this Oct 13, 2026
@github-actions github-actions Bot added the needs-claude-review Waiting on the Claude review layer label Oct 13, 2026
… pin centos7's MAC (review)

[vm].root_fs must be one releases.<release>.install.root_fs lists (CentOS 7:
ext3, xfs, xfs-v4), in the checker and before the build does any work, and the
build checks the installed / and /boot have it (findmnt, xfs_info crc and
ftype). centos7-lamp's customize adds the HWADDR a kickstart network line
leaves out (EL10's keyfile conversion pins eth0 to it), and its network role
accepts IPADDR quoted or not, balanced. The firmware read ignores stderr.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Peter Permenter <[email protected]>
TusanHomichi and others added 2 commits October 13, 2026 07:50
…(review)

EL7's installer writes HWADDR only when the boot line names the NIC by MAC
(ifname=eth0:<mac>) or the kickstart binds it; a plain kickstart or interactive
install writes none. The install table's ifname puts ifname=eth0:<mac> on the
installer's boot line, so anaconda pins the ifcfg itself, as a box booted that
way has; the box no longer appends HWADDR. The route's gap for boxes without the
pin is #74. install.root_fs must be a list.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Peter Permenter <[email protected]>
The kickstart's /boot was 200 MiB for every release, CentOS 5's default; a
stock EL7 anaconda makes 500 MiB, and preflight (correctly) refuses a 200 MiB
/boot for the alma9 kernel. releases.<release>.install.boot_mib sets it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Peter Permenter <[email protected]>
TusanHomichi and others added 2 commits October 13, 2026 09:39
…mib (review)

blivet in the 7.9.2009 installer makes a 1 GiB /boot (platform.py), not
500 MiB; CentOS 5's 200 MiB is a chosen size (5.11's installer makes 100 MB),
and SPEC now says so. The install key is boot_part_mib, so it isn't mistaken
for [hardware.<release>].boot_mib, the space one kernel takes. Type checks for
the install table's other keys are #83.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Peter Permenter <[email protected]>
Signed-off-by: Peter Permenter <[email protected]>

# Conflicts:
#	SPEC.md
#	tools/check.py
#	tools/test_check.py
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T16:58:10.950702Z a786be5 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a786be5c27

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/vm.py Resolved
@TusanHomichi

Copy link
Copy Markdown
Member Author

Claude review: signed off on a786be5 (independent, read-only, fresh context). This head is the merge of main into 6aaf190, which was itself signed off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-claude-review Waiting on the Claude review layer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant