Cách 1: Tắt máy chủ, khởi động lại server
You do not need a live CD for this to work. I’m basically summarizing the other answers given here:
- From Ubuntu (in VM) install gparted by executing sudo apt-get install gpartedin terminal
- Open sudo gpartedfrom terminal
- Rightclick on the swap partition, click “swapoff”
- Delete swap partition
- Extend your data partition, but leave enough space to create a new swap partition
- Recreate swap partition with about the same size as before, select linux-swap as file system
- Click that green tick in gparted to apply all operations. Then select “swapon” to enable swap again