- Create /etc/systemd/nspawn/aios.nspawn during installation - Set Network Private=no to share host network - Allows claude to connect to api.anthropic.com - Fixes EAI_AGAIN network error
31 lines
580 B
Bash
31 lines
580 B
Bash
#!/bin/bash
|
|
# aios installation script
|
|
|
|
NAME="aios"
|
|
TARBALL="aios-bootstrap.tar.gz"
|
|
|
|
echo "=== aios installation ==="
|
|
|
|
# Extract and install
|
|
tar xf "$TARBALL"
|
|
mkdir -p /var/lib/machines
|
|
mv root.x86_64 /var/lib/machines/$NAME
|
|
|
|
# Create aios.nspawn for network access
|
|
echo "Creating network configuration..."
|
|
mkdir -p /etc/systemd/nspawn
|
|
cat > /etc/systemd/nspawn/$NAME.nspawn <<'EOF'
|
|
[Exec]
|
|
Boot=yes
|
|
|
|
[Network]
|
|
Private=no
|
|
EOF
|
|
|
|
echo "=== Installation complete ==="
|
|
echo ""
|
|
echo "Usage:"
|
|
echo " sudo machinectl start $NAME"
|
|
echo " sudo machinectl shell $NAME /bin/su - ai"
|
|
echo ""
|