Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [cloud-init]

**cloud-init** is a tool that handles initialization and configuration of cloud instances. It is installed in many Cloud Images used on major clouds and supports various Linux distributions (as well as a couple of the BSDs). Some higher level tools, such as Terraform, use it.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

Automate Linux installation

For cloud environments, there is Cloudinit. I would like to know if there is something similar for desktop systems. Context: I want to create a kiosk with Chromium pre-installed and running through ...
Skhaz's user avatar
  • 103
0 votes
0 answers
14 views

Ubuntu Cloud Image terminal display resolution

I've been testing out the Cloud Image variants of Ubuntu Server on a Proxmox VE, but I encounter one issue with the NoVNC console - the resolution seems to be something like 640x480 which is very ...
alex.b.bg's user avatar
0 votes
0 answers
46 views

why does the domain name get delete during setup using a Cloudinit script?

I am using a Cloud-Init script to setup up my Ubuntu 22.04 server. but when i check the logs to join an active directory it delete the subdomain name why? i can only remote connect through IP address ...
AzReaL's user avatar
  • 1
0 votes
0 answers
929 views

partitionning additional disks as LVM with cloud-init

I'm using terraform and cloud-init to setup new VMs. I want to have additional disks setup and mounted in the new VM, with XFS partitions on top of LVM. Right now the only way I've found that allows ...
Edzilla's user avatar
0 votes
0 answers
149 views

How to stop cloud-init setting "Domains=" in networkd config?

I am using cloud-init on Debian with networkd for renderer and activator tasks. Is there a way to stop cloud-init adding Domains= to the generated systemd-networkd config file ? i.e. cloud-init ...
Little Code's user avatar
0 votes
0 answers
114 views

Stopping parameter expansion in write_file content of cloud-init userdata

Background I'm using Terraform and cloud-init to provision an Ubuntu VM. The Terraform template contains an embedded cloud-init user_data section that contains a write_file directive to write a bash ...
McKenzieCarr's user avatar
1 vote
2 answers
684 views

cloudinit does not run for qemu/kvm systems created by terraform and libvirt provider

I'm trying to provision a VM on qemu/kvm hypervisor using cloudinit with terraform and the libvirt provider. I can get the machine to start, but the cloudinit is not getting kicked off. I know that ...
Jonathan Heady's user avatar
0 votes
1 answer
244 views

Change password first Log In sudo su with Cloud-init

I'm trying to implement this rule with cloud init but I can't, I would like the user to have a password entered by me but as soon as he executes the sudo su command, the system forces the user to ...
ada-devops's user avatar
1 vote
1 answer
341 views

Is there an immutable KVM host OS?

My homelab environment is primarily git repo->puppet apply->centos7 hardware running kvm or guests. Simple tooling but it works. I'm doing a lot more terraform at work these days and have been ...
alan laird's user avatar
1 vote
1 answer
156 views

secrets unintentionally printed to cloud-init logs

The two lines of bash code below pull a secret into a cloud-init script for an Azure VM running RHEL8. But each of the two lines has an unintended side effect of printing the secret into the cloud-...
CodeMed's user avatar
  • 5,239
0 votes
0 answers
157 views

Cloud-Init boot takes One Hour+ to start

Hello Everyone, I am looking to understand what process is running that halting the boot up of our ubuntu VM's that was originally configured with cloud-init. The after the entries paint in the ...
Josh's user avatar
  • 1
2 votes
1 answer
6k views

cloud-init does not work for Ubuntu 22.04 images

I'm testing cloud-init for Ubuntu 22.04 images, So I first downloaded the cloud image from: https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-amd64.img Then I create ...
daisy's user avatar
  • 54.7k
0 votes
1 answer
68 views

cloud-init: Getting the error: No such function check

I have this configuration, disk_setup: /dev/vdb: table_type: gpt, layout: true fs_setup: - label: repo filesystem: ext4 device: /dev/vdb1 partition: auto This is the error I get, ...
Evan Carroll's user avatar
  • 31.3k
2 votes
0 answers
665 views

Can't boot arm64 cloud image with qemu

I first downloaded ubuntu-22.04-server-cloudimg-arm64.img, then I started it with qemu qemu-system-aarch64 -m 2G -M virt -cpu max -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -drive if=none,file=...
daisy's user avatar
  • 54.7k
1 vote
1 answer
120 views

Why does the cloud-init version in log file conflict with the version in the binary?

Why does head -n 1 /var/log/cloud-init.log show the following, util.py[DEBUG]: Cloud-init v. 21.2-3-g899bfaa9-0ubuntu2~20.04.1 running 'init-local' at Fri, 21 Jan 2022 18:03:44 +0000. Up 48.49 seconds....
Evan Carroll's user avatar
  • 31.3k
3 votes
0 answers
975 views

ubuntu-server PXE cloud-init autoinstall not automatic

I'm trying to automatically install ubuntu-server 21.10 via PXE. Since the text-based installation does work, I omit some details about the whole PXE setup. This is the relevant part of /srv/tftp/...
a.ilchinger's user avatar
2 votes
2 answers
2k views

cloud-init.log shows write_files.0: Additional properties are not allowed ('defer' was unexpected)

I have a very simply stansa in my cloud-init, write_files: - path: /home/ecarroll/.zshrc content: | source ~/powerlevel10k/powerlevel10k.zsh-theme owner: ecarroll:ecarroll ...
Evan Carroll's user avatar
  • 31.3k
5 votes
1 answer
8k views

Errors during downloading metadata for repository 'epel'

What specific syntax must be changed in the cloud-init startup script excerpt below in order to handle the error message shown below by retrying something else until it correctly works without ...
CodeMed's user avatar
  • 5,239
1 vote
1 answer
745 views

Why are cloud-init processes running long after server creation?

I'm spinning up a new Ubuntu 18.04 cloud server and using a cloud-init to install docker. I can see that the cloud-init process runs and apparently completes fine, by inspecting the /var/log/cloud-...
drmrbrewer's user avatar
0 votes
2 answers
577 views

DHCP lease renewal fails on AWS lightsail server

Tuesday the 12th of September 2021 out of the blue a root server of mine running debian hosted in AWS Lightsail crashed. After a reboot it would run fine for approximately 20-60 minutes, after that it ...
Gellweiler's user avatar
1 vote
1 answer
1k views

How can I use cloud-init NoCloud with OPNsense 21?

I'm new to OPNSense (also to FreeBSD in general) and I'm interested to use cloud-init to configure at least LAN (vtnet0) with static ip address, root password and eventually running custom scripts (or ...
Stefano Cappa's user avatar
2 votes
2 answers
2k views

Debian 11 fails to set IPv6 via Cloud-Init: "ens18/disable_ipv6: No such file or directory"

When using Cloud-Init to set both a static IPv4 and IPv6 in the latest Debian 11 (generic) cloud image, networking.service throws the following error at boot: Aug 16 14:28:29 debian ifup[540]: sysctl: ...
miho's user avatar
  • 145
1 vote
3 answers
1k views

prevent secrets from being printed to cloud-init logs

A cloud-init script needs to set environment variable values to contain secrets. What specific syntax can be changed in the below to prevent the secret PASS and PSS from being printed in the cloud-...
CodeMed's user avatar
  • 5,239
0 votes
1 answer
835 views

Unexpected token within environment variable throws syntax error in cloud-init

What specific syntax must be changed in the code below in order to prevent the error that is being thrown when an environment variable contains an unexpected token? THE CODE: Specifically, a cloud-...
CodeMed's user avatar
  • 5,239
0 votes
0 answers
486 views

Mount NFS drive during automatic installation

I am setting up automatic installation (autoinstall / AutoInstallation) of Ubuntu server 20.04 Focal by booting the USB installer and fetching the user-data configuration file from a local http server....
johs42's user avatar
  • 3
0 votes
2 answers
701 views

Is there a way to capture/log installations and installation errors caused by the tasksel?

I have an automation script that involves this line: :~$ sudo tasksel install desktop-xfce meta-top10 meta-default tasksel: apt-get failed (100) But I am unsure why tasksel failed. Is there a way to ...
Flair's user avatar
  • 1,241
1 vote
3 answers
5k views

Changing default values in /etc/ssh/sshd_config using cloud init config

My Ubuntu18 VMs come up with the following default config in /etc/ssh/sshd_config upon deployment, which makes my ssh sessions into them terminate upon 5min inactivity: ClientAliveInterval 300 ...
dandreye's user avatar
0 votes
0 answers
1k views

Obscuring password in cloud-init userdata startup of AWS EC2 instance

An AWS EC2 instance creates a new user during its cloud-init startup process, and sets the password for that new user. Terraform is being used to trigger the creation of the new EC2 instance, which ...
CodeMed's user avatar
  • 5,239
0 votes
2 answers
3k views

How do I use Hashicorp's Linux Repository with Centos 8 and cloud-init to install Vault

How do I use Hashicorp's Linux Repository with Centos 8 and cloud-init to install vault? I have tried this cloud-config file without success: #cloud-config package_update: true packages: - jq - ...
flitbit's user avatar
  • 103
1 vote
1 answer
2k views

Make Python3 default without breaking yum in RHEL7

What specific syntax needs to be changed or added to the below in order for commands calling python in a RHEL7 VM to be interpreted using Python3 WITHOUT breaking programs like yum that require ...
CodeMed's user avatar
  • 5,239
1 vote
2 answers
3k views

Ubuntu Server won't start if no GPU is installed

I try to set my old PC as a headless Ubuntu Server. When I first installed it with a GPU and then removed the GPU everything worked as excepted. My Motherboard (Asus p8p67-m) made one long and three ...
Max R.'s user avatar
  • 121
6 votes
2 answers
8k views

Azure VM cloud-init overrides /etc/fstab

I added an additional data disk, as described in the Attach a data disk to a Linux VM documentation. The partition in question is /dev/sdc1. I added this line to the very bottom. Unfortunately the ...
lapsus's user avatar
  • 161
3 votes
2 answers
3k views

When using cloud-init, what order are the users created in?

I am using cloud-init to initialize a RHEL Atomic Host VM. I have the following as my user-data file: #cloud-config groups: - ourgroup users: - name: muser primary_group: ourgroup ...
pacoverflow's user avatar
-1 votes
1 answer
5k views

Rename network interface ubuntu on instance boot cloud-init

I have two network interfaces- eth0 and eth1 on the Ubuntu image I am building. I want to create cloud instances from that image. For every cloud instance it creates, every instance will have those ...
user304255's user avatar
0 votes
1 answer
784 views

How to boot after partitioning

I have an ubuntu server. Via cloud-init I make partitions. When I restart my server, it would not come up again. I am sure I miss one command to tell the system which partition should be used for ...
Jan's user avatar
  • 175
2 votes
0 answers
146 views

Using cloud-init to modify application properties used by init scripts

I previously asked this question about ordering of init scripts. It turns out that this isn't the solution I need (or possibly even the correct question to ask) - it was phantom success. My system is ...
ben_979's user avatar
  • 33
1 vote
1 answer
2k views

Order of execution for cloud-init-local on AWS Linux

I am attempting to create a new EC2 instance and I am supplying user-data to the instance at create time. My user-data executes some bash commands that modify the parameters of a properties file for ...
ben_979's user avatar
  • 33
2 votes
1 answer
2k views

How to setup MySQL with cloud-init?

How can I do this? #cloud-config users: - name: dev ssh-authorized-keys: - ssh-rsa AB3NzaC1yc... sudo: ['ALL=(ALL) NOPASSWD:ALL'] groups: sudo shell: /bin/bash packages: - ...
nmdias's user avatar
  • 141
90 votes
9 answers
105k views

How to disable `apt-daily.service` on Ubuntu cloud VM image?

The Ubuntu 16.04 server VM image apparently starts the "apt-daily.service" every 12 hours or so; this service performs various APT-related tasks like refreshing the list of available packages, ...
Riccardo Murri's user avatar