Skip to content

Switch to Ubuntu Minimal cloud image - #286

Merged
nirs merged 3 commits into
mainfrom
ubuntu-minimal
Aug 3, 2026
Merged

Switch to Ubuntu Minimal cloud image#286
nirs merged 3 commits into
mainfrom
ubuntu-minimal

Conversation

@nirs

@nirs nirs commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Switch to Ubuntu Minimal cloud image

Switch test VMs from the Ubuntu server cloud image (~850MB) to the
minimal cloud image (~407MB for amd64v3, ~390MB for arm64). This cuts
CI boot times from 2:30-5:00 minutes to 1:15-1:54, and local VM disk
usage from 2.6GB to 1.2GB per VM.

Changes:

  • Use minimal cloud image for both arm64 and x86_64
  • Use x86-64-v3 variant for Intel (all targets are macOS 14+ / Coffee Lake)
  • Drop initrd for direct kernel boot (minimal kernel has virtio_blk and
    ext4 built-in)
  • Use root=/dev/vda1 instead of root=LABEL=cloudimg-rootfs (minimal uses
    PARTUUID, not filesystem labels)
  • Mask systemd-networkd-wait-online which may block boot for 2 minutes
  • Revert CI timeout from 600s back to 300s

Boot time improvement (local, vfkit arm64):

Before: Startup finished in 68ms (kernel) + 2min 1.668s (userspace)
After:  Startup finished in 68ms (kernel) + 1.668s (userspace) = 1.737s

CI "Start example VM" step improvement:

Before: 2:30 - 5:00+
After:  1:15 - 1:54

Example boot in 1.7 seconds

boot-4

@nirs
nirs marked this pull request as ready for review August 3, 2026 17:18
nirs added 2 commits August 3, 2026 21:07
The server cloud image is ~850MB which is excessive for testing
vmnet-helper. Switch to the minimal cloud image (~407MB for amd64v3,
~390MB for arm64) — about half the download size and disk footprint
(1.2GB vs 2.6GB per VM).

Use x86-64-v3 variant for Intel since all target machines are macOS 14+
(2018 Coffee Lake or newer).

Drop initrd for direct kernel boot — the minimal kernel has virtio_blk
and ext4 built-in so we can boot without it. Switch from
root=LABEL=cloudimg-rootfs to root=/dev/vda1 since the minimal image
uses PARTUUID instead of filesystem labels.
Switching to Ubuntu Minimal cloud image reduced CI boot times from
3:30-4:40 minutes to 1:15-1:54 minutes. With 300s timeout we still
have over a minute of margin.

This reverts commit 5b0d24b.
This service may block boot for 2 minutes waiting for all network
interfaces to be fully configured. With the minimal cloud image, it
prevents sshd from accepting connections (via socket activation
dependency on network-online.target).

We only need eth0 with DHCP from vmnet and don't need the
network-online target.

Use bootcmd (runs during cloud-init-local, before the service starts)
for vfkit, and systemd.mask= kernel parameter for QEMU direct boot.

Boot time with minimal image before masking:

    Startup finished in 68ms (kernel) + 2min 1.668s (userspace)

After masking:

    Startup finished in 68ms (kernel) + 1.668s (userspace) = 1.737s
@nirs
nirs merged commit 7792699 into main Aug 3, 2026
12 checks passed
@nirs
nirs deleted the ubuntu-minimal branch August 3, 2026 18:57
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