Stay organized with collections
Save and categorize content based on your preferences.
Set up for migration
Before you start the modernization process, you need to check whether your
application component is compatible for modernization and prepare your setup
for modernization.
This page describes how to prepare your source and local machines for
modernization.
Set up the Linux source machine
Install rsync:
On Debian:
sudo apt install rsync
On Fedora:
sudo dnf install rsync
Ensure that rsync is available in the PATH setting.
Set up the Linux local machine
Install Docker and
ensure that it is available in the PATH.
This downloads the latest version of the Migrate to Containers CLI and
Migrate to Containers plugins.
Check connectivity
Ensure that you can access the source machine from the local machine using
either direct SSH or the gcloud compute ssh command.
Optional: Set up for offline migration
If you want to perform migration on your local network without pulling
resources from the internet, then you can complete the following steps to
prepare your local machine for offline migrations.
After you've downloaded Migrate to Containers CLI, perform the
following steps:
Download the offline Migrate to Containers CLI plugins bundle:
Replace HOSTNAME with the container registry hostname.
Your local machine is set up for offline migration. To upgrade the offline
Migrate to Containers CLI plugins bundle, upgrade Migrate to Containers CLI
to the latest version, and then repeat the steps to download and unpack the
plugins bundle.
If you want to turn off the offline mode later, then you can use the
config set command to set the offline option to false.
Set up the Windows local machine
You must be able to run as administrator on the local machine.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Set up for migration\n====================\n\nBefore you start the modernization process, you need to check whether your\napplication component is compatible for modernization and prepare your setup\nfor modernization.\n\nThis page describes how to prepare your source and local machines for\nmodernization.\n\nSet up the Linux source machine\n-------------------------------\n\n| **Note:** If you're going to migrate Windows IIS applications, you don't need to perform the steps to set up the Windows source machine for migration.\n\n- Install `rsync`:\n\n - On Debian:\n\n sudo apt install rsync\n\n - On Fedora:\n\n sudo dnf install rsync\n\n Ensure that `rsync` is available in the `PATH` setting.\n\nSet up the Linux local machine\n------------------------------\n\n- [Install Docker](https://docs.docker.com/engine/install) and\n ensure that it is available in the `PATH`.\n\n | **Note:** To avoid [issues that might occur while using Snap version of Docker](/migrate/containers/docs/troubleshooting/issues-with-m2c-cli#the_analyze_command_fails_when_using_the_snap_version_of_docker), ensure that you install Docker without using Snap.\n\n If the user running Migrate to Containers CLI is a non-root user, then\n [allow the non-root user to run containers](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user).\n\n### Download or upgrade Migrate to Containers CLI\n\n- Download or upgrade the Migrate to Containers CLI on a Linux machine:\n\n curl -O \"https://m2c-cli-release.storage.googleapis.com/$(curl -s https://m2c-cli-release.storage.googleapis.com/latest)/linux/amd64/m2c\"\n chmod +x ./m2c\n\n This downloads the latest version of the Migrate to Containers CLI and\n Migrate to Containers plugins.\n\n### Check connectivity\n\nEnsure that you can access the source machine from the local machine using\neither direct SSH or the `gcloud compute ssh` command.\n| **Note:** The user used for SSH connection must be either a sudoer or root. If the user used to perform SSH can't act as root, then Migrate to Containers CLI might not be able to examine files and directories relevant to the modernization process.\n\n### Optional: Set up for offline migration\n\nIf you want to perform migration on your local network without pulling\nresources from the internet, then you can complete the following steps to\nprepare your local machine for offline migrations.\n\nAfter you've downloaded Migrate to Containers CLI, perform the\nfollowing steps:\n\n1. Download the offline Migrate to Containers CLI plugins bundle:\n\n curl -O https://storage.googleapis.com/modernize-plugins-prod/$(curl -s https://storage.googleapis.com/modernize-plugins-prod/latest)/m2c-offline-bundle-linux.tar\n\n2. If required, copy the Migrate to Containers CLI and offline Migrate to Containers CLI\n plugins bundle to the offline environment.\n\n3. Unpack the offline Migrate to Containers CLI plugins bundle:\n\n ./m2c plugins unpack -i m2c-offline-bundle-linux.tar\n\n To add support for offline data migration, specify a container registry\n that is available in your local network: \n\n ./m2c plugins unpack -i m2c-offline-bundle-linux.tar --registry \u003cvar translate=\"no\"\u003eHOSTNAME\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eHOSTNAME\u003c/var\u003e with the container registry hostname.\n\nYour local machine is set up for offline migration. To upgrade the offline\nMigrate to Containers CLI plugins bundle, [upgrade Migrate to Containers CLI](#download-cli-linux)\nto the latest version, and then repeat the steps to download and unpack the\nplugins bundle.\n\nIf you want to turn off the offline mode later, then you can use the\n`config set` command to set the `offline` option to `false`.\n\nSet up the Windows local machine\n--------------------------------\n\n- You must be able to run as administrator on the local machine.\n- [Install Docker](https://docs.docker.com/engine/install).\n\n### Download or upgrade Migrate to Containers CLI\n\nTo download or upgrade Migrate to Containers CLI on a Windows machine, perform the\nfollowing steps: \n\n### cmd\n\n1. Find the latest version of Migrate to Containers CLI:\n\n curl -s https://m2c-cli-release.storage.googleapis.com/latest\n\n2. Download the latest version of Migrate to Containers CLI:\n\n curl -O \"https://m2c-cli-release.storage.googleapis.com/\u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e/windows/amd64/m2c.exe\"\n\n Replace \u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e with the latest version of Migrate to Containers CLI.\n\n### PowerShell\n\n- Download the latest version of Migrate to Containers CLI:\n\n curl.exe -O https://m2c-cli-release.storage.googleapis.com/$(curl.exe -s https://m2c-cli-release.storage.googleapis.com/latest)/windows/amd64/m2c.exe\n\nThis downloads the latest version of the Migrate to Containers CLI and\nMigrate to Containers plugins.\n\nWhat's next\n-----------\n\n- Learn how to [copy the source machine's file system](/migrate/containers/docs/m2c-cli/copy-file-system)."]]