配置 SSH 免密:
shellssh-copy-id -i ~/.ssh/id_ed25519.pub <user>@<host>
在目标端配置 sudo 免密:
https://serverfault.com/questions/160581/how-to-setup-passwordless-sudo-on-linux
%wheel ALL=(ALL:ALL) NOPASSWD: ALL
The key is to add it after the last line which says
#includedir /etc/sudoers.d
创建快照:
shell# sudo btrfs subvolume snapshot -r <fs-path> <snapshot-path>
sudo btrfs subvolume snapshot -r / /sysfs_ro
NOTE
这里创建的只读快照,是只有单个 subvolume 的。如果需要迁移多个 subvolume,需要执行多次快照和发送。
需要安装好:
把命令中的 ssh <user>@<host> 替换成目标端:
shelldocker images --format "{{.Repository}}:{{.Tag}}" | grep -v 'none' \ | xargs -I{} bash -c \ "docker save {} | zstd -T0 --fast | pv | ssh <user>@<host> 'zstd -d | docker load'"
ArchLinux (2025-09-06)启动 GPU 容器失败:
bash-> % docker run --rm --gpus=all nvidia/cuda:12.1.1-base-ubuntu22.04 nvidia-smi
Unable to find image 'nvidia/cuda:12.1.1-base-ubuntu22.04' locally
12.1.1-base-ubuntu22.04: Pulling from nvidia/cuda
aece8493d397: Already exists
dd4939a04761: Pull complete
b0d7cc89b769: Pull complete
1532d9024b9c: Pull complete
04fc8a31fa53: Pull complete
Digest: sha256:457a4076c56025f51217bff647ca631c7880ad3dbf546b03728ba98297ebbc22
Status: Downloaded newer image for nvidia/cuda:12.1.1-base-ubuntu22.04
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running prestart hook #0: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: ldcache error: process /sbin/ldconfig terminated with signal 9