Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cloud-init]

The tag has no usage guidance.

1
vote
0answers
24 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
26 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
101 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 ...
1
vote
1answer
6k 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
0answers
122 views

cloud-config unable to install kubernetes debian repository

I've got a basic cloud-config user-data script that simply installs the Kubernetes repositories on raspbian (hypriot), however, apt-get update seems to fail due to certificate issues. The thing that ...
0
votes
1answer
341 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
2answers
552 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
219 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
0answers
234 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
1k 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
2k 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
1k 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
2k 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
138 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 ...
2
votes
4answers
1k 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
336 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
230 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
642 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
845 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
1k 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
205 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
726 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
256 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 ...
0
votes
1answer
593 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
127 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 ...
0
votes
0answers
139 views

Ubuntu Cloud image 14.04 (Trusty Tahr) only has one network interface (eth0)

i'm really new in the cloud world so i need some help because after several day surfing the internet i didn't find anything.. I launch a VM with kvm using this image: cloud-images.ubuntu.com/server/...
0
votes
0answers
876 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 ...
13
votes
2answers
12k 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 ...
0
votes
0answers
2k 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
717 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 ...
0
votes
1answer
2k 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?
4
votes
1answer
1k views

Boot error on cloud-init

After a reboot my instance is not connected to the network, connecting to serial port i can see the error: [ 1415.293774] cloud-init[31802]: Cloud-init v. 0.7.7 running 'init' at Tue, 28 Jun 2016 09:...
1
vote
1answer
996 views

How to execute some commands before the user scripts in cloud-init

I'm trying to run some scripts and config using a multipart config. Content-Type: multipart/mixed; boundary="MIMEBOUNDARY" MIME-Version: 1.0 --MIMEBOUNDARY Content-Disposition: attachment; filename="...
0
votes
1answer
122 views

How to configure apache via cloud-config?

We have a cloud-config script to do some work on a server right after creation. (Digital Ocean droplet) I want the script to modify the default behavior for apache, setting the AllowOverride to All (...
1
vote
1answer
348 views

SSH fails on CoreOS when substituting etcd cloud-config variables

I have a minimal cloud-config that works without problems on DigitalOcean. I added some hardening for SSH, which requires restarting sshd.socket to become effective: units: - name: sshd.socket ...
0
votes
1answer
377 views

Reboot after specified time in cloud-init, only once

This is on a CentOS 7 AWS image built off the official AMI The power_state module is exactly what I need, looking at this http://cloudinit.readthedocs.org/en/latest/topics/examples.html#reboot-...
2
votes
1answer
706 views

cloud-init does not insert instance level ssh keys in gce

I am passing (YAML representation) metadata: items: - key: sshKeys value: root:ssh-rsa AAAAB... non@nan when creating a gcloud instance. But I cannot ssh to the instance $ ssh 139.242.197.104....
0
votes
1answer
491 views

Can cloud-config's write_files control whether a newline is appended to the file?

I'd like to use cloud-config in user-data on AWS to write a file, say /etc/myfile. My experimentation so far seems to suggest that if the write_files block is the last bit of the user-data, then no ...
4
votes
1answer
575 views

cloud-init module order is wrong, how to fix?

I'm using cloud-init to setup AWS EC2 machines running Ubuntu 14.04. One of the more useful features of cloud-init is the write_files module that allows me to install additional files during the ...
1
vote
1answer
219 views

Cloud-config resize filesystem fails

So, my adventure started like this: I had an OpenSUSE 13.1 VM, and I wanted to upgrade to 13.2, so one of the main differences between the 2 community amis (13.1 - `` and 13.2 -ami-3a6cc64d) was that ...
1
vote
0answers
2k views

Error installing cloud-init and cloud-utils package

I have a rhel 6.6 box with python 2.6 installed on it. I have configured epel repo. Now when i do a "yum install -y cloud-utils cloud-init parted git", it gives me the following error. --> ...
0
votes
2answers
1k views

CoreOS: Inject a real private IP in etcd2 cloud-config

I have three networks on Rackspace: Public network Service network 10.181.XXX.XXX (they call it a private network sometimes but it is not private per-se, it is datacenter-wide private so their ...
4
votes
1answer
3k views

How do I use cloud-init to configure an AWS EBS volume at first boot?

Cloud-init provides the disk_setup, fs_setup and mounts modules to partition, format and mount a volume to a virtual machine, however these options remain undocumented at both http://cloudinit....
1
vote
0answers
42 views

How do I setup my cloud-init instance to fully conform to that of amazon-ec2 platform?

How do I setup my cloud-init instance to fully conform to that of amazon-ec2 platform? (shown @ http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) We already made the ...
1
vote
1answer
908 views

Disabling cloud-init if metadata server cannot be reached

I'm trying to get cloud-init to not take any action if the metadata server cannot be reached. If cloud-init ignores the error and continues executing (which seems to be the default configuration), ...
9
votes
1answer
6k views

AWS CLI throws “Unable to locate credentials”, the second time it's run

I'm trying to download some files from S3 to an EC2 instance using the AWS CLI (1.8.7) on startup using a User-Data Script. This instance has a IAM Role & Instance Profile with the appropriate ...
3
votes
1answer
1k views

how to disable executing user-data by cloud-init

I am making a new AMI in EC2 and want to disable it running anything that could be put in user-data when launching (or rebooting) from this AMI. I looked at the existing /etc/cloud/cloud.cfg and /etc/...
3
votes
2answers
1k views

Starting a long-running process in cloud-init on ec2 instance

I'm trying and failing to start a long-running command on launch of an EC2 (Amazon Linux). It needs to run under the ec2-user account. This was my first attempt: #!/bin/bash echo 'Woot 1!' > /home/...
0
votes
0answers
244 views

Qcow2 image works with virt-manager, but throws cloud-init error with virt-install

I have CentOS-7-x86_64-GenericCloud-20140929_01.qcow2 image. When i boot it via virt-manager gui, it comes up well. No issues.. But i used virt-install to bring up the same qcow2 image as, virt-...
8
votes
4answers
4k views

How to create a swap for Azure Ubuntu VM?

I have read quite a few posts on this, but I am still unsure about the correct approach, assuming: I have a default Ubuntu 14.04 LTS VM created by and running on Azure, which doesn't come with a swap ...