Repository navigation
perf(computer): boot disks with their image mounted into the launcher, no copy for each launcher - #536
Merged
Conversation
…where Docker mounts images Docker 28 and later, on the containerd image store, mounts the disk image's folder read-only where the launcher finds it, so no copy of a disk, nor of a Windows disk's base, is made for each launcher. Elsewhere the machine image copy stays. Deploys, gate 3 and Windows composes boot this way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h take image mounts, asked with a timeout An older client on a 28 server would refuse the option, and a Docker that doesn't answer would hold the boot; both get the copy instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
First runs, measured (W8 part 4)Box 1 (EC2 c8i.4xlarge, Docker 29.9 with the containerd image store), running
The "before" row is the fresh-machine run from #531's e2e, on the same box, earlier today. How the first install was set up:
Measured against W8's done-when:
|
…nts images; keep only an answer A daemon busy for a moment no longer leaves a long-lived process copying disks until it restarts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Part of FD-5328 (W8 part 3). When local Docker boots a computer's disk, it now mounts the disk image's
disk/folder read-only into the QEMU launcher, instead of copying the disk into an image of the launcher. This applies where Docker can mount images: Docker 28 and later, on the containerd image store. Elsewhere, the copy (machine_image) stays as the fallback.machine_for(disk)returns aMachine: the image to run, plus its arguments.--mount type=image,source=<disk>,target=/disk,image-subpath=disk.mounts_images()readsdocker infoonce per process: a server version of 28 or later, and the containerd snapshotter.LocalSandboxProvider._boot_disk) boot this way. So do Windows composes (windows_disk.compose), including theqemu-img convertagainst the mounted base./diskeither way, so the launcher and the backing-file paths are unchanged.Why. Every launcher change copied each disk into a new launcher image. Any agent-env upgrade that touches the launcher makes such a change. For Windows that meant copying the 11.6 GB base again for each base, and every composed disk got a machine image of its own.
Note. A mounted Windows image shows
/disk/admin.key(root-only, mode 600) inside the launcher container; the copy left it out. Only the launcher and QEMU run in that container, and the key is already on this machine, inside the pulled image.Measured
Box 1: EC2 c8i.4xlarge, Docker 29.9 with the containerd image store.
The Linux disk desktop's deploy, probe, reset and second probe took 148 s on the mount path. The first install with nothing stored, and a fresh machine pulling what it stored, are measured in a comment below.
Tested
machine_formounts or copies;mounts_imagesacross Docker versions and image stores (28 and 29 on containerd, 27, overlay2, Podman);qemu-img convertwith the mount arguments.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issues were found.Summary
Local Docker can mount disk images into the QEMU launcher instead of copying each disk into a launcher image. Unsupported hosts keep the copy path.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Deploy or Windows compose] --> B[machine_for] B --> C{Cached Docker support answer?} C -->|No| D[Query Docker with 30-second timeout] D -->|Query fails| E[Copy disk into machine image] D -->|Answer received| F[Cache answer] C -->|Yes| G{Image mounts supported?} F --> G G -->|Yes| H[Run launcher with disk image mounted] G -->|No| EReviews (3) · Last reviewed commit: "fix(computer): ask Docker again after it..." · Reviewed by Greptile