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
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 命令。
使用 Snap 版本的 Docker 时 analyze 命令失败
如果您使用的是 Snap 版本的 Docker,则 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
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-19。"],[],[],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/)."]]