cloud-init and Buster generic image network problem

ctr

Member
Dec 21, 2019
27
12
8
54
Did anyone try Buster cloud images (specifically the generic image) with Proxmox and cloud-init yet?
I tried with both nocloud and configdrive but can't get the network settings to apply.
The cloud-init template seems to assume net0 is eth0, but it is changed to ens18.
But even if I replace eth0 with ens18 in '/etc/network/interfaces.d/50-cloud-init.cfg' the network is not usable as automatically created per-interface files in
/run/network/interfaces.d seem to take precedence.

I can also not see the name server or search domain to be configured.


Other aspects (password, hostname, ssh-key, etc-hosts) of the cloud-init seem to work fine.

Seems to be related to: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931173
 
Last edited:
  • Like
Reactions: akv
this fixes the reslove.conf problem for the DNS

On the other proble that is werid mine get renamed as eth0 eth1 etc



Install resolvconf
apt-get install resolvconf
systemctl enable resolvconf

Make sure systemd-resolved is disabled
systemctl status systemd-resolved
systemctl disable systemd-resolved
systemctl mask systemd-resolved
 
I can see the rename to eth0 using "nocloud" citype, but not when using configdrive

But even with nocloud, the interface IP is not applied to eth0 as /etc/network/interfaces.d/50-cloud-init.cfg is never read. The "." in .cfg seems to be an invalid character in included files. However, this is most likely a cloud-init issue and has nothing to do with proxmox.
 
Did anyone try Buster cloud images (specifically the generic image) with Proxmox and cloud-init yet?
I tried with both nocloud and configdrive but can't get the network settings to apply.
The cloud-init template seems to assume net0 is eth0, but it is changed to ens18.
But even if I replace eth0 with ens18 in '/etc/network/interfaces.d/50-cloud-init.cfg' the network is not usable as automatically created per-interface files in
/run/network/interfaces.d seem to take precedence.

I can also not see the name server or search domain to be configured.


Other aspects (password, hostname, ssh-key, etc-hosts) of the cloud-init seem to work fine.

Seems to be related to: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931173

Hi

I have the same issue. Is it already fixed?
 
Unfortunately not. They are not accepting my PR (backporting the fix for this known issue), because there is already a PR for a newer cloud-init version in Debian. But that has not been applied for various reasons... it's a mess
 
sad. openstask images seem to work, but only with i440fx, if I change it on q35, the network will not rise.
 
am finding something similar with Ubuntu Bionic 18.04.4, although even with i440fx, the network will not come up.
This, is when providing an ENI, Netplan v1 and v2 network config. Each of which plumbed into the configdrive via

qm set 871 --cicustom user=fs:snippets/330-k8s-worker-gpu-0-CI_USER.yaml,network=fs:snippets/330-k8s-worker-gpu-0-CI_NETWORK.yaml

The user config data works (as does DHCP), which lets me login by terminal. I can then test, by manually insert a 01-netplan.yaml.
 
UPDATE:
Successfully had the network settings to applied with the latest Ubuntu Bionic 18.04.4 and OVMF (UEFI)

Through some trial and error I can confirm this is not a problem, although the network.yaml is a finicky, and when one changes the BIOS type, the udev rules rename the interface differently.

I have NOT been able to use OVMF/i440fs, but have had success with OVMF/q35.

My Proxmox setup required, when using;
- SeaBIOS/i440fs, a network interface called ens18
- OVMF/q35, a network interface called enp6s18
 
Did anyone try Buster cloud images (specifically the generic image) with Proxmox and cloud-init yet?
I tried with both nocloud and configdrive but can't get the network settings to apply.
The cloud-init template seems to assume net0 is eth0, but it is changed to ens18.
But even if I replace eth0 with ens18 in '/etc/network/interfaces.d/50-cloud-init.cfg' the network is not usable as automatically created per-interface files in
/run/network/interfaces.d seem to take precedence.

I can also not see the name server or search domain to be configured.


Other aspects (password, hostname, ssh-key, etc-hosts) of the cloud-init seem to work fine.

Seems to be related to: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931173
Alternatively, you could add the following to your template's grub.cfg:

GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

Then the interfaces will come up as eth0 etc..
 
I will stick to that also but my problem is a mention here
https://www.toptal.com/developers/hastebin/unuwaligaf.yaml

Code:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:1e:67:01:10:01 brd ff:ff:ff:ff:ff:ff
    altname enp0s18
    altname ens18
    inet 10.0.10.1/24 brd 10.0.10.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet 10.0.10.241/24 brd 10.0.10.255 scope global secondary dynamic ens18
       valid_lft 346sec preferred_lft 346sec
    inet6 fe80::21e:67ff:fe01:1001/64 scope link
       valid_lft forever preferred_lft forever


$ cat /etc/network/interfaces
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

# Cloud images dynamically generate config fragments for newly
# attached interfaces. See /etc/udev/rules.d/75-cloud-ifupdown.rules
# and /etc/network/cloud-ifupdown-helper. Dynamically generated
# configuration fragments are stored in /run:
source-directory /run/network/interfaces.d


root@srv-app-1:/etc/cloud# cat /etc/network/interfaces.d/50-cloud-init /run/network/interfaces.d/ens18
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
auto lo
iface lo inet loopback
    dns-nameservers 10.0.1.1 1.1.1.1
    dns-search hw.sonic

auto eth0
iface eth0 inet static
    address 10.0.10.1/24
    gateway 10.0.10.254

auto ens18
allow-hotplug ens18

iface ens18 inet dhcp

Constantly ens18 add itself and can't say why :/
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!