pack
하는 일
smolvm 머신이나 이미지를 파일 하나로 패키징하고, 그 안에 설치된 소프트웨어가 옮긴 뒤에도 남아 있는지 확인하는 방법을 설명합니다. 준비된 환경을 공유하려는 사람을 위한 스킬입니다.
사용하는 경우
- ✓준비된 환경을 파일 하나로 배포하고 싶을 때.
- ✓패키징된 파일이 실행되지만 안에 설치한 소프트웨어가 없을 때.
- ✓오래된 smolvm 버전이 분기된 머신의 내보내기를 거부할 때.
스킬 링크
https://github.com/smol-machines/smolvm/blob/main/docs/pack/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 동료가 같은 설정으로 실행할 수 있도록, 준비된 smolvm 머신을 파일 하나로 패키징해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 이미지나 준비된 머신을 아티팩트 하나로 패키징합니다. 패키징 전에 머신 안에 표식 값을 쓰고, 아티팩트에서 그 값을 다시 읽어 상태가 살아남았는지 증명합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Packing a machine into a portable artifact
For macOS first-import performance, storage seed behavior and a file-heavy reproduction, see macOS storage seeds.
Verified on smolvm v1.29.0 on macOS arm64, 2026-10-15, and on v1.14.6 on Linux aarch64, 2026-09-11; the Linux host could not run the packing steps on v1.18.2 or v1.22.2, for the reason in "Platform arms". Done means the artifact runs a command in a real VM and, for a machine pack, the state you installed is still inside it. The Linux runs used the scripts of their date; this version's preflight and cleanup scripts ran on Linux aarch64 on v1.22.2 on 2026-10-03.
The assertion that matters is a value, not a boot. A pack that lost its rootfs still boots,
still prints a guest kernel and still exits zero. The only thing that separates a good artifact
from an empty one is a marker written into the source machine before packing and read back out of
the artifact afterwards, which is what pack-machine.sh and verify-pack.sh do between them.
Procedure
1. Preflight. Read-only: starts no VM, packs nothing.
scripts/preflight.sh
The lines to read are exporter_memory_ok and image_vm_memory_ok: both pack paths boot a helper VM before they
write anything. pack create --image pulls in a VM fixed at 4 vCPUs and 8192 MiB on every release here.
pack create --from-vm boots an export helper fixed at 8192 MiB through v1.16.1, whose failure was a bare agent did not become ready within 30 seconds; from v1.16.2 it asks for 4096 MiB (on Linux half the available memory when that
is less, never under 1024), SMOLVM_EXPORT_HELPER_MEMORY_MIB=<MiB> sets it, and a failed start says The export helper asked for N MiB of memory and names the variable. exporter_memory_mib is the figure this binary will ask for, except
under a cgroup memory limit on Linux, where smolvm asks for less. From v1.16.1 the helper reuses the machine's cached
image layers (Reusing the machine's cached image layers...); on macOS arm64 on v1.16.1, 2026-09-15, that export took
1.2 s with exporter_memory_ok=no. Both lines warn and do not gate: see "What the memory lines do and do not promise".
2. Pack from an image, when you want a runnable artifact of a stock image.
scripts/pack-image.sh # alpine, ./from-image
scripts/pack-image.sh python:3.12-alpine ./mypack
This path boots the 8192 MiB pull VM, so image_vm_memory_ok is its line; --mem sets the
artifact's memory and does not reach that VM. If you pass a custom output, pass it to the
verify step too (verify-pack.sh --image ./mypack), or that step finds nothing at its defaults
and tells you so rather than passing.
3. Pack from a machine you provisioned, when the point is the state in it.
scripts/pack-machine.sh # smolskill-golden, ./from-vm
It creates the machine with a workload that stays up, waits for a value from it, writes a marker, asserts the marker on the source, stops the machine and exports it. The source assertion is not ceremony: packing a machine whose provisioning silently failed produces an artifact that runs perfectly and contains nothing, and nothing downstream will tell you.
Packing a machine that already exists, the user's own rather than one pack-machine.sh made:
the script refuses any name without the smolskill- prefix, so run its sequence by hand. Stop
the machine first: --from-vm packs a stopped machine's snapshot and refuses a running one. A
machine start afterwards is how the machine comes back. A machine provisioned by hand is verified
with a file of the user's own: --marker-path names it and --marker its expected last line.
smolvm machine exec --name myapp -- tail -1 /root/provisioned.txt # note the value on the source
smolvm machine stop --name myapp
smolvm pack create --from-vm myapp --output ./myapp-portable --single-file # one file, no sidecar
scripts/verify-pack.sh --machine ./myapp-portable --marker-path /root/provisioned.txt --marker <that value>
smolvm machine start --name myapp # the machine comes back
With no file of the user's to check, write the packet's marker before the stop,
smolvm machine exec --name myapp -- sh -c 'echo PACKED_STATE_PRESENT > /marker.txt', verify
without --marker-path, and remove /marker.txt after the start.
verify-pack.sh --machine reads the mark
자주 묻는 질문
패키징이 잘 되었는지 어떻게 아나요?
스킬은 아티팩트에서 표식 값을 다시 읽습니다. 부팅이 성공했다는 것만으로는 설치 상태가 남아 있다고 증명되지 않습니다.
어떤 컴퓨터든 이 파일을 실행할 수 있나요?
호환되는 호스트에서만 가능합니다. 이 스킬은 특정 smolvm 버전과 플랫폼을 기준으로 작성되었습니다.
사전 점검은 무엇을 확인하나요?
읽기 전용이며, 컴퓨터에 두 패키징 경로 모두에 필요한 메모리가 충분한지 확인합니다.
상세 정보
작성자의 원본 설명
Turns an image, or a machine already provisioned, into a single self-contained artifact that runs on another compatible host. Use when shipping a prepared environment as one file, when a packed artifact runs but the state installed into it is missing, when pack create fails because the VM it boots to pull or export could not start, when an older release refuses to export a branched machine, or when deciding whether to pack from an image or from a machine. Do not use it to keep a machine you re-enter, which is the dev-env packet, or to run untrusted code, which is the throwaway-machine packet.
repo: smol-machines/smolvm
인기도
- GitHub 스타
- 6.9k
- 순위
- #13722
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
branch-and-checkpoint
6.9k에이전트가 실행 중인 smolvm 가상 머신을 체크포인트로 저장하고, 나중에 복원하고, 일시 중지와 재개를 하며, 복사본으로 분기하도록 돕습니다.
coding-agent
6.9k에이전트가 Claude Code 같은 코딩 에이전트를 안전한 smolvm 가상 머신 안에서, 프로젝트 폴더를 연결한 채로 실행하도록 돕습니다.
credentials
6.9k에이전트가 내 키로 API를 호출하게 하되, 키는 가상 머신 안에 들어가지 않아 신뢰할 수 없는 코드가 읽지 못하게 합니다.
dev-env
6.9k에이전트가 필요한 도구를 설치해 둔 smolvm 개발 머신을 유지하도록 가르칩니다. 그래서 빠르게 다시 시작하고 세션이 바뀌어도 패키지가 남습니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.