Cloud-Init: Wie IPv4 komplett deaktivieren?

Vengance

Well-Known Member
May 21, 2016
270
11
58
33
Hi,

Ich nutze Cloud Init um die Netzwerkkonfiguration meiner Cloud Images zu setzen.
Auf dem Hostsystem läuft ein DHCP Server für die Vergabe der IPv4 Adressen sowie ein Radvd Server für IPv6 SLAAC.

Aufgrund der IPv4 addressknappheit nutze ich viele IPv6 only VMs.

Wenn ich nun in den Cloud Init Einstellungen das IPv4 Feld leer lasse und nur IPv6 auf SLAAC setze hängt die VM beim boot für einige Minuten da keine valide IPv4 Konfiguration hinterlegt ist.

1655664569052.png

Den timeout zu verringern bringt leider nichts, da die VM dennoch weiter versucht eine IP zu bekommen und fällt dann nach einigen Minuten auf DHCP zurück.

TLDR:
Gibt es eine Möglichkeit mittels Cloud-Init IPv4 komplett zu deaktivieren?
Es soll keine Adresse via DHCP bezogen werden und auch nicht auf das Interface beim start gewartet werden.
 
Last edited:
Ok, ich glaube das Problem liegt an anderer Stelle begraben,

Die Netzwerkkonfiguration wird wie gewünscht mit der Option dhcp 0 erstellt.

Code:
# 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

auto eth0
iface eth0 inet6 auto
    dhcp 0


Allerdings taucht nach einigen Minuten ein weiteres Interface auf, "ens18".
Laut ip a Ausgabe ein altname für eth0, auch die MAC ist identisch.
Allerdings bezieht sich das zweite Interface dann via DHCP eine IPv4.

Kann ich das irgendwie unterbinden?


1655665004090.png
 
Die Problematik scheint auch nur unter den Debian cloud images aufzutreten, Ubuntu läuft bisher problemlos
 

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!