Questions tagged [cloud-init]

117 questions
30
votes
4 answers

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 where I'd like to delete this state file so that…
Mike Conigliaro
  • 3,105
  • 2
  • 24
  • 24
11
votes
1 answer

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 permissions. Sometimes, the CLI will fail with the error…
10
votes
7 answers

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 I would like to create a swap using existing VM…
bitinn
  • 331
  • 1
  • 3
  • 12
6
votes
1 answer

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 networking and other stuff. I removed cloud-init…
Richardds
  • 63
  • 1
  • 1
  • 6
6
votes
1 answer

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 initialization of the virtual machine. write_files has…
Guss
  • 2,520
  • 5
  • 32
  • 55
6
votes
1 answer

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.readthedocs.org and AWS. Does there exist a functional…
Graham Leggett
  • 208
  • 2
  • 10
6
votes
1 answer

cloud-init does not grow the partition nor the filesystem

I am currenty preparing OpenStack-ready images of CentOS 7 and Ubuntu 14.04. For the "automation" I use Packer, which is provided by you with a JSON-template. Packer then starts the installation using the virtualization you specify (in my case…
Korni22
  • 61
  • 1
  • 3
5
votes
1 answer

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 doesn't seem to do anything. In particular,…
5
votes
2 answers

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?
Derek Mahar
  • 801
  • 2
  • 8
  • 15
5
votes
2 answers

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/ec2-user/woot1.txt pushd…
Tom Slee
  • 181
  • 1
  • 6
4
votes
5 answers

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 7-7.3 and Centos 7-7.3, but do not work on RHEL…
4
votes
1 answer

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:51:02 +0000. Up 1415.24 seconds. [ 1415.294047]…
4
votes
1 answer

Simple dynamic user_data service for cloud-config in CoreOS?

The way I am currently running a CoreOS cluster in a VMWare ESXi environment has been to use an ISO mounted in vCenter as described by this blog post... http://www.chrismoos.com/2014/05/28/coreos-with-cloud-config-on-vmware-esxi However with that…
azurewraith
  • 161
  • 1
  • 4
4
votes
3 answers

How to set sysctl variables at CoreOS cloud-init?

I'm looking for a way to set CoreOS sysctl settings during its cloud-init stage. The CoreOS version of cloud-init only allows for a handful of configuration directives and is not the same as the regular cloud-init. For example, there is no runcmd…
Andy Shinn
  • 4,131
  • 8
  • 38
  • 55
4
votes
4 answers

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 upon the first start-up the boot gets hung-up on […
1
2 3 4 5 6 7 8