]> git.proxmox.com Git - pve-docs.git/blobdiff - qm-cloud-init.adoc
docs: intro: avoid office@ mail address for sales related questions
[pve-docs.git] / qm-cloud-init.adoc
index cbb60e47076a0d2b40dc1eadcd4b6fc9ae3e13ba..1cebf1487ed4bec9e167358331546516c4cffc29 100644 (file)
@@ -5,7 +5,7 @@ ifdef::wiki[]
 :pve-toplevel:
 endif::wiki[]
 
 :pve-toplevel:
 endif::wiki[]
 
-http://cloudinit.readthedocs.io[Cloud-Init] is the defacto
+https://cloudinit.readthedocs.io[Cloud-Init] is the de facto
 multi-distribution package that handles early initialization of a
 virtual machine instance. Using Cloud-Init, configuration of network
 devices and ssh keys on the hypervisor side is possible. When the VM
 multi-distribution package that handles early initialization of a
 virtual machine instance. Using Cloud-Init, configuration of network
 devices and ssh keys on the hypervisor side is possible. When the VM
@@ -32,7 +32,7 @@ needs to store an encrypted version of that password inside the
 Cloud-Init data.
 
 {pve} generates an ISO image to pass the Cloud-Init data to the VM. For
 Cloud-Init data.
 
 {pve} generates an ISO image to pass the Cloud-Init data to the VM. For
-that purpose all Cloud-Init VMs need to have an assigned CDROM drive.
+that purpose, all Cloud-Init VMs need to have an assigned CD-ROM drive.
 Also many Cloud-Init images assume to have a serial console, so it is
 recommended to add a serial console and use it as display for those VMs.
 
 Also many Cloud-Init images assume to have a serial console, so it is
 recommended to add a serial console and use it as display for those VMs.
 
@@ -70,11 +70,11 @@ qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-1
 NOTE: Ubuntu Cloud-Init images require the `virtio-scsi-pci`
 controller type for SCSI drives.
 
 NOTE: Ubuntu Cloud-Init images require the `virtio-scsi-pci`
 controller type for SCSI drives.
 
-.Add Cloud-Init CDROM drive
+.Add Cloud-Init CD-ROM 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 next step is to configure a CD-ROM drive, which will be used to pass
 the Cloud-Init data to the VM.
 
 ----
 the Cloud-Init data to the VM.
 
 ----
@@ -84,7 +84,7 @@ qm set 9000 --ide2 local-lvm:cloudinit
 To be able to boot directly from the Cloud-Init image, set the
 `bootdisk` parameter to `scsi0`, and restrict BIOS to boot from disk
 only. This will speed up booting, because VM BIOS skips the testing for
 To be able to boot directly from the Cloud-Init image, set the
 `bootdisk` parameter to `scsi0`, and restrict BIOS to boot from disk
 only. This will speed up booting, because VM BIOS skips the testing for
-a bootable CDROM.
+a bootable CD-ROM.
 
 ----
 qm set 9000 --boot c --bootdisk scsi0
 
 ----
 qm set 9000 --boot c --bootdisk scsi0
@@ -109,7 +109,7 @@ qm template 9000
 Deploying Cloud-Init Templates
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Deploying Cloud-Init Templates
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-[thumbnail="gui-cloudinit-config.png"]
+[thumbnail="screenshot/gui-cloudinit-config.png"]
 
 You can easily deploy such a template by cloning:
 
 
 You can easily deploy such a template by cloning:
 
@@ -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
 ----
 
 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.
 
 
 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=<volume>,network=<volume>,meta=<volume>"
+----
+
+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
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Cloud-Init specific Options
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~