5

Just did a sudo netplan generate to add a new yaml file. It was not created. Even doing it as root it failed.

forge@app-webserver-1:~$ sudo netplan generate
[sudo] password for forge: 
forge@app-webserver-1:~$ cd /etc/netplan/
forge@app-webserver-1:/etc/netplan$ ll
total 16
drwxr-xr-x   2 root root  4096 May  8 19:33 ./
drwxr-xr-x 108 root root 12288 Jun 27 06:22 ../

forge@app-webserver-1:/etc/netplan$ sudo su
root@app-webserver-1:/etc/netplan# ll
total 16
drwxr-xr-x   2 root root  4096 May  8 19:33 ./
drwxr-xr-x 108 root root 12288 Jun 27 06:22 ../

I did this as I need to add a static ipv6 address as with current dhcp setup ipv address cannot be reached. On another Ubuntu 18.0.4 box it was there, but not on this one. Perhaps because this was an upgrade from 16.0.4. I am not certain.

How can I troubleshoot this netplan issue?

1 Answer 1

2
$ netplan --help
usage: /usr/sbin/netplan  [-h] [--debug]  ...
[...]
    generate  Generate backend specific configuration files from
              /etc/netplan/*.yaml

The netplan generate command does not generate netplan config. It generates config for the backends using the netplan config you have already provided in /etc/netplan/*.yaml.

1
  • note it generates the config files into /run, e.g. /run/systemd/network/. Dec 14, 2023 at 5:50

You must log in to answer this question.

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