cloud-init – How Cloud-Init Queries DHCP During Preseed

cloud-initpreseed

We are running a preseeded Ubuntu installation from disk using ubuntu autoinstall (https://ubuntu.com/server/docs/install/autoinstall)

Since upgrading to 20.04.6, we are facing issues when the cloud-init mechanism detects a DHCP server on the network, which crashes the installation.

Is it possible to disable any networking during cloud-init?

Our grub.cfg looks like this:

menuentry "custom install " {
    set gfxpayload=keep
    linux   /casper/vmlinuz quiet autoinstall ds=nocloud\;s=/cdrom/nocloud/ ---
    initrd  /casper/initrd
}

Best Answer

If you'd like to disable cloud-init networking using the kernel cmdline, add:

network-config=disabled

Documentation for disabling network-config in cloud-init can be found at https://cloudinit.readthedocs.io/en/latest/reference/network-config.html#disabling-network-configuration

Related Topic