Use shared rootfs with per-VM home

This commit is contained in:
Thales Maciel 2026-01-29 21:41:33 -03:00
parent dee329cf39
commit 092700b241
No known key found for this signature in database
GPG key ID: 33112E6833C34679
3 changed files with 43 additions and 47 deletions

View file

@ -231,6 +231,10 @@ ssh -i "$SSH_KEY" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
printf 'nameserver %s\n' \"$DNS_SERVER\" > /etc/resolv.conf
echo \"$VM_NAME\" > /etc/hostname
printf '127.0.0.1 localhost\n127.0.1.1 %s\n' \"$VM_NAME\" > /etc/hosts
mkdir -p /home
if ! grep -q '^/dev/vdb ' /etc/fstab; then
echo '/dev/vdb /home ext4 defaults 0 2' >> /etc/fstab
fi
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y upgrade
DEBIAN_FRONTEND=noninteractive apt-get -y install git less tree ca-certificates curl