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
.
+1111 on the cancer. Just wasted 2 hours of my life on this, even following all the tips above still nothing. Giving up and fucking consoling in to set a static IP the manual way.
Fuck it this shit works in AWS / Azure and even good old Kickstart and I'm not a fucking KVM admin thank fucking God
EDIT aaaaaand the issue was... drumroll.... completely remove and purge cloud-init from a baseline ubuntu 18.04 server iso, re-install the package, and then it works. So whatever it shipped with is borked (for networking only, my user-data went fine which was so frustrating). Got it from another comment somewhere!