docker rootfs defaults
This commit is contained in:
parent
5f3d60ef0f
commit
93c3d1a67b
6498 changed files with 64929 additions and 14 deletions
46
README.md
46
README.md
|
|
@ -26,8 +26,9 @@ Minimal Firecracker launcher.
|
|||
- `--name`: must be unique and match `[a-z0-9][a-z0-9-]{0,63}`.
|
||||
- `--vcpu`: defaults to 2, max 16.
|
||||
- `--ram`: MiB, defaults to 1024, max 32768.
|
||||
- `--rootfs`: path to the base rootfs image (default: `./rootfs.ext4`).
|
||||
- `--kernel`: path to the kernel image (default: `./vmlinux`).
|
||||
- `--rootfs`: path to the rootfs image (default: `./rootfs-docker.ext4`).
|
||||
- `--kernel`: path to the kernel image (default: `./wtf/root/boot/vmlinux-6.8.0-94-generic`).
|
||||
- `--initrd`: path to the initrd image (default: `./wtf/root/boot/initrd.img-6.8.0-94-generic`).
|
||||
- `--home-size`: M/G suffixes supported (default: 2G).
|
||||
- `--var-size`: M/G suffixes supported (default: 2G).
|
||||
|
||||
|
|
@ -62,10 +63,45 @@ Check status with:
|
|||
reboot
|
||||
```
|
||||
|
||||
## Customize Rootfs (Docker + Kernel Modules)
|
||||
Use `customize.sh` to build a writable rootfs with Docker and kernel modules
|
||||
preloaded so Docker works out of the box.
|
||||
|
||||
```
|
||||
./customize.sh rootfs-docker.ext4 --size 6G --docker
|
||||
```
|
||||
|
||||
Options:
|
||||
- `--size`: optional size for the output image.
|
||||
- `--kernel`: kernel path (default: `./wtf/root/boot/vmlinux-6.8.0-94-generic`).
|
||||
- `--initrd`: initrd path (default: `./wtf/root/boot/initrd.img-6.8.0-94-generic`).
|
||||
- `--modules`: kernel modules directory (default: `./wtf/root/lib/modules/6.8.0-94-generic`).
|
||||
- `--docker`: install Docker packages into the image.
|
||||
|
||||
After boot, enable NAT and validate Docker:
|
||||
```
|
||||
./nat.sh up <id-or-name-prefix>
|
||||
ssh -i "./id_ed25519" root@<guest_ip> "systemctl enable --now docker"
|
||||
ssh -i "./id_ed25519" root@<guest_ip> "docker run --rm hello-world"
|
||||
```
|
||||
|
||||
## Build Rootfs On Demand
|
||||
`run.sh` defaults to `./rootfs-docker.ext4`. If it is missing, `run.sh` will
|
||||
invoke `make-rootfs.sh` to build it.
|
||||
|
||||
```
|
||||
./make-rootfs.sh
|
||||
```
|
||||
|
||||
`make-rootfs.sh` chooses the first available base image:
|
||||
- `./rootfs.ext4`
|
||||
- `./ubuntu-noble-rootfs/rootfs.ext4`
|
||||
- `./ubuntu-lts/rootfs.ext4`
|
||||
|
||||
## VM Info File
|
||||
Each VM writes `state/vms/<id>/vm.json` with:
|
||||
- `meta`: local metadata (id, name, pid, created_at, guest_ip, tap, api_sock, log, rootfs, kernel, snapshot info).
|
||||
- `config`: full `/vm/config` response from Firecracker.
|
||||
Each VM writes:
|
||||
- `state/vms/<id>/vm.json`: raw `/vm/config` response from Firecracker.
|
||||
- `state/vms/<id>/meta.json`: local metadata (id, name, pid, created_at, guest_ip, tap, api_sock, log, rootfs, kernel, snapshot info).
|
||||
|
||||
## Log Notes
|
||||
- `PCI: Fatal: No config space access function found` and `MissingAddressRange` lines are expected with `pci=off` in `run.sh`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue