How to upgrade a VM based on cloud-init image?

Should it be automatically upgraded at startup or something?
It completely depends on what your cloud-init file contains. The one that is generated by PVE contains the following line:
Code:
package_upgrade: true

This instructs the cloud-init to run OS dependent process to upgrade packages.

If you are using built-in cloudinit, you can examine it with:
Code:
qm cloudinit dump 102 user


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
It completely depends on what your cloud-init file contains. The one that is generated by PVE contains the following line:
Code:
package_upgrade: true

This instructs the cloud-init to run OS dependent process to upgrade packages.

If you are using built-in cloudinit, you can examine it with:
Code:
qm cloudinit dump 102 user


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
Running qm cloudinit dump 102 user says that package_upgrade is set to true. However, if I reboot, the packages won't upgrade.

Furthermore, Ubuntu 22.04 now delivers Kubernetes v1.26.0 while I need to run the v1.24.9. How can I downgrade it?
 
some things in cloud-init only work on first boot.

How to downgrade VM packages is something completely separate from PVE installation and configuration. Once you figure out the command sequence, you can add it to cloud-init.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
That's my question: how can I edit the cloud-init file generated by Proxmox in order to run my command sequence?
 
That's my question: how can I edit the cloud-init file generated by Proxmox in order to run my command sequence?
You cant.
Anything beyond what is offered in GUI requires you to use cicustom and provide a full desired cloud-init file.
"man qm" for more information.


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

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!