Questions tagged [cloud-init]

The tag has no usage guidance.

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

cloud-init seems incapable of creating swap on a raw partition

cloud-init seems incapable of creating swap on a raw partition. It can create a swap 'file' but when I try a raw device my /dev/sdb1 changes from a device to an actual file. In looking at ALL the ...
0
votes
2answers
81 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 ...
0
votes
0answers
56 views

Openstack Stein metadata access error (not privatekey inserted)

When I tried to access to instance through key, I'm getting error. After some investigations, I found in instance console log, metadata access error. [ 177.256435] cloud-init[1038]: 2020-04-10 21:45:...
0
votes
1answer
25 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-...
0
votes
0answers
35 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 ...
0
votes
1answer
119 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,...
0
votes
0answers
181 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: ...
0
votes
0answers
18 views

why modify config files before purge?

I was want to remove cloud-init and found instructions to enter the following commands and reboot (on a few sites: echo 'datasource_list: [ None ]' | sudo -s tee /etc/cloud/cloud.cfg.d/90_dpkg.cfg ...
0
votes
1answer
227 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 ...
0
votes
1answer
406 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:...
2
votes
2answers
797 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 <...
0
votes
0answers
128 views

cloud-init write_files - Does not write when multiple files are specified

I am trying to write multiple files under 'write_files' but it only seems to write the first file. Folks, any idea/advise why it is failing to write the second file? #cloud-config write_files: ...
0
votes
0answers
148 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. ...
0
votes
0answers
125 views

Cloud-init not generating newssh fingerprint

When connecting to a new machine I get the following shown with putty. However when creating a cloud image for CentOS7 using cloud-init after cloning the machine I do not get this shown for the new ...
0
votes
1answer
68 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=...
0
votes
1answer
221 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 ...
0
votes
1answer
950 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 proved this was happening because of cloud-init. if I change ...
1
vote
1answer
933 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 ...
1
vote
1answer
63 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 ...
0
votes
1answer
100 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 ...
0
votes
1answer
230 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 ...
3
votes
1answer
158 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 ...
0
votes
1answer
112 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 ...
3
votes
1answer
719 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 ...
5
votes
1answer
20k 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 ...
0
votes
1answer
1k 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, ...
2
votes
3answers
1k views

cloud-init can't set up ipv6

I've bought a Public Cloud VPS from OVH and trying to set up ipv6. Also I've found a tutorial on how to set up ipv6 in their documentation. It works until I reboot the VPS. In this tutorial they ...
0
votes
2answers
941 views

Are there any examples of using cloud-init offline (or without cloud hosting)?

Note: This is NOT a Raspberry Pi specific question. It is a Linux System Administration question. Please do not try to have it removed from Server Fault. I see many "Hello, World" level demos that ...
1
vote
1answer
601 views

run cloud-init disk_setup module on every boot

I have an ec2 instance with an ephemeral disk. This instance goes down every night and boots up when needed. I used cloud-init to format the ephemeral disk and this works correct but only once. when ...
0
votes
1answer
3k views

Cloud-growpart what am I doing wrong with partitioning

I'm preparing a Centos7.4 cloud image and I have install cloud-init cloud-utils and cloud-growpart. When I import into Openstack as a qcow2 image it doesn't resize my root if I create an instance ...
0
votes
1answer
3k views

Centos Atomic 7 cloud-init static network configuration NO DEFAULT GATEWAY

I downloaded CentOS Atomic Host from here and installed in VirtualBox VM with Bridged adapter as the network adapter. Default installation and I only setup root password and nothing else. Then I ...
1
vote
1answer
2k views

Azure - cloud-init error, No instance datasource found

I am trying to run a Ubuntu Linux VM from the custom VHD I prepared. I provision the VM but seems there is some issue with the Vm agent and cloud-init. Host name/ DNS is not set on boot Cloud-init ...
2
votes
2answers
7k views

Cloud-init not finding metadata server (Openstack)

I am trying to understand why my server is failing to connect to the metadata server (and thus not able to log in with the SSH key). Similar problems online seem to be caused by Security Group ...
1
vote
0answers
257 views

Cloud-init local stage on FreeBSD

I have installed cloud-init on FreeBSD, from the pkg repository. FreeBSD is running on oVirt, using the config-drive datasource. I use it to set a different hostname of the machine on boot. My ...
4
votes
5answers
3k views

How do I enable IPv6 in RHEL 7.4 on Amazon EC2

Amazon provides instructions on how to enable IPv6 on RHEL 7 and Centos 7: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-migrate-ipv6.html#ipv6-dhcpv6-rhel These instructions work on RHEL ...
0
votes
1answer
555 views

Can cloud-init be forced to retrieve metadata and userdata on every boot?

My understanding is that the intended way of cloud-init working is that it retrieves metadata and userdata once per instance. Can this be changed so that cloud-init retrieves data on every boot? I ...
0
votes
1answer
470 views

Network errors when running `apt-get update` in cloud-init script

Yesterday I set up my first Autoscaling Group in AWS. I wrote a cloud-init/userdata script to install my application and I tested it ~40 times without any errors. Just before I went home it suddenly ...
0
votes
1answer
1k views

AWS Userdata script in Cloud Init not running

While trying to use the AWS userdata option to run a script on instance boot, I noticed that some times (Not always) the cloud init part gets stuck somewhere in the middle and does not reach the part ...
3
votes
1answer
1k views

How do I attach, format and mount a volume on boot in ecs?

I want my persistence (ebs) volume to be separate from my auto-scaling group launch configuration. So that it won't be accidentally auto deleted by terraform, or something. Also I may do something ...
1
vote
2answers
2k views

Cloud-init is failing to execute awscli command in User Data

Need help to fix the error and enable the instance to run issue free User Data script. Issue: cloud-init is unable to execute awscli command. I have mentioned a custom script (which will be present ...
0
votes
1answer
248 views

coreos etcd config using ignition

I'm trying to boot coreos on my private cloud using pxe boot using coreos official document. The process requires ignition file for cloud config, but I can't find a way to set some configuration tags ...
1
vote
1answer
1k views

How do I set the hostname of an AWS Lightsail VM?

Reviewing cloudinit configs on my new Lightsail VM, it seems to be talking to a metadata API for settings like hostname. I don't see any lightsail UI component to set the hostname, but if I poke at ...
1
vote
0answers
436 views

What is the difference between “cloud-init.log” and “cloud-init-output.log”?

I noticed in my EC2 instances (spun up by CloudFormation) that a cloud-init.log and a cloud-init-output.log file exists on /var/log. What is the difference between the two? Are they the output of the ...
1
vote
1answer
969 views

Cloud-init fails on 'ssh-authkey-fingerprints' module

I'm trying to pick up on Puppet a bit, however, I'm having trouble simply bootstrapping containers (not even to bootstrapping them with the puppet information). In my cloud-init yaml file I've defined ...
-1
votes
1answer
234 views

ubuntu // running an ssh command as a specific user

I'm looking to add github to known_hosts for the deploy user when the command is ran by the root user. The command would be : ssh -T -o "StrictHostKeyChecking no" git@github.com Using cloudinit, it ...
1
vote
1answer
1k views

EC2 userdata not running with custom per-boot cloud-init script

I'm trying to start a process at boot on a Ubuntu 14 LTS AMI (ami-3bdd502c) using cloud-init's per-boot script facility and configure that process with EC2 userdata. The process has sensible defaults ...
21
votes
3answers
24k views

How to make EC2 user data script run again on startup?

After cloud-init runs a user data script on the first boot of an EC2 instance, a state file is presumably written so that cloud-init won't run the script again on subsequent reboots. There are cases ...
1
vote
0answers
3k views

Trouble with cloud-init user-data on Ubuntu on vSphere

I feel like I must be missing something obvious here. So I'm hoping someone can tell me why I'm being dumb before I try to submit an official bug report. I recently downloaded the OVA version of the ...
1
vote
1answer
1k views

Proxy settings at/prior to cloud-init runtime

Instances launched into our VPC in EC2 require HTTP_PROXY and partners to be set to access anything located outside the VPC. Now I've run into a problem (using data pipeline) where I have no control ...
2
votes
1answer
4k views

How can a cloud-config script copy a file to a server?

How can a cloud-config script copy a file to a server? write_files requires the file content in the script. How can I specify an external file that contains the content?