Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Migration einrichten
Bevor Sie mit dem Modernisierungsprozess beginnen, müssen Sie prüfen, ob Ihre Anwendungskomponente für die Modernisierung kompatibel ist und Ihre Einrichtung für die Modernisierung vorbereiten.
Auf dieser Seite wird beschrieben, wie Sie Ihre Quell- und lokalen Computer für die Modernisierung vorbereiten.
Linux-Quellmaschine einrichten
Installieren Sie rsync:
Auf Debian:
sudo apt install rsync
Auf Fedora:
sudo dnf install rsync
rsync muss in der Einstellung PATH verfügbar sein.
Damit wird die neueste Version der Migrate to Containers-Befehlszeile und der Migrate to Containers-Plug-ins heruntergeladen.
Verbindung überprüfen
Prüfen Sie, dass Sie vom lokalen Computer aus auf den Quellcomputer zugreifen können, wobei Sie entweder direkt SSH oder den Befehl gcloud compute ssh verwenden.
Optional: Für die Offline-Migration einrichten
Wenn Sie eine Migration in Ihrem lokalen Netzwerk ausführen möchten, ohne Ressourcen aus dem Internet abzurufen, können Sie die folgenden Schritte ausführen, um Ihren lokalen Computer für Offline-Migrationen vorzubereiten.
Führen Sie nach dem Herunterladen der Migrate to Containers-Befehlszeile die folgenden Schritte aus:
Laden Sie das Offline-Plug-in-Bundle für Migrate to Containers CLI herunter:
Ersetzen Sie HOSTNAME durch den Hostnamen der Container Registry.
Ihr lokaler Computer ist für die Offline-Migration eingerichtet. Wenn Sie das Offline-Plug-in-Paket für die Migrate to Containers-Befehlszeile aktualisieren möchten, aktualisieren Sie die Migrate to Containers-Befehlszeile auf die neueste Version und wiederholen Sie dann die Schritte zum Herunterladen und Entpacken des Plug-in-Pakets.
Wenn Sie den Offlinemodus später deaktivieren möchten, können Sie mit dem Befehl config set die Option offline auf false setzen.
Lokalen Windows-Computer einrichten
Sie müssen auf dem lokalen Computer als Administrator ausgeführt werden können.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-31 (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)."]]