File: disable_cloud_init.rst

package info (click to toggle)
cloud-init 25.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,412 kB
  • sloc: python: 135,894; sh: 3,883; makefile: 141; javascript: 30; xml: 22
file content (48 lines) | stat: -rw-r--r-- 1,289 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.. _disable-Cloud_init:

How to disable cloud-init
*************************

One may wish to disable cloud-init to ensure that it doesn't do anything on
subsequent boots. Some parts of cloud-init may run once per boot otherwise.

There are three cross-platform methods of disabling ``cloud-init``.

Method 1: text file
====================

To disable cloud-init, create the empty file
:file:`/etc/cloud/cloud-init.disabled`. During boot the operating system's init
system will check for the existence of this file. If it exists, cloud-init will
not be started.

Example:

.. code-block::

    $ touch /etc/cloud/cloud-init.disabled

Method 2: kernel command line
=============================

To disable cloud-init, add ``cloud-init=disabled`` to the kernel command line.

Example (using GRUB2 with Ubuntu):

.. code-block::

    $ echo 'GRUB_CMDLINE_LINUX="cloud-init=disabled"' >> /etc/default/grub
    $ grub-mkconfig -o /boot/efi/EFI/ubuntu/grub.cfg

Method 3: environment variable
==============================

To disable cloud-init, pass the environment variable
``KERNEL_CMDLINE=cloud-init=disabled`` into each of cloud-init's
processes.

Example (using systemd):

.. code-block::

    $ echo "DefaultEnvironment=KERNEL_CMDLINE=cloud-init=disabled" >> /etc/systemd/system.conf