Cloudinit issues with golden and base templates

TimofeyL

New Member
Sep 30, 2025
7
0
1
Hello.
I started to work with Proxmox some weeks ago and working on POC.
I need to assign ip address for VM deployed from base template.
My steps:
1. Golden template - "golden1"
New VM, deployed from kickstart server with new OS (Oracle Linux 9.4).
Cloud-init installed.
Mounted Cloudinit drive (just qcow2 drive, suggested by Proxmox), but no changes in "Cloud-init" Proxmox webUI.
VM converted to template.
2. Base template - "base1"
Cloned from golden template.
VM hostname inside OS is correct - base1.
DHCP IP, prepared specific application,services and security patches.
No changes in cloudinit. Cloudinit drive already attached.
VM converted to template.
3. Destination VM - "vm1"
Cloned from "base1" template.
I assigned IP in "cloud-init" VM page. No any other cloudinit changes made. Clicked to "Regenerate image".
Result. VM network doesn't start.
eth0 in DOWN state inside OS.
/etc/sysconfig/network-scripts/ifcfg-eth0 - eth0 MAC address not matched to MAC in file, network settings set to dhcp.
hostname in /etc/sysconfig/network = golden1.
VM hostname inside OS is correct = "vm1"
What I did wrong?
 
On Debian based systems the /etc/network/interfaces in the vm should be empty except for the line including files in interfaces.d before conversion to template. Maybe for Oracle Linux a similar condition must be met. I would start the troubleshooting there.

For adding a cloud-init drive use the Add button in the Hardware tab of the vm.
Settings you want to customize which are not included in the cloud-init tab of the pve web gui must be provided via yaml files placed on a storage with snippets content type. These yaml files can't be added via web gui to the vm config but via cli only by using qm command or editing the config file directly.
 
  • Like
Reactions: Johannes S
For adding a cloud-init drive use the Add button in the Hardware tab of the vm.
Yes. Cloud-init drive was added through Hardware page, started from "golden1".

So I suppose that I need to install cloudinit on last steps of "base1" , so it should work for "vm1".
 
  • Like
Reactions: Johannes S
I have one more question.
Does cloudinit support NetworkManager?
I found /etc/sysconfig/network-scripts/ifcfg-eth0 file with text like "This file was generated by cloud-init .. bla-bla-bla" (incorrect config of course).
But OS network is using NetworkManager config.
 
yes: Network configuration outputs

If the file comment says it was generated by CI but it contains prior VM/base/template information, then chances are that CI did not run properly. Keep in mind that some portions of CI are run only once per VM's lifetime. Of course Network should be regenerated on each boot, but we do not know whether you created your image properly.
Thats the benefit of using vendor's prebuilt CI images. Everyone can start at the same point.

Given that you really do have "custom" image, there is no way to help you without diving into the logs, which takes time and effort.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited: