0
0
Acceptance 0016: a VM rented with a requester-chosen image
Proves a requester can rent a VM that boots its own image (kernel, rootfs, image.json, pinned by the sha256 of
image.json), the bidder verifies every byte before boot, the guest reports the image's marker, and a wrong sha256 is
refused before any VM exists. The CI toolchain image (deploy/vm-images/ci-toolchain.json, built by
scripts/build-ci-image.sh) is the image the gate rents.
- Composition:
tests/compositions/0016(moduleacc-0016), intests/gate.sh:0016:run,0016:badsha,0016:bigmarker; the gate passes--input '{image: {url, sha256}, marker}'fromdeploy/vm-images/ci-toolchain.json run:run request --hold --image <url>@<sha256>; Held only afterrequester_guest_imagesaysok(the guest'sguest.imagemarker equals theimage.json's); ssh:/etc/swc-imageis the marker,/opt/ci/envanswers go, cargo, deno, dockerd is installed; release; every contract record RecordNotFoundrunthen rents the same image a second time (name<name>-b) and, when the target names the winner's kcp, reads the FirecrackerVM'sstatus.image.fetched: true on the first boot of an image on a bidder, it must be false on the second (the bidder keeps requested images by last use withinrequested-image-budget, 16G by default, and evicts the least recently used only over the budget or with under 8G free; an image a VM uses, or used in the last 10 minutes, stays)badsha: the same with the first digit of the sha256 changed: every bidder refuses to bid (the fetchedimage.jsonhashes to another value): each answers submitRfpdeclinedkindunservablewith that reason, so the requester does not wait for capacity: the contract fails at once,no bidder can serve this request: <bidder>: <reason>, before a receipt; nothing Held, no VM on any host (about 40 s)bigmarker: the CI image of 2026-11-14 (vm-images/ci-toolchain/bb59b647..., itsimage.jsonmarker is 272 bytes; the module fixes its url, sha256 and marker, published content-addressed): a long marker is no reason to refuse an image (there is no cap on its length), so it boots likerun's (one rent): Held afterrequester_guest_imagesaysok(the guest's reported marker equals theimage.json's, all 272 bytes), then the release and every record gone. The case that proved the opposite (a 256 byte cap refused this image and every rent that named it waited for capacity) is the reason the case exists.- Every refusal of the image check that no waiting changes reaches the requester as
declinedkindunservable: the url or sha256 malformed, a redirect or a non-public address,image.jsonover 64 KiB, its sha256 not the requested one, not JSON, a file record malformed, a target, hypervisor or arch other than the bidder's, no vcpu or memMiB, bootArgs empty or over 4096 bytes, kernel and rootfs over the request's disk, or an HTTP answer other than 200, 408, 429 or 5xx. A manifest that cannot be fetched just now (the network, a timeout, 408, 429, 5xx) declinescapacity(the requester waits) - Refusals after a bid are re-placed: a bidder that declines the accept (its image check failed at provision), a guest that
reports another marker or none, a
vm.terminatedimage_refused(a file's sha or size did not match while fetching): the VM is released and the RFP goes to another bidder that offersimages, up toMaxAcceptReplacements - Limits: https and public addresses only, 64 KiB for
image.json, kernel + rootfs within the RFP'sdisk; the full SSRF fix is deferred (docs/FEATURES.mdKnown limits) - Needs: a bidder whose offering sets
images(a VM bidder with a guest image store); the requester discovers it