X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=qm-cloud-init.adoc;h=895db9ff197eb1e1e3ac74e8d1cb013d9b9b82b9;hb=921926036a9bb3824833ca705e68a45a66f38f09;hp=23750daafe53f1addfea6881a5bc793315d37677;hpb=1ff5e4e80ebfdab700d14abbe18da65cbdbb147a;p=pve-docs.git diff --git a/qm-cloud-init.adoc b/qm-cloud-init.adoc index 23750da..895db9f 100644 --- a/qm-cloud-init.adoc +++ b/qm-cloud-init.adoc @@ -126,11 +126,47 @@ qm set 123 --ipconfig0 ip=10.0.10.123/24,gw=10.0.10.1 ---- You can also configure all the Cloud-Init options using a single command -only. We have simply splitted the above example to separate the +only. We have simply split the above example to separate the commands for reducing the line length. Also make sure to adopt the IP setup for your specific environment. +Custom Cloud-Init Configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Cloud-Init integration also allows custom config files to be used instead +of the automatically generated configs. This is done via the `cicustom` +option on the command line: + +---- +qm set 9000 --cicustom "user=,network=,meta=" +---- + +The custom config files have to be on a storage that supports snippets and have +to be available on all nodes the VM is going to be migrated to. Otherwise the +VM won't be able to start. +For example: + +---- +qm set 9000 --cicustom "user=local:snippets/userconfig.yaml" +---- + +There are three kinds of configs for Cloud-Init. The first one is the `user` +config as seen in the example above. The second is the `network` config and +the third the `meta` config. They can all be specified together or mixed +and matched however needed. +The automatically generated config will be used for any that don't have a +custom config file specified. + +The generated config can be dumped to serve as a base for custom configs: + +---- +qm cloudinit dump 9000 user +---- + +The same command exists for `network` and `meta`. + + Cloud-Init specific Options ~~~~~~~~~~~~~~~~~~~~~~~~~~~