cloud-init
This content is not available in your language yet.
Every TebibHost image runs cloud-init on first boot. You can pass your own user data when you create a VM to install packages, create users, write files or run scripts.
What TebibHost already sets up
Section titled “What TebibHost already sets up”Your user data is added next to TebibHost’s own part, which you can’t remove. That part:
- installs the project SSH keys you picked for the image’s default user (
ubuntu,debian,rocky,almalinux); - sets the hostname (the VM’s hostname, by default its name);
- turns off password logins over SSH and logins as root;
- grows the root partition and filesystem to fill the boot disk;
- updates the package lists and installs
qemu-guest-agent(used for consistent snapshots and to report the VM’s IPs and OS); - gives the VM a fresh machine ID;
- configures the network for DHCP on IPv4 and IPv6.
Formats
Section titled “Formats”Any format cloud-init accepts works: #cloud-config YAML, a shell script starting with #!, or a
MIME multi-part file. The limit is 32 KiB. User data is read on the VM’s first boot only
and can’t be changed after the VM is created.
#cloud-configpackages: - nginxwrite_files: - path: /var/www/html/index.html content: | <h1>Hello from TebibHost</h1>runcmd: - systemctl enable --now nginxIn VMs → New VM, paste the file into cloud-init user data (optional).
tebib vm create web-2 --image debian-13 --type b1.micro --ssh-key "$KEY" --user-data web.yaml --waitRemember to open port 80 to see the page.
Network access during first boot
Section titled “Network access during first boot”Package installs need the internet. Every VM has IPv6 outbound from the start, and the major distributions’ mirrors answer over IPv6. Sources that are IPv4-only need a NAT gateway or a public IP on the VM.
Debugging
Section titled “Debugging”- The output of your user data is in
/var/log/cloud-init-output.loginside the VM. cloud-init status --longshows whether it finished and any errors.- If you can’t log in at all, watch the boot on the serial console.
The API never returns user data after the VM is created, but it is stored with the VM and handed to it on a configuration disk that anyone with root in the VM can read. Keep long-lived secrets out of it, or rotate them after first boot.