Hi.
We were using Debian11 for our VM in Proxmox and we always used cloud-init to configure Netplan. We are now trying to create a new base VM using Debian12 but something doesn't work. We are using networkd, but when I reboot there's a failure in network configuration.
Here is what I've done:
I enabled the cloud-init service with:
With Debian11 we used to give the configuration in a file that we called 01_networkd.cfg in the /etc/cloud/cloud.cfg.d/ folder, with a syntax that I found was a little deprecated, so I tried to adapt the config with the new standard and it's this:
Then I found that Netplan needed openswitch to be installed, so I've done it and then I enabled and applied Netplan configuration:
I disabled the networking service, in order to use networkd:
But when I reboot cloud-init gives an error:
Using the Proxmox Console I can see that there's no yaml file in /etc/netplan, so the problem is this: cloud-init doesn't create the network configuration file for Netplan from the config file that I give it.
Any idea? There's something missing or wrong in the syntax?
Thank you.
We were using Debian11 for our VM in Proxmox and we always used cloud-init to configure Netplan. We are now trying to create a new base VM using Debian12 but something doesn't work. We are using networkd, but when I reboot there's a failure in network configuration.
Here is what I've done:
I enabled the cloud-init service with:
systemctl enable cloud-init
With Debian11 we used to give the configuration in a file that we called 01_networkd.cfg in the /etc/cloud/cloud.cfg.d/ folder, with a syntax that I found was a little deprecated, so I tried to adapt the config with the new standard and it's this:
Bash:
network:
version: 2
renderer: networkd
ethernets:
eth0:
addresses:
- 10.10.0.86/16
dhcp4: false
nameservers:
search: [our_network.priv]
routes:
- to: default
via: 10.10.0.1
Then I found that Netplan needed openswitch to be installed, so I've done it and then I enabled and applied Netplan configuration:
Bash:
echo 'ENABLED=1' > /etc/default/netplan
netplan apply
I disabled the networking service, in order to use networkd:
Bash:
systemctl disable networking; systemctl mask networking
mv /etc/network/{interfaces,interfaces.save}
systemctl enable systemd-networkd
But when I reboot cloud-init gives an error:
Bash:
[FAILED] Failed to start systemd-networkd-wait-online.service - Wait for Network to be Configured.
Using the Proxmox Console I can see that there's no yaml file in /etc/netplan, so the problem is this: cloud-init doesn't create the network configuration file for Netplan from the config file that I give it.
Any idea? There's something missing or wrong in the syntax?
Thank you.