cloud-init
is absolute cancer. Its code is horrible. It has no documentation at all.
It took me 5 fucking hours to figure out how to properly configure networking on recent
cloud-init
(Ubuntu 16.04 cloud image
) with local datasource.
It's not mentioned anywhere you need to provide dsmode: local
. (but only if you need network-config,
besides that everything is fine; someone below noted that -m
flag does the same thing, good to know) Of course nobody needs documentation for network-config
format
either. (cloudinit/net/__init__.py
is a protip, enjoy the feces dive)
Oh, and by the way - no, it's not possible to provide network-config
to uvt-kvm
without patching shit.
Use -N
flag for cloud-localds for network-config
.
I am using Ubuntu 16.04 server on a Raspberry Pi from here, I believe the cloud-init configuration is keeping a lot of my network configs from working such as creating a VLAN interface.
Just a note that I do have the kernel module for 802.1q loaded.
Everything works fine if I manually configure the VLAN interfaces after boot:
networking.service fails if I configure the interface in /etc/network/interfaces.d/10-eth0.cfg:
So my question is where should I change the meta-data and user-data files or add the network-config file?
There are multiple files in the /var/lib/cloud/ directory:
and in /etc/cloud:
Thank you in advance for any advice or help, sorry for such a long post, I wanted to make sure I shared as much information as possible.
Regards,
Shawn