fix: Don't pre-create child containers - let ai user create them as needed
Changed to only prepare /var/lib/machines/ directory inside aios. ai user will create child containers (workspace, restore-img, etc.) using machinectl as needed.
This commit is contained in:
16
build.zsh
16
build.zsh
@@ -101,25 +101,15 @@ echo "=== Finalizing ==="
|
|||||||
# Copy aios-ctl.zsh for host machine control
|
# Copy aios-ctl.zsh for host machine control
|
||||||
cp -rf ./cfg/aios-ctl.zsh root.x86_64/var/lib/machines/arch/opt/aios-ctl.zsh
|
cp -rf ./cfg/aios-ctl.zsh root.x86_64/var/lib/machines/arch/opt/aios-ctl.zsh
|
||||||
|
|
||||||
# Create child containers inside aios (not separate containers)
|
# Prepare directory for child containers (ai user will create them as needed)
|
||||||
echo "Creating child containers inside aios..."
|
echo "Preparing directory for child containers..."
|
||||||
mkdir -p root.x86_64/var/lib/machines/arch/var/lib/machines
|
mkdir -p root.x86_64/var/lib/machines/arch/var/lib/machines
|
||||||
|
|
||||||
# Copy the base system to temporary location to avoid recursion
|
|
||||||
cp -a root.x86_64/var/lib/machines/arch /tmp/aios-base-$$
|
|
||||||
|
|
||||||
# Create child containers inside aios
|
|
||||||
cp -a /tmp/aios-base-$$ root.x86_64/var/lib/machines/arch/var/lib/machines/restore-img
|
|
||||||
cp -a /tmp/aios-base-$$ root.x86_64/var/lib/machines/arch/var/lib/machines/workspace
|
|
||||||
|
|
||||||
# Cleanup temporary
|
|
||||||
rm -rf /tmp/aios-base-$$
|
|
||||||
|
|
||||||
# Copy install script
|
# Copy install script
|
||||||
cp -rf ./cfg/install.sh ./install.sh
|
cp -rf ./cfg/install.sh ./install.sh
|
||||||
chmod +x ./install.sh
|
chmod +x ./install.sh
|
||||||
|
|
||||||
# Create tarball with aios (contains child containers inside)
|
# Create tarball with aios (ready for child containers)
|
||||||
echo "Creating tarball..."
|
echo "Creating tarball..."
|
||||||
tar -zcvf aios-bootstrap.tar.gz root.x86_64/ install.sh
|
tar -zcvf aios-bootstrap.tar.gz root.x86_64/ install.sh
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ fi
|
|||||||
echo "1. Extracting $TARBALL..."
|
echo "1. Extracting $TARBALL..."
|
||||||
tar xf "$TARBALL"
|
tar xf "$TARBALL"
|
||||||
|
|
||||||
# Install aios (contains child containers inside)
|
# Install aios (base container)
|
||||||
echo "2. Installing aios to /var/lib/machines/..."
|
echo "2. Installing aios to /var/lib/machines/..."
|
||||||
rm -rf /var/lib/machines/$NAME
|
rm -rf /var/lib/machines/$NAME
|
||||||
mkdir -p /var/lib/machines
|
mkdir -p /var/lib/machines
|
||||||
|
|||||||
Reference in New Issue
Block a user