CloudInit disk is not being updated after snippets updates until reboot

hradaideh

New Member
Jun 7, 2022
17
1
3
when I update the cloud-init files under snippets, the updates are not being reflected live on the VM's volume /dev/sr0 (they used to be updated live)

I am using the latest PvE with the latest Debian
 
The sr0 is a representation of a "cdrom", ie static ISO image. When you update something related to cloud-init, the ISO will not be "edited". It needs to be completely re-generated. There is a "regenerate" button in UI that can force that. However it doesnt mean the ISO will be remounted live to a running VM. Besides that, the cloud-init ISO is only read on boot and some portions are only executed once on initial boot of the VM.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
The sr0 is a representation of a "cdrom", ie static ISO image. When you update something related to cloud-init, the ISO will not be "edited". It needs to be completely re-generated. There is a "regenerate" button in UI that can force that. However it doesnt mean the ISO will be remounted live to a running VM. Besides that, the cloud-init ISO is only read on boot and some portions are only executed once on initial boot of the VM.


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

I know it is a cdrom
I am provisioning them using terraform btw

When i modify the network or the disks along side any of the cpu or the memory, the cloud init modification takes place live.

But modifying them without cpu or memory doesn't take place until i shutdown the vm and start it up again.

I think the terraform or proxmox itself doesn't regenerate cloud init volume after network or disk changes
 
Sounds like there are a few moving pieces involved:
- custom cloud-init files?
- 3rd party management framework
- custom procedure for changes

The best approach to determine if the PVE behavior is inconsistent in how some changes are applied is to narrow it down to repeatable steps that can be run by anyone and not just in your specific environment. For example, if terraform is using API - create a pvesh driven process that showcases what you expect and what doesnt work.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
create a pvesh driven process that showcases what you expect and what doesnt work.
sounds logical, I'll try to do that
I am suspecting the terraform module too, is this the right place to issue an inquiry for the terraform provider or here
 
modifying just the snippet file won't ever recreate the ISO/cloudinit imge - PVE doesn't monitor the snippets file in any way. it's possible that when combined with other changes that trigger a hotplug action, a regeneration is triggered which "accidentally" picks up the changes done in the meantime.
 

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!