Skip to content

Commit

Permalink
doc: Elaborate on applying configuration on every boot
Browse files Browse the repository at this point in the history
Signed-off-by: hamistao <[email protected]>
  • Loading branch information
hamistao committed Feb 18, 2025
1 parent 78d45b9 commit db761c8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions doc/cloud-init.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,7 @@ See {ref}`cloud-init:merging_user_data` for instructions.
To configure `cloud-init` for an instance, add the corresponding configuration options to a {ref}`profile <profiles>` that the instance uses or directly to the {ref}`instance configuration <instances-configure>`.

When configuring `cloud-init` directly for an instance, keep in mind that `cloud-init` runs only on instance start.
That means any changes to `cloud-init` configuration will only take effect after the next instance start.
Some configuration options only take effect on the first boot of an instance. If `cloud-init` notices that an
instance's `instance-id` has changed, it behaves as if this was the instance's first boot. For more information, see
the [cloud-init docs](https://docs.cloud-init.io/en/latest/explanation/first_boot.html#first-boot-determination)
If you are using the CLI client, create the instance with [`lxc init`](lxc_init.md) instead of [`lxc launch`](lxc_launch.md), and then start it after completing the configuration.
That means any changes to `cloud-init` configuration will only take effect after the next instance start. We make sure `cloud-init` configurations are applied on any boot by changing the instance ID if any configuration keys relevant to `cloud-init` change, as this prompts `cloud-init` to fetch and apply the relevant data from LXD. For more information, see the [cloud-init docs](https://docs.cloud-init.io/en/latest/explanation/first_boot.html#first-boot-determination).

To add your configuration:

Expand Down

0 comments on commit db761c8

Please sign in to comment.