2

I'm trying to locate the configuration files netplan creates on the back end (depending on the renderer used). Example:

network:
  version: 2
  renderer: **networkd**
  ethernets:
   ens160:
     dhcp4: no
     addresses: [10.11.12.197/24]
     gateway4: 10.11.12.1
     nameservers:
      search: [domain]
      addresses: [10.11.11.200]

So I'm using networkd as the renderer and the manual for systemd.networkd says:

http://manpages.ubuntu.com/manpages/bionic/man8/systemd-networkd.service.8.html

CONFIGURATION FILES

The configuration files are read from the files located in the system network directory /lib/systemd/network, the volatile runtime network directory /run/systemd/network and the local administration network directory /etc/systemd/network.

So, I thought I would find the changes Netplan made to networkd in those configuration files but I don't see it. Where can I see the changes Netplan makes to systemd-networkd? Am I not understanding what Netplan does correctly?

Thank you.

3
  • Hmm. Please let me know if I need to reword this question. Jul 17, 2018 at 0:27
  • Do you not see any config files under /run/systemd/network? For instance, in a default lxd container, I see /run/systemd/network/10-netplan-eth0.network which is the generated file containing the networkd configuration for eth0.
    – slangasek
    Jul 17, 2018 at 2:26
  • The file was created in /run/systemd/network. Thus /etc/netplan/01-netcfg.yaml gave birth to /run/systemd/network/10-netplan-eno1.network through Netplan. Mar 13, 2019 at 15:57

1 Answer 1

0

From my recent attempt trying to read these too and make sense of it all, and testing out simple configurations, it appears the changes I make to /etc/netplan/50-cloud-init.yaml will be rendered to /run/systemd/network .

I am unsure why it uses 50-cloud-init.yaml, though. The servers we work on are VMs on top of Hyper-V installed from the Ubuntu Server ISO disc. According to https://ubuntu.com/blog/ubuntu-bionic-netplan it should have originated from /etc/netplan/01-netcfg.yaml. Perhaps Ubuntu can look deep enough and realise it's opreating on a hypervisor and thus assume a "cloud" configuration.

3
  • Hi from the future. Just wanted to mention cloud-init is used on non-cloud instances, even though it's named as such. You can think of cloud-init as just being the provisioning/initialization scripts that Ubuntu runs
    – Rino Bino
    Sep 30, 2022 at 19:03
  • @RinoBino but why call it cloud-init?
    – icelava
    Oct 18, 2022 at 10:07
  • You would need to ask Canonical why they named it that way. I agree it's a confusing name.
    – Rino Bino
    Oct 20, 2022 at 16:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .