It's all about the the Iface name

Posted on
firecracker microvm
thumbnail

Last night’s problem with the second VMM conflicting on the network layer with the first one was indeed the veth0 name hard coded in firectl. I’ve added the --veth-iface-name argument to firectl and I am now able to start multiple VMMs on a single bridge.

sudo firectl \
    --firecracker-binary=/usr/bin/firecracker \
    --kernel=/firecracker/kernels/vmlinux-v5.8 \
    --root-drive=/firecracker/filesystems/alpine-base-root.ext4 \
    --cni-network=alpine \
    --socket-path=/tmp/alpine.sock \
    --ncpus=1 \
    --memory=128 \
    --veth-iface-name=vethalpine1
sudo firectl \
    --firecracker-binary=/usr/bin/firecracker \
    --kernel=/firecracker/kernels/vmlinux-v5.8 \
    --root-drive=/firecracker/filesystems/alpine-base-root.ext4-2 \
    --cni-network=alpine \
    --socket-path=/tmp/alpine2.sock \
    --ncpus=1 \
    --memory=128 \
    --veth-iface-name=vethalpine2

The bit to looks at is the way to handle multiple copies of the root file system.

One step closer to the ETCD cluster on Firecracker.