canonical/open-documentation-academy

LXD: configure `cloud-init` from a file

开放

#63 创建于 2024年4月26日

 (6 条评论) (0 个反应) (1 位负责人)Python (99 个派生)auto 404
good first issuehow-tosize 3

仓库指标

星标
 (119 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Documentation: https://documentation.ubuntu.com/lxd/en/latest/ GitHub repo: https://github.com/canonical/lxd Contribution guide: https://documentation.ubuntu.com/lxd/en/latest/contributing/


To run some actions on an instance when it is started for the first time, you can use cloud-init. See How to use cloud-init in the LXD documentation.

The How to configure cloud-init section describes the format needed for the cloud-init configuration options, and how to configure it if you're using the API, but it's missing instructions for how to configure the options through the CLI.

You would usually do this by writing the configuration to a file (for example, cloud-init.yml) and then passing it in:

lxc config set <instance_name> cloud-init.user-data - < ~cloud-init.yml

This information should be added to the page.

贡献者指南