Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [cloud-init]

The tag has no usage guidance.

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

My cloud config template file does not seem to be working when I use it to boot up a droplet in Digital Ocean?

I'm using Terraform to spin up a DO droplet, using an Ubuntu and Docker image. Checkout below: resource "digitalocean_droplet" "web" { image = "docker-20-04" name ...
user avatar
  • 101
-3 votes
1 answer
22 views

What is the simplest data source for a cloud-init home lab?

I'm using cloud-init 22.1-14 to spin up VMs using Ubuntu cloud images and kvm/qemu on a home server. I think I'm at the stage where I need to implement a data source because my VM creation dies if I ...
user avatar
  • 900
1 vote
1 answer
172 views

Debian 11 dpkg-reconfigure cloud-init does not run the graphical menu

I'm trying to run dpkg-reconfigure cloud-init on Debian 11 After I run the command, this shows up multiple times in the terminal: perl: warning: Please check that your locale settings: LANGUAGE = (...
user avatar
0 votes
0 answers
60 views

Why would cloudinit resort to using iid-datasource-none?

Had my ssh host key reset by GCE. Found /var/lib/cloud/instances/iid-datasource-none was created. https://cloudinit.readthedocs.io/en/latest/topics/datasources/fallback.html?highlight=iid-datasource-...
user avatar
0 votes
0 answers
141 views

Not able to setup administrator password with cloudbase-init

i try to install a windows server 2019 with cloudbase-init. I did the following steps to do this: Install a Windows Server 2019 with Desktop Experience Install Cloudbase-Init Added the following ...
user avatar
1 vote
1 answer
564 views

How to ensure Cloud-Init runs exactly once and once only?

As far as I can see, cloud-init runs every time the config changes. Not just the very first time the system boots, but every time the provided configuration changes. This makes somewhat sense, as I ...
user avatar
  • 192
1 vote
1 answer
532 views

Openstack ubuntuVM SSH public key Permission denied on first boot

I am deploying Openstack(I tried victoria and ussuri) with kolla-ansible on 3 CentOS 8 Nodes (1=Control+Compute,2 and 3=Compute). Deployments works fine without any problems but when I create a new VM ...
user avatar
  • 11
0 votes
0 answers
132 views

cloud-init seems to be ignoring write-files script

H! I am trying to configure VMs with cloud-init, using the terraform Libvirt provider. For some reason I don't understand, setting hostname works, but writing and running a script for additional ...
user avatar
1 vote
2 answers
1k views

run a script via cloud-init

I know cloud-init allows to run commands as part of the cloud-init yml runcmd: - [ pwd ] but I am looking for a way to execute a full shell script. Some people just pipe the output of a curl into a ...
user avatar
  • 333
0 votes
1 answer
57 views

Cloud-init expire true issue

After add expire: true in the cloud-init script, I can log in via key to the server, but it says You must change your password now and login again! I want if I set the password, the password expires ...
user avatar
0 votes
0 answers
254 views

cloud-init userdata/metadata not loaded in ESXi

I'm using Terraform to provision virtual machines in an ESXi environment. I do this by having once manually imported the Ubuntu Focal Cloud Image as template and cloning virtual machines from it, with ...
user avatar
0 votes
1 answer
126 views

All Linux VMs on Azure won't boot, stuck on cloud-init (metadata service crawler) initialization

I have around 5 VMs in Azure, which were originally provisioned as Ubuntu 18 and since then I've been dist-upgrading them several times. A few months ago I noticed that similar VMs on different ...
user avatar
1 vote
2 answers
389 views

How do I download and install a regular DPKG package in a cloud-init script?

I'm spinning up lightweight containers on a Linux Host using LXD/LXC. The sole purpose of these containers is to host "Dotnet & Dotnet core apps" For a while I've been using Ansible, but ...
user avatar
  • 293
0 votes
0 answers
156 views

Qemu cloud-init nocloud-net static ip

I'm using ubuntu-cloud images and I'm trying to run cloud-init with nocloud-net -smbios type=1,serial=ds=nocloud-net;s=http://10.10.0.1:8000/ as described at https://cloudinit.readthedocs.io/en/latest/...
user avatar
  • 1
0 votes
0 answers
475 views

Cloud-init for ubuntu-20.04-server-cloudimg works but not ubuntu-20.04-minimal-cloudimg-amd64

So I'm trying to use cloud-init with minimal image ( https://cloud-images.ubuntu.com/minimal/releases/focal/release/ubuntu-20.04-minimal-cloudimg-amd64.img ) but it does not seem to work at all. The ...
user avatar
  • 1
1 vote
0 answers
93 views

While creating instances, Cloud-init stops before creating the SSH keys

We have OpenStack v2.3.1, Mitaka with KVM installed on our cluster. While creating instances, the VMs are created successfully every time. However, Cloud-init randomly stops before creating SSH keys ...
user avatar
0 votes
0 answers
721 views

Mount Azure virtual hard disks on filesystem during Azure Linux VM creation using Terraform

I am using Terraform to automate VM creation on Microsoft Azure. The Terraform script shall accept data disk configuration as below (refer data_disk_size_gb), create the virtual hard disk and ...
user avatar
  • 133
0 votes
0 answers
35 views

How can I specify what netmask to use in Cloud-init

Right now my CentOS 7 installation is being configured with netmask 255.255.255.255 I need this set to 255.255.255.0 How can I get cloud-init to make these changes?
user avatar
  • 175
0 votes
1 answer
154 views

How to create a new user correctly in a debian instance?

I am using ready-made images of debian in the qcow2 format. The default user is "debian". I want to create another user via openstack-horizon. So I elaborated the following script: #cloud-...
user avatar
  • 17
0 votes
1 answer
565 views

Ubuntu Cloud-init User cant login

I have created an ISO to mount to a prepped Ubuntu template, so when it deploys and boots the first time, Cloud init adds some users and do a few commands. Everything seems to work fine as far as i ...
user avatar
3 votes
3 answers
3k views

Debian 10 cloud-init waiting for DHCP on boot with static network configuration

Running Debian 10 Buster image (created with build-openstack-debian-image --release buster) with cloud-init image created by cloud-localds -v --disk-format raw --filesystem iso9660 --network-config=...
user avatar
  • 327
1 vote
1 answer
218 views

How to configure multiple interface for cloud_init_nics using variables in ansible

i need some help on configure multiple cloud_init_nics using variable files. Here is my variable files for example: files/dict vm: all: - name: rhel7 hostname: rhel7 dns: "8.8.8....
user avatar
0 votes
1 answer
81 views

`cloud-init` does not block VM provisioning

I use Azure and I would like to use cloud-init to install some software on VM creation. Here is the content of cloud-init.yml: #cloud-config package_update: true package_upgrade: true runcmd: - ...
user avatar
2 votes
1 answer
1k views

Escape characters in systemd ExecStart fail

I have the following snippet to extract a value from a jenkins server jnlp config file. It works out of the box in the terminal but not as a unit. I want a unit so I can put the value somewhere and ...
user avatar
2 votes
0 answers
293 views

How to use cloud config in pxe boot?

I am using netbootxyz in order to boot my Ubuntu environments. In matter of the facts, is that I am using pre-seed configuration. The problem is that there are some minor bugs: gnome-terminal is not ...
user avatar
1 vote
0 answers
134 views

How to pass VM name (not hostname) to VM during provisioning

THE SHORT VERSION When provisioning a new VM through the vCenter API, we need to pass the VM's given name (the name given in the vCenter UI, not the hostname) to the OS during the initial boot/...
user avatar
  • 121
2 votes
0 answers
1k views

Cloud Init with Flatcar Linux -- Configuration not applying when passing custom file?

I'm using Telmate's Terraform provider for Proxmox and trying to deploy Flatcar linux virtual machines using Cloud Init by passing files via cicustom. Based on their example, I have crafted the ...
user avatar
1 vote
2 answers
2k views

powershell user data script run on restart of the Windows instance

We have windows servers that do application initialization which takes almost 3-4 hours for servers to be online. So to avoid downtime we use autoscaling group lifecycle hooks. Now we want to shut ...
user avatar
0 votes
0 answers
123 views

Can't reconnect VPS Essential OVH after removing set_hostname from cloud-init

I have a VPS Essential in OVH with Ubuntu 18.04 LTS installed. I just removed the set_hostname module of the cloud_init_modules from /etc/cloud/cloud.cfg and reboot the system and now I cannot connect ...
user avatar
  • 113
4 votes
4 answers
25k views

Boot issue on clean Ubuntu Server 20.04 system

I have recently installed Ubuntu 20.04 on a hdd in my 2009 Mac pro 4,1 (flashed to 5,1). I've wiped and reinstalled 3 times at this point. All three times, The installation goes without a hitch but ...
user avatar
0 votes
1 answer
315 views

Set ipv6 addres/gateway with cloud-init

In CentOS 7.3 I had the following in /etc/sysconfig/network-scripts/ifcfg-eth0: IPV6INIT=yes IPV6ADDR=[address]/64 IPV6_DEFAULTGW=[gateway address] This worked fine. However, now that 7.4 uses cloud-...
user avatar
  • 165
0 votes
1 answer
498 views

Updating cloud-init on Azure Scale Set with ARM

I have an ARM template that deployes a scaleset to Azure and creates configuration files and runs a docker container via cloud-init. All this works file and we have Azure DevOps running the template ...
user avatar
  • 101
0 votes
1 answer
794 views

cloud-init script with jinja template is not being processed with iinja

I have a cloud-init script, that is using jinja templating. It looks like this: ## template: jinja #cloud-config merge_how: - name: list settings: [append] - name: dict settings: [no_replace,...
user avatar
  • 235
1 vote
1 answer
1k views

Cloud-init: Add apt source key gnupg not installed

I've a cloud-init script that is used to create and configure a Debian 10 VM and since I want to install nginx I have to add its repository to APT. I'm trying to do it like this: apt: ...
user avatar
  • 1,046
2 votes
1 answer
1k views

How can I enable epel-release before installing packages with cloud-init?

I'm trying to install a few packages on CentOS 8 via cloud-init, like this: package_upgrade: true packages: - firewalld - htop One of them one of them requires epel-release repo to be installed ...
user avatar
  • 351
0 votes
1 answer
3k views

how to add network configuration to cloud init image to run a kvm image

I'm trying to use CloudInit to spin up VMs in a KVM hypervisor environment. I have downloaded the Ubuntu 18.04 image and created the following config file: #cloud-config package_upgrade: true users:...
user avatar
2 votes
2 answers
2k views

`sudo` commands in cloud-init are SLOW! How to fix?

I am trying to bootstrap a Centos7 EC2 instance (ami-02eac2c0129f6376b) with bash user-data. Because it runs as root and I need to create a lot of things as the centos user, I use sudo -Hu centos <...
user avatar
0 votes
0 answers
269 views

Fedora 30 cloud-init unable to render networking error

I created a Fedora 30 template on Proxmox with KVM virtualization. When I create a VM from template and start it with cloud-init drive configured properly, I get unable to render networking error. ...
user avatar
  • 98
0 votes
1 answer
396 views

Setting up DHCP with CloudInit and Bonding

I currently have a cloud init file that setsup the DHCP via the following: - path: /etc/systemd/system/dhclient@.service content: | [Unit] Description=Run dhclient on %i interface After=...
user avatar
  • 135
0 votes
1 answer
642 views

AWS EC2 instance stuck on cloud-init

Usually my AutoScaling group spawns instances using Launch Configuration pretty normally but today it gets stuck whilst launching a new instance at the [cloud-init] checking scripts ... Image for ...
user avatar
0 votes
1 answer
2k views

set hostname using cloud-init

I recently tried changing an Ubuntu machine hostname. After a reboot, I found the name was reverted to it's previous one. A quick search suggested this was happening because of cloud-init. If I change ...
user avatar
  • 385
2 votes
1 answer
3k views

Set hostname using cloudinit for dhcp server: Systemd overrides cloudinit hostname

For a testing environment, I want to connect multiple VMs using DHCP with their hostnames as DNS entrys. The troubleshooting shows that my DNS/DHCP works. But the VM got registered using ubuntu as ...
user avatar
  • 496
1 vote
1 answer
73 views

Is there a reason for keeping cloud-init after it has run?

As I understand it cloud-init helps initialize a cloud server. But after the cloud server is initialized is there ever any further need to run cloud-init? I would like to remove it if it is no longer ...
user avatar
0 votes
1 answer
208 views

AWS EC2 - Instance works as T2, but not M4 or C4

I'm having a very strange problem with server instance, which I'm trying to upgrade from PV to HVM. I've got through the migration process, and created an AMI. If I launch an instance from this AMI ...
user avatar
0 votes
1 answer
433 views

Disable CoreOS cloudinit

I wanted to try CoreOS for a new vServer. So far I like it but made i fatal mistake: I created it by a cloudinit file instead of the newer ignition method and now on every update reboot it resets my ...
user avatar
3 votes
1 answer
689 views

Why is my ec2 instance sometimes not terminating when I use 'shutdown now'?

I am running a user-data script on startup of an ec2 machine which shuts the machine down after checking the exit status of the last executed command. I confirmed that the last executed command ran ...
user avatar
0 votes
1 answer
192 views

Include cloudinit config to new VM

On my KVM hypervisor I would like to add a new VM with CentOS-7-x86_64-GenericCloud.qcow2 disk but with my custom cloudinit config to make sure that the new VM will start up with all users, correct ...
user avatar
  • 41
5 votes
1 answer
948 views

How do I enable IPv6 on Fedora 28 on Amazon EC2

I can't seem to get IPv6 working in Fedora 28 in Amazon EC2 (so using cloud-init and DHCPv6). It works in RHEL 7 with the configuration described here. Applying the same configuration to Fedora 28 ...
user avatar
6 votes
1 answer
25k views

ubuntu 18.04 network after cloud-init removal

I installed new Ubuntu 18.04 on my home server and i noticed that /etc/network/interfaces file is empty. After searching on internet I found out that version 18.04 uses cloud-init package to init ...
user avatar
2 votes
1 answer
2k views

How to run cloud init modules multiple times, e.g. runcmd, write_files, runcmd

I am using cloud-init to build an Ubuntu 16.04 LTS VM on Azure. The server I want to build will run software installed from a custom repository. I use the runcmd directive to add the repository, ...
user avatar
  • 163