將 vm213 複寫Replication 到 pve21 (192.168.0.21) 時
出現訊息:
2021-02-17 10:49:00 213-1: start replication job
2021-02-17 10:49:00 213-1: guest => VM 213, running => 29020
2021-02-17 10:49:00 213-1: volumes => local-zfs:vm-213-disk-0,local-zfs:vm-213-state-snapshot_20210208_0911,local-zfs:vm-213-state-snapshot_20210217_1041
2021-02-17 10:49:01 213-1: (remote_prepare_local_job) Host key verification failed.
2021-02-17 10:49:01 213-1: (remote_prepare_local_job)
2021-02-17 10:49:01 213-1: end replication job with error: command '/usr/bin/ssh -e none -o 'BatchMode=yes' -o 'HostKeyAlias=pve21' [email protected] -- pvesr prepare-local-job 213-1 local-zfs:vm-213-disk-0 local-zfs:vm-213-state-snapshot_20210208_0911 local-zfs:vm-213-state-snapshot_20210217_1041 --last_sync 0 --parent_snapname snapshot_20210217_1041' failed: exit code 255
解決:
ssh -o 'HostKeyAlias=pve21' [email protected]
參考:
https://forum.proxmox.com/threads/host-key-verification-failed-when-migrate.41666/
還原備份檔
root@pve5:/var/lib/vz/dump# qmrestore vzdump-qemu-213-2021_02_01-13_34_20.vma.zst 213
:: :::
command 'set -o pipefail && zstd -q -d -c /var/lib/vz/dump/vzdump-qemu-213-2021_02_01-13_34_20.vma.zst | vma extract -v -r /var/tmp/vzdumptmp7436.fifo - /var/tmp/vzdumptmp7436' failed: storage 'local-zfs' does not exist
若原來的 zfs pool 不存在,可以改還原到新的位置:
root@pve5:/var/lib/vz/dump# qmrestore vzdump-qemu-213-2021_02_01-13_34_20.vma.zst 213 --storage local
還原 container:
$ pct restore 202 vzdump-lxc-202-2021_02_18-21_49_48.tar.zst --storage local-zfs
啟動 vm 時一直出現 failed: got timeout
TASK ERROR: start failed: command'/usr/bin/kvm -id 213 -name devp211 -no-shutdown -chardev 'socket,id=qmp,path=/var/run/qemu-server/213.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -chardev 'socket,id=...............e -smbios 'type=1,uuid=640e9277-55a..............................................ddr=0x12,id=net0,bootindex=300' -machine 'type=pc+pve0'' failed: got timeout
結果剛剛 restore 的工作完成後
這個 vm 就正常啟動 ///
真正的原因?!
新安裝的 Proxmox server 沒有 local-zfs
自己新增檔案即可: /etc/pve/storage.cfg
dir: local path /var/lib/vz content iso,vztmpl,backup # default image store on ZFS based installation zfspool: local-zfs pool rpool/data sparse content images,rootdir