Skip to content

Allowing override default vcpu count/mem setting of firecracker vm through OCI annotation #834

@sjtufl

Description

@sjtufl

When create container using firecracker-ctr directly, we always use default vcpu/mem setting (i.e., 1C 128MB) for firecracker vm at present. Allowing users to specify desired vcpu count and memory size via oci annotation is probably a simple way to fix the issue.

fctr run \
    --snapshotter devmapper \
    --runtime aws.firecracker \
    --cpu-quota 20000 \
    --cpu-period 100000 \
    --memory-limit 536870912 \
    --annotation aws.firecracker.vm.vcpu-count=2 \
    --annotation aws.firecracker.vm.mem-size-mib=1024 \
    --net-host \
    -d \
    docker.io/library/nginx:1.25 \
    $CONTAINER_NAME

I can create a PR to support this use case if you think it makes sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions