Filed under:

KVM Virtual Machines - Missing Swap File and How to Fix




KVM Virtual Dedicated Servers have a tendency to 'forget' they have a swap partition, leading to an error message.

Cannot allocate memory

when updating, upgrading or installing new packages.

If your Astutium KVM Virtual Dedicated Server is (incorrectly) reporting that it has no swap partition, this can be quickly fixed.

From an SSH prompt as root type:

  • swapoff /dev/vda2
  • mkswap /dev/vda2
  • swapon /dev/vda2

For managed virtual dedicated servers, simply open a ticket and one of the VDS Support Team will solve this for you.

 



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read

Language: