Add AlmaLinux 9 template (Alma.sh), configurable root grow command
This commit is contained in:
1 parent
665eadc8d6
commit
b61de5de22
4 files changed
+21
-2
No files matched your search
@@ -5,6 +5,7 @@
|
||||
# IMAGE_URL - cloud image to start from
|
||||
# PACKAGES - extra apt packages, comma separated
|
||||
# DOCKER=1 - install Docker from get.docker.com
|
||||
# GROW_CMD - grows the root fs (default: ext4 on sda1)
|
||||
#
|
||||
# Override where it lands with environment variables:
|
||||
# STORAGE=ssd BRIDGE=vmbr1 ./Ubuntu-LTS-Small.sh
|
||||
@@ -30,9 +31,9 @@ build_template() {
|
||||
cp "$IMAGE_DIR/$(basename "$IMAGE_URL")" "$disk"
|
||||
|
||||
# The cloud image's root filesystem is only ~2 GB, too small for Docker.
|
||||
# Grow the image by 4 GB and the root partition (sda1) with it.
|
||||
# Grow the image by 4 GB and the root partition with it.
|
||||
qemu-img resize -q "$disk" +4G
|
||||
virt-customize -a "$disk" --run-command "growpart /dev/sda 1 && resize2fs /dev/sda1"
|
||||
virt-customize -a "$disk" --run-command "${GROW_CMD:-growpart /dev/sda 1 && resize2fs /dev/sda1}"
|
||||
|
||||
# Guest agent, extra packages, optional Docker, and an empty machine-id so clones get their own DHCP lease
|
||||
virt-customize -a "$disk" --install "qemu-guest-agent${PACKAGES:+,$PACKAGES}"
|
||||
|
||||
Reference in new issue
Block a user