All Products
Search
Document Center

Server Migration Center:What do I do if the "To ensure the migration, this machine must have 2G free space on disk and 300MB RAM available" error message appears?

Last Updated:Jul 14, 2023

Problem description

The "To ensure the migration, this machine must have 2G free space on disk and 300MB RAM available" error message appears when I migrate an operating system.

Cause

The disk space of the root directory in the operating system to be migrated is less than 2 GiB or the available memory is less than 300 MiB.

Solution

  1. Connect to the Elastic Compute Service (ECS) instance whose operating system you want to migrate. For more information, see Connect to a Linux instance by using a password or key.

  2. Clean up disk space or suspend some service programs.

    • If the disk space of the root directory is less than 2 GiB, perform the following operation:

      Run the following command to clean up the /tmp and /var/log directories to release the disk space:

      Warning

      Make sure that the files are no longer needed before you delete the files. Otherwise, your business may be affected.

      rm -rf /tmp/*
      rm -rf /var/log/syslog.*    # Delete the earlier syslog files.
    • If the available memory is less than 300 MiB, perform the following operation:

      Suspend some service programs, such as the Java program or NGINX process, to release the memory. After you migrate the operating system, manually restart the suspended service programs. For example, run the following commands to suspend the NGINX process:

      ps aux | grep nginx # View the Process Identifier (PID) of the NGINX process.
      kill -SIGSTOP <nginx-pid> # Suspend the NGINX process
      .
  3. Retry the operating system migration job. For more information, see Migrate an operating system.

  4. If you have suspended a process, manually start the suspended process after migration.

    For example, run the following command to start the NGINX process:

    kill -SIGCONT <nginx-pid>