The memory setting you see is only used to configure the VM's RAM. However, the swap space definition is part of the disk image. This image is provided to you as part of the config.vm.box
definition in Vagrantfile
. In my specific case I noticed that the swap space cannot easily be reconfigured (I only have 1 GByte of swap).
In your case I recommend to change the base image (config.vm.box
), or add a swap-file to your root file system by integrating for example this script into your Vagrantfile
. This is another link which seems worth trying out.
https://www.youtube.com/watch?v=41VCvcGKETQ
From Ubuntu 18.04 onwards, a swapfile