By default, OpenVZ doesn't allow swap creation inside containers. And this
is a good thing.

It is not good to use storage to act as memory, since the performance is
really bad. When needing more memory, just upgrade the hardware profile of
your VM with your provider.

On Wed, Jan 8, 2020 at 3:41 PM Jeffrey Walton <noloa...@gmail.com> wrote:

> Hi Everyone,
>
> I'm trying to track down the cause of the error message below. It is
> encountered when we try to enable a swapfile for a low-end VM. The VPS
> provider uses OpenVZ.
>
>     # ./vm-swapfile.sh
>     Swapfile already allocated
>     swapon: /swapfile: swapon failed: Operation not permitted
>     Failed to enable swapfile
>
> The relevant command is:
>
>     if ! swapon /swapfile; then
>         echo "Failed to enable swapfile"
>     fi
>
> Is this mkswap message from OpenVZ?
>
> Thanks in advance.
> _______________________________________________
> Users mailing list
> Users@openvz.org
> https://lists.openvz.org/mailman/listinfo/users
>
_______________________________________________
Users mailing list
Users@openvz.org
https://lists.openvz.org/mailman/listinfo/users

Reply via email to