cloud-init Network configuration

  • When installing a machine with custom cloud-init configuration, the "custom config" combo box only changes the User Config, the Network config box remains as a list of commented lines. This network config causes problems (on Ubuntu 18.04, cloud-init fails to parse it as a YAML file, causing the whole process to fail). Is there a way to pre-set the value of this box/file?
    Also, is there a way to enforce the usage of cloud-init file with a certain template?

  • XCP-ng Team

    @fohdeesha is the cloud init specialist

    Regarding prefill, you can set your own user config for cloudinit in XO (bottom of the left menu, user icon, then edit your cloudinit personal config)

  • The user config that can be set from the "Settings" menu does not affect the network config file.

  • XCP-ng Team

    Do you mean to say when you edit the network config box, and fill it out with your own network info (adhering to this standard: that cloudinit in the vm gives a yaml error? This indicates the way you filled out the entry box is not properly formatted. Keep in mind to pass networking info, your cloudinit install in your template VM needs to be set to use nocloud data sources, and keep in mind the network configuration passed via cloud-init is added to the template VM, not replaced, so you need to properly configure your template VM to not already have adapters configured with IP addresses etc

Log in to reply

XCP-ng Pro Support