Concrete AWS PVM build inputs for downstream consumers like infra.
This repo exists to export the exact flake attrs that infra expects in its
prod.env and AWS image pipeline:
packages.x86_64-linux.linux-port-pvmpackages.x86_64-linux.linux-port-pvm-guestpackages.x86_64-linux.firecracker-pvm
Current upstream sources:
- kernel:
virt-pvm/linuxbranchpvm-612 - Firecracker:
loopholelabs/firecrackerbranchmain-live-migration-pvm
The exported packages are the concrete build layer below Port's host-kit contract:
- Port owns the host-kit contract and NixOS module surface
pvm-buildsowns the concrete patched kernel and VMM derivationsinfraconsumes those derivations to build and import the AWS AMI- Port's hosted PVM guest artifact pipeline can also consume the dedicated
linux-port-pvm-guestderivation forx86_64/firecracker/pvm
Typical downstream wiring:
export INFRA_AWS_PVM_BUILD_FLAKE_REF=git+file:///home/alex/workspace/spoke-sh/pvm-builds
export INFRA_AWS_PVM_KERNEL_ATTR=packages.x86_64-linux.linux-port-pvm
export INFRA_AWS_PVM_FIRECRACKER_ATTR=packages.x86_64-linux.firecracker-pvmKernel contract notes:
- AWS PVM hosts run K3s directly on this kernel, so kube-proxy and CNI hostport flows need working xtables support.
- AWS PVM hosts must expose the host-side PVM path, not just guest support.
Keep
CONFIG_EXPERT=y,CONFIG_KVM=y,CONFIG_KVM_SW_PROTECTED_VM=y, andCONFIG_KVM_PVM=yenabled when rebasing the kernel. - PVM guests need a separate kernel contract from the host image. Keep
CONFIG_X86_PIE=yandCONFIG_PVM_GUEST=yenabled for thelinux-port-pvm-guestderivation so the guest lane does not silently reuse the standard Firecracker kernel. - Firecracker guests on the PVM lane still surface block, net, and vsock
devices over
virtio_mmio, so keepCONFIG_VIRTIO_MMIO=yandCONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=yenabled for thelinux-port-pvm-guestderivation, along with guest-side vsock support viaCONFIG_VSOCKETS=yandCONFIG_VIRTIO_VSOCKETS=y. - Hosted K3s on the PVM guest lane expects flannel VXLAN and standard pod
networking to work without a module-loading step. Keep
CONFIG_TUN=y,CONFIG_BRIDGE=y,CONFIG_BRIDGE_NETFILTER=y,CONFIG_NET_UDP_TUNNEL=y,CONFIG_VXLAN=y, andCONFIG_VETH=yenabled for thelinux-port-pvm-guestderivation. - Hosted K3s guests also need the full kube-proxy and flannel netfilter
surface as built-ins, because these minimal guest images do not ship
/lib/modules. Keep the nftables families and NAT helpers enabled in-kernel for thelinux-port-pvm-guestderivation, includingCONFIG_NF_TABLES_INET=y,CONFIG_NF_TABLES_IPV4=y,CONFIG_NF_TABLES_IPV6=y,CONFIG_NFT_COMPAT=y,CONFIG_NFT_NAT=y,CONFIG_NFT_MASQ=y,CONFIG_IP_NF_NAT=y, andCONFIG_IP_NF_TARGET_MASQUERADE=y. - Hosted K3s guests also need the standard container namespace surface. Keep
CONFIG_NAMESPACES=y,CONFIG_UTS_NS=y,CONFIG_IPC_NS=y,CONFIG_NET_NS=y,CONFIG_PID_NS=y,CONFIG_CGROUP_NS=y, andCONFIG_TIME_NS=yenabled for thelinux-port-pvm-guestderivation so containerd and kubelet can resolve/proc/<pid>/ns/*entries correctly. - Keep
CONFIG_NETFILTER_XT_MATCH_STATISTIC=yandCONFIG_NETFILTER_XT_MATCH_MULTIPORT=yenabled when rebasing the kernel.