Have you ever had issues for configuring network with Cloud-Init on Debian Cloud + Proxmox ? More specifically, cloud-init seemingly not taking into account any of your network configuration ? Then I have a quick solution for you !

The issue

Symptoms

On this specific stack:

  • Proxmox VE
  • Debian 12 "Generic Cloud" image
  • Cloud-Init enabled on PVE

It is apparently not possible to configure a fixed IPv4 with Cloud-Init. The VM will boot but will use cloud-init defaults, which is dynamic IPv4.

Causes

The specific issue is that the "cloud" kernel image does not have the necessary drivers for the IDE drive on which there is the Cloud-Init ISO generated by Proxmox VE. Because of this, the network configuration phase cannot proceed and will use the defaults.

How to solve it

We'll need to replace our "cloud" linux images with a generic one, which has the necessary drivers. To do this, enter the following commands:

sudo apt-get install linux-image-amd64
sudo apt-get autoremove linux-image-*-cloud-amd64 linux-image-cloud-amd64

If prompted for confirmation, answer yes. Then reboot the VM immediately afterwards.

Article précédent