diff --git a/home/scripts/lxc/lab-create.sh b/home/scripts/lxc/lab-create.sh index 9ef3309..c5aa6fc 100644 --- a/home/scripts/lxc/lab-create.sh +++ b/home/scripts/lxc/lab-create.sh @@ -9,6 +9,19 @@ echo "Creating LXC container ${CONTAINER}..." # lxc-create -n "$CONTAINER" -t download -- -d ubuntu -r noble -a amd64 lxc-create -n "$CONTAINER" -f /etc/lxc/default.conf -t download -- -d ubuntu -r noble -a amd64 + +# configure DHCP before first boot +mkdir -p "/var/lib/lxc/${CONTAINER}/rootfs/etc/netplan" +cat > "/var/lib/lxc/${CONTAINER}/rootfs/etc/netplan/10-dhcp.yaml" <