How to disable the "ciupgrade" option

Lotan81

New Member
Dec 6, 2022
8
0
1
Hi, I want to work with Proxmox via API calls.
I want to disable the "ciupgrade" option for each VM that I create during the cloud-init step, before starting the VM (to disable the option to do an automatic package upgrade after the first boot).
I use an API token, with an "admin" permission - and when I try to send an API call to configure the VM I get a response: "500 only root can set 'ciupgrade' config".
How can I fix this error?
Thanks
 
Last edited:
Thank you for your quick response!
1. How can we get this patch? do we need to wait for your next release? or can we apply it somehow?
2. Meanwhile, we put package_upgrade: false inside /var/lib/vz/snippets/user.yaml, which we pass as cicustom together with other ci option. Can you approve this is a supported method as well? it seems to not update in the UI (see attached screenshot), but from our initial test it did pass to the VM -
Code:
root@127:~# cat /var/lib/cloud/instance/user-data.txt
#cloud-config
growpart:
  mode: growpart
  devices:
    - "/dev/sda2"
    - "/dev/sda5"
  ignore_growroot_disabled: true
runcmd:
  - pvscan
  - pvresize /dev/sda5
  - lvextend -l +100%FREE /dev/vgubuntu/root
  - resize2fs /dev/vgubuntu/root
  - lvchange --readahead 8M /dev/vgubuntu/root

package_upgrade: false

image (7).png
 
1. How can we get this patch? do we need to wait for your next release? or can we apply it somehow?
The patch got applied today [0], so it will be included in the next version of the qemu-server package (version > 8.0.6) and I'd suggest to wait for this version to appear in the pvetest repository [1]. However, I can't say exactly when this version will be released.

2. Meanwhile, we put package_upgrade: false inside /var/lib/vz/snippets/user.yaml, which we pass as cicustom together with other ci option. Can you approve this is a supported method as well? it seems to not update in the UI (see attached screenshot), but from our initial test it did pass to the VM -
As noted in the docs [2], specifying custom user data with cicustom will replace the user data that is normally generated from the options set in the GUI. This means, once you specify custom user data with cicustom, the "Upgrade packages" setting in the GUI will have no effect anymore, and its value is not read from the custom user data you specified.

Hope this helps!

[0] https://git.proxmox.com/?p=qemu-server.git;a=commit;h=92c02f6c64fbac3e64b9701dbd6c3af604e991a1
[1] https://pve.proxmox.com/wiki/Package_Repositories#sysadmin_test_repo
[2] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_cloud_init_specific_options
 

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!