how to disable SWAP

Use the following command to disable all swap partitions on the host:
swapoff -a

To persist the change, remove/comment out the swap entries from /etc/fstab.

but in KVM it is Enable
Swap inside VMs is completely independent of swap on the host. If the OS inside the VM was configured to use swapping (as many installers do automatically), it will continue to swap as before. If you want to disable it there as well, you generally can use the same approach as for your host.
When using LVM there is a "swap" LV used. So your VG would need some unallocated space and then you could use lvresize to resize that "swap" LV and later format the LV with mkswap.
Another option would be to add an additional swap file.
Last edited:


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!