X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=qm-cloud-init.adoc;h=97954791a0bcce41f184d35d5e432687fd19023e;hb=5c683f1378826ae38e706d8923f953c7392e1324;hp=9ab98da0be26c997e4831c949b5652a01bc71296;hpb=85d697af2b25de0386dda10d28de545c2e41bf87;p=pve-docs.git diff --git a/qm-cloud-init.adoc b/qm-cloud-init.adoc index 9ab98da..9795479 100644 --- a/qm-cloud-init.adoc +++ b/qm-cloud-init.adoc @@ -38,7 +38,7 @@ recommended to add a serial console and use it as display for those VMs. Preparing Cloud-Init Templates -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The first step is to prepare your VM. Basically you can use any VM. Simply install the Cloud-Init packages inside the VM that you want to @@ -72,7 +72,7 @@ controller type for SCSI drives. .Add Cloud-Init CDROM drive -[thumbnail="gui-cloudinit-hardware.png"] +[thumbnail="screenshot/gui-cloudinit-hardware.png"] The next step is to configure a CDROM drive which will be used to pass the Cloud-Init data to the VM. @@ -107,9 +107,9 @@ qm template 9000 Deploying Cloud-Init Templates -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -[thumbnail="gui-cloudinit-config.png"] +[thumbnail="screenshot/gui-cloudinit-config.png"] You can easily deploy such a template by cloning: @@ -131,7 +131,53 @@ 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ include::qm-cloud-init-opts.adoc[] + + +ifdef::wiki[] + +See Also +~~~~~~~~ + +* link:/wiki/Qemu/KVM_Virtual_Machines[Qemu/KVM Virtual Machines] + +endif::wiki[]