Adding a swap space for Google Cloud Network

Last Updated : Jun 30, 2018 |

About this task

By default, Google instances do not have swap space allocated. Session Manager requires swap space from time to time. So, swap space needs to be added before installing the Session Manager ISO.

Procedure

  1. As a root user, run the following command:
    dd if=/dev/zero of=/swapfile bs=1M count=8192
  2. Run the following command to format the swap space:
    mkswap /swapfile
  3. Run the following command to turn on the swap:
    swapon /swapfile
  4. Run the following command to make the change permanent by adding the following command to /etc/fstab:
    /swapfile swap swap defaults 0 0