Resizing the swap partition in Proxmox Virtual Environment is a quick process. No reboot is needed. This method was tested on PVE 8.4.1.
- Turning off swap:
# swapoff -a
- Resizing:
8G stands for 8 GiB of swap. Adjust as needed / wanted.
# lvresize -L 8G /dev/pve/swap
- Reformat as swap:
# mkswap /dev/pve/swap
- Turning swap back on:
# swapon /dev/pve/swap