이 문서에서는 Migrate to Containers 작업 중 발생할 수 있는 몇 가지 문제에 대한 해결 방법을 설명합니다.
권한 오류로 인한 복사 작업 실패
전체 파일 시스템에 대한 읽기 액세스 권한을 얻으려면 copy 명령어는 소스 머신에서 수퍼유저를 사용하여 실행됩니다. 하지만 권한 오류로 인해 여전히 복사 작업이 실패하는 경우가 있습니다. 이 문제는 경우에 따라 슈퍼유저조차 소스 머신의 일부 디렉터리에 대한 읽기 액세스 권한이 없기 때문에 발생합니다.
이러한 경우 다음 메시지와 유사한 오류 메시지가 표시될 수 있습니다.
E rsync rsync: send_files failed to open "/var/lib/lxcfs/cgroup/blkio/blkio.reset_stats": Permission denied (13)
...
E rsync rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1865) [generator=3.2.7]
Error: failed to copy fs from GCP VM "petclinic-springboot": failed copying vm to "/tmp/copy-1411243774": exit status 23
이 문제를 해결하려면 커스텀 필터를 만들어 복사 작업에서 이러한 디렉터리를 제외합니다.
예를 들어 복사 작업에서 /var/lib/lxcfs 디렉터리를 제외하려면 다음 커스텀 필터를 필터 파일에 추가합니다.
gcloud를 사용하여 sudo로 copy 명령어를 실행하는 경우 복사 작업이 소스 머신에 인증되지 않을 수 있습니다. 이 문제는 Migrate to Containers CLI를 실행하는 동일한 수퍼유저로 gcloud가 실행되고, 수퍼유저가 표준 사용자와 동일한 사용자 인증 정보를 가지고 있지 않을 때 발생합니다.
이러한 경우 다음 메시지와 유사한 오류 메시지가 표시될 수 있습니다.
E ssh init ERROR: (gcloud.compute.ssh) There was a problem refreshing your current auth tokens: ('Failed to retrieve TOKEN from the Google Compute Engine metadata service. Status: 404 Response:\nb\'"No service account scopes specified."\'', <google.auth.transport.requests._Response object at 0x7fecf5c75550>)
E ssh init Please run:
E ssh init
E ssh init $ gcloud auth login
E ssh init
E ssh init to obtain new credentials.
E ssh init
E ssh init If you have already logged in with a different account:
E ssh init
E ssh init $ gcloud config set account ACCOUNT
E ssh init
E ssh init to select an already authenticated account to use.
Error: failed to initiate a connection with GCP VM "tomcat-server": exit status 1
이 문제를 해결하려면 sudo없이 gcloud를 사용하여 copy 명령어를 실행해 봅니다.
Docker의 Snap 버전을 사용하면 analyze 명령어 실패
Docker의 Snap 버전을 사용하면 analyze 명령어가 실패합니다.
이러한 경우 다음 메시지와 유사한 오류 메시지가 표시될 수 있습니다.
I Unpacking file system...
I Running analysis...
Error: running analysis failed: failed to run container: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: PATH
이 문제를 해결하려면 Snap을 사용하지 않고 Docker를 다시 설치합니다. 자세한 내용은 Docker Engine 설치를 참조하세요.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Issues with Migrate to Containers CLI\n=====================================\n\nThis document describes workarounds for some issues that you might\nencounter while working with the Migrate to Containers CLI.\n\nCopy operation fails due to permission errors\n---------------------------------------------\n\nTo gain read access on the entire file system, the `copy` command is\nrun using a superuser on the source machine. However, sometimes the copy\noperation still fails due to permission errors. This issue occurs because in\nsome cases even the superuser doesn't have read access to some directories on\nthe source machine.\n\nIn such cases, you might see an error message similar to the following message: \n\n E rsync rsync: send_files failed to open \"/var/lib/lxcfs/cgroup/blkio/blkio.reset_stats\": Permission denied (13)\n ...\n E rsync rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1865) [generator=3.2.7]\n Error: failed to copy fs from GCP VM \"petclinic-springboot\": failed copying vm to \"/tmp/copy-1411243774\": exit status 23\n\nAs a workaround for this issue, create a custom filter to exclude such\ndirectories from the copy operation.\n\nFor example, to exclude the `/var/lib/lxcfs` directory from the copy operation,\nadd the following custom filter in the filters file: \n\n - /var/lib/lxcfs\n\nFor more information, see\n[Reduce the size of the copied file system](/migrate/containers/docs/m2c-cli/copy-file-system#reduce_the_size_of_the_copied_file_system).\n\nCopy operation using `gcloud` fails to authenticate to the machine\n------------------------------------------------------------------\n\nIf you use `gcloud` to run the `copy` command with `sudo`, then in some cases,\nthe copy operation might fail to authenticate to the source machine. This issue\noccurs because `gcloud` is run with the same superuser that runs the\nMigrate to Containers CLI, and the superuser doesn't have the same credentials as the\nstandard user.\n\nIn such cases, you might see an error message similar to the following message: \n\n E ssh init ERROR: (gcloud.compute.ssh) There was a problem refreshing your current auth tokens: ('Failed to retrieve \u003cvar class=\"readonly\" translate=\"no\"\u003eTOKEN\u003c/var\u003e from the Google Compute Engine metadata service. Status: 404 Response:\\nb\\'\"No service account scopes specified.\"\\'', \u003cgoogle.auth.transport.requests._Response object at 0x7fecf5c75550\u003e)\n E ssh init Please run:\n E ssh init\n E ssh init $ gcloud auth login\n E ssh init\n E ssh init to obtain new credentials.\n E ssh init\n E ssh init If you have already logged in with a different account:\n E ssh init\n E ssh init $ gcloud config set account ACCOUNT\n E ssh init\n E ssh init to select an already authenticated account to use.\n Error: failed to initiate a connection with GCP VM \"tomcat-server\": exit status 1\n\nAs a workaround for this issue, try running the `copy` command using `gcloud`\nwithout `sudo`.\n\nThe `analyze` command fails when using the Snap version of Docker\n-----------------------------------------------------------------\n\nIf you're using the Snap version of Docker, then the `analyze` command fails.\n\nIn such cases, you might see an error message similar to the following message: \n\n I Unpacking file system...\n I Running analysis...\n Error: running analysis failed: failed to run container: Error response from daemon: invalid mount config for type \"bind\": bind source path does not exist: \u003cvar class=\"readonly\" translate=\"no\"\u003ePATH\u003c/var\u003e\n\nAs a workaround for this issue, install Docker again without using Snap. For\nmore information, see [Install Docker Engine](https://docs.docker.com/engine/install/)."]]