Questions tagged [cloud-init]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
78 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-...
0
votes
1answer
85 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 ...
1
vote
1answer
442 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=...
0
votes
0answers
22 views

Inserting ssh-keys into VM so that code can be pulled from git

I am deploying a new VM using az cli and cloud init. I am pushing the a secret into VM using "az vm secret". Now I have some code in the git, which I want new VM to pull whenever it is ...
0
votes
0answers
16 views

Disallow ec2 ssh key-pair login but allow a special ssh key to login

I have a use case that my product image only allow a specific ssh keypair (not distribute to customer, only support team has the keypair) to ssh to a VM. The AMI image is built by packer. Is it ...
1
vote
1answer
54 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....
0
votes
1answer
37 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: - ...
0
votes
0answers
16 views

Deploy new VM from template with Cloud-init request on Config server

So I try to figure out how I can deploy a VM from template (any OS in the end, but lets say Ubuntu for now) with cloud-init configured on it. The network interfaces get configured by vmware DHCP, and ...
1
vote
1answer
223 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 ...
1
vote
0answers
173 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 ...
0
votes
0answers
16 views

Run knife from CloudInit to resize VMware disk

First I admit - I am new to Chef. I have used Ansible and somewhat Salt. Original task: Add additional VM disk of required size within VMware and then format it within OS when new Rancher node starts. ...
1
vote
0answers
87 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/...
2
votes
0answers
682 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 ...
1
vote
2answers
516 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 ...
0
votes
0answers
75 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 ...
0
votes
0answers
25 views

Set Ubuntu login credential from Openstack Horizon dashboard

I am trying to create password for Ubuntu Instance I want to use Horizon dashboard to initiate Ubuntu credential. Using focal-server-cloudimg-amd64 Tried using the below in Horizon Customization ...
0
votes
0answers
106 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 ...
3
votes
2answers
10k 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
1answer
130 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
1answer
195 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
435 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
426 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: ...
2
votes
1answer
722 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
2k 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
1k 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
222 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
1answer
135 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
411 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
1k 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 ...
2
votes
1answer
2k 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
66 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
142 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
304 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
359 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
147 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 ...
5
votes
1answer
830 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 ...
6
votes
1answer
24k 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 ...
1
vote
1answer
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, ...
2
votes
3answers
2k 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
1k 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
791 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
4k 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
4k 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
3k 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
8k 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
320 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
593 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 ...
1
vote
1answer
773 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 ...