When enabled (default), a 10Gi ephemeral disk will be attached to the VM and mounted at
/tmp via cloud-init. This provides faster temporary storage for build operations.
emptyDisk volume (10Gi) as a third disk to the VMruncmd commands to format and mount it at /tmpThe following runcmd script will be automatically added to your cloud-init configuration:
runcmd:
- |
TMP_DISK=/dev/vdc
if [ -b "$TMP_DISK" ]; then
# Create filesystem if not already present
if ! blkid "$TMP_DISK" | grep -q ext4; then
mkfs.ext4 -F "$TMP_DISK"
fi
# Create mount point and mount
mkdir -p /mnt/tmp
mount "$TMP_DISK" /mnt/tmp
# Move existing /tmp contents and remount
rsync -a /tmp/ /mnt/tmp/ 2>/dev/null || true
umount /mnt/tmp
mount "$TMP_DISK" /tmp
chmod 1777 /tmp
echo 'Successfully mounted /tmp disk'
else
echo 'Warning: /tmp disk not found at $TMP_DISK'
fi
/dev/vdc (after rootdisk and cloudinit disks)runcmd: section in your cloud-init, this script will be prepended to itchmod 1777 ensures proper sticky bit permissions for /tmp