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.

 

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

What are the exact specs of your hardware?

We do not disclose the full hardware specifications of our servers, as they are eachy...

How do I install or update Xen Tools on a Linux VPS?

Login to your VPS as root (or use "su -" from a user account). Enter the following commands: #...

Can reverse DNS (rDNS) be set up?

Reverse DNS For Dedicated Server and VPS customers yes, reverse DNS (or rDNS) can be set up.You...

Set up SSH for use without a password?

Setting up SSH keys On your local machine type ssh-keygen -t rsa Follow the instructions for...

My server is hung, how do I reboot it?

VPS Reboots Reboots for VPS's are currently dealt with through support tickets. If you need to...

Powered by WHMCompleteSolution