Skip to content

Commit df161b7

Browse files
committed
Allow version pinning of the Proxmox kernel
Signed-off-by: lae <[email protected]>
1 parent 2bdad73 commit df161b7

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ pve_check_for_kernel_update: true # Runs a script on the host to check kernel ve
389389
pve_reboot_on_kernel_update: false # If set to true, will automatically reboot the machine on kernel updates
390390
pve_reboot_on_kernel_update_delay: 60 # Number of seconds to wait before and after a reboot process to proceed with next task in cluster mode
391391
pve_remove_old_kernels: true # Currently removes kernel from main Debian repository
392+
# pve_default_kernel_version: # version to pin proxmox-default-kernel to (see https://pve.proxmox.com/wiki/Roadmap#Kernel_6.8)
392393
pve_pcie_passthrough_enabled: false # Set this to true to enable PCIe passthrough.
393394
pve_iommu_passthrough_mode: false # Set this to true to allow VMs to bypass the DMA translation. This might increase performance for IOMMU passthrough.
394395
pve_iommu_unsafe_interrupts: false # Set this to true if your system doesn't support interrupt remapping.
@@ -883,6 +884,20 @@ pve_metric_servers:
883884
- `mtu`: (optional) MTU for UDP metric transmission.
884885
- `verify_certificate`: (optional) Verify SSL certificate. Available only for influxdb with https.
885886

887+
## Non-default scenarios and other use cases
888+
889+
### Preventing upgrade to Linux kernel 6.8
890+
891+
Proxmox 8.2 introduces Linux 6.8, which may cause issues in some deployments.
892+
To work around this, you can pin the kernel version used to 6.5 by adding the following role variable:
893+
894+
```yaml
895+
pve_default_kernel_version: 1.0.1
896+
```
897+
898+
This creates a pin on the `proxmox-default-kernel` package, which is [the method suggested by PVE](https://pve.proxmox.com/wiki/Roadmap#Kernel_6.8).
899+
It can be later removed by unsetting this role variable.
900+
886901
## Developer Notes
887902

888903
When developing new features or fixing something in this role, you can test out

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pve_check_for_kernel_update: true
88
pve_reboot_on_kernel_update: false
99
pve_reboot_on_kernel_update_delay: 60
1010
pve_remove_old_kernels: true
11+
# pve_default_kernel_version:
1112
pve_run_system_upgrades: false
1213
pve_run_proxmox_upgrades: true
1314
pve_pcie_passthrough_enabled: false

tasks/main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,21 @@
169169

170170
- import_tasks: identify_needed_packages.yml
171171

172+
- name: Pin Proxmox kernel to specific version
173+
ansible.builtin.copy:
174+
content: |
175+
Package: proxmox-default-kernel
176+
Pin: version {{ pve_default_kernel_version }}
177+
Pin-Priority: 1000
178+
dest: /etc/apt/preferences.d/proxmox-default-kernel
179+
when: pve_default_kernel_version is defined
180+
181+
- name: Ensure preferences exist for kernel pinning only if needed
182+
ansible.builtin.file:
183+
path: /etc/apt/preferences.d/proxmox-default-kernel
184+
mode: '0644'
185+
state: "{{ 'file' if pve_default_kernel_version is defined else 'absent' }}"
186+
172187
- name: Install Proxmox VE and related packages
173188
apt:
174189
update_cache: yes

0 commit comments

Comments
 (0)