v0.1.7

OS Init Scripts

Last updated


This page lists the supported OS versions, their image sources, and the sh/<os>_<version>.sh script new VMs run during initialization.

Supported Versions and Images


osversionImage sourceSupported until (sh/pdvm_os.json)
debian11cloud.debian.org bullseye generic amd64June 2026
12cloud.debian.org bookworm generic amd64June 2028
13cloud.debian.org trixie generic amd64June 2030
ubuntu20.04mirror.twds.com.tw ubuntu-cloud-images server cloudimg amd64April 2030
22.04same as aboveApril 2032
24.04same as aboveApril 2036
rockylinux8dl.rockylinux.org GenericCloud-Base latest x86_64May 2029
9same as aboveMay 2032
10same as aboveMay 2035

Any other combination fails at the getting OS image step with unsupported ... version.

How It Runs


Once the VM first accepts SSH, the main node logs in as the cloud-init user and runs:
  1. curl -fsSL http://<NODE_{MAIN_NODE}>:<PORT>/sh/<os>_<version>.sh | sudo bash -s <VM_ROOT_PASSWORD>

When VM_ROOT_PASSWORD is empty no argument is passed and the script uses its built-in 0123456789. Each output line is relayed as an SSE event; any failing command (set -e) counts as an SSH initialization failure and the VM is purged.

What the Scripts Do


ActionDebianUbuntuRocky Linux
Set the root password✓✓✓
Reset the cloud-init user's password to passwd in /etc/shadow and grant NOPASSWD sudo13 only——
Disable passwd / chpasswd and lock password aging✓✓✓
Switch package sourcesftp.tw.debian.org (11 / 12); deb.debian.org deb822 with non-free / non-free-firmware (13)tw.archive.ubuntu.comEnable EPEL
Upgrade, install common tools and qemu-guest-agent✓✓✓
Locale en_US.UTF-8✓✓—
Timezone Asia/Taipei✓✓✓
sysctl: ignore ICMP echo, raise inotify limit✓✓✓
sysctl: net.core.somaxconn = 65535——10 only
Create a 2G /swapfile✓✓✓
Install the sysinfo login banner✓✓✓
Clear package cache, /tmp, and logs✓✓✓

After the script finishes, the service reboots the VM to apply GRUB and kernel settings.

Customization


Edit the matching file under sh/; the service serves it as a static file on every request, so no restart is needed. Adding a version also requires updating the supported list and image URL in internal/service/osImage.go.
中文