I'm currently trying to create a pve template for Ubuntu 20.04, I've managed to get everything working apart from that I can't seem to extend my netplan config (which adds keys that make networking work as a whole)
I've tried the following:
Attempted to use write_files to add an additional file called 60-routes.yaml - Issue: the config is only applied if I manually run a
netplan apply
after logging into SSH after cloud-init finishes. Here is my write_files config.Including the above, I tried to use both runcmd & bootcmd (seperately) to apply the new config file. Issue: These commands seem to run before the write_files is executed, as my network still only works after manually applying as aforementioned.
Here is the additional netplan config I'm trying to add, where "HIDDEN" is replaced with values that I can confirm work:
network:
version: 2
ethernets:
eth0:
gateway4: HIDDEN
routes:
- to: 0.0.0.0/0
via: HIDDEN
on-link: true
If anyone can guide me in the correct direction on how to extend cloud-init's netplan config I'd greatly appreciate it, thanks!
I'm sure you've already tried this, so I don't think I can help you.
This code works fine for me.