packer-builds

Packer Builds for LXC and Libvirt
git clone https://git.in0rdr.ch/packer-builds.git
Log | Files | Refs | Pull requests |Archive | README

commit 0d6472fdd0307f03893d0347d435d25204b49326
parent f194850ba10096fcf5e0c7072c6995bece9255db
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Sun, 23 Nov 2025 23:00:33 +0100

feat(deploy-output): amd64 adaptations

Diffstat:
Mconfig/lxc-config | 5++---
Mdeploy-output.sh | 12++++++------
2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/config/lxc-config b/config/lxc-config @@ -1,12 +1,11 @@ # Distribution configuration -lxc.arch = armv7l +lxc.arch = amd64 # Container specific configuration lxc.include = /usr/share/lxc/config/common.conf -lxc.hook.start-host = /usr/share/lxc/hooks/systemd-workaround # Network configuration lxc.net.0.type = veth -lxc.net.0.link = br-lan +lxc.net.0.link = br0 lxc.net.0.flags = up lxc.net.0.name = eth0 diff --git a/deploy-output.sh b/deploy-output.sh @@ -34,18 +34,18 @@ fi # Prepare lxc config directory -target_config="/srv/lxc/$name/config" -mkdir -p "/srv/lxc/$name" +target_config="/var/lib/lxc/$name/config" +mkdir -p "/var/lib/lxc/$name" # Extract the rootfs tarball and add the config -tar -xvf "$output/rootfs.tar.gz" -C "/srv/lxc/$name" +tar -xvf "$output/rootfs.tar.gz" -C "/var/lib/lxc/$name" # copy config cp "$output/lxc-config" $target_config # adjust rootfs path -echo -e "\nlxc.rootfs.path = dir:/srv/lxc/$name/rootfs" >> $target_config +echo -e "\nlxc.rootfs.path = dir:/var/lib/lxc/$name/rootfs" >> $target_config # set hostname -echo "${name}.local" > "/srv/lxc/$name/rootfs/etc/hostname" -sed -i "s/LXC_NAME/${name}.local/g" "/srv/lxc/$name/rootfs/etc/hosts" +echo "${name}.local" > "/var/lib/lxc/$name/rootfs/etc/hostname" +sed -i "s/LXC_NAME/${name}.local/g" "/var/lib/lxc/$name/rootfs/etc/hosts"