Hello, I am trying to copy a container from one server to another, both using encrypted zfs backend pool (“encpool”), both running incus 6.0.2, both on ubuntu 22.04:
ubuntu@lxd-server:~$ incus launch ubuntu:24.04 c1 -s encpool
Creating c1
Starting c1
ubuntu@lxd-server:~$ incus stop c1
ubuntu@lxd-server:~$ incus copy c1 lxd-backup: -s encpool
ubuntu@lxd-server:~$ incus copy c1 lxd-backup: -s encpool --refresh
Error: Failed instance creation: Error transferring instance data: Failed migration on target: Failed creating instance on target: Failed receiving volume "c1": Problem with zfs receive: ([exit status 1 write |1: broken pipe]) cannot receive new filesystem stream: zfs receive -F cannot be used to destroy an encrypted filesystem or overwrite an unencrypted one with an encrypted one
At this point, c1 container’s storage on the backup server is completely lost.
I have seen this post: Encrypted ZFS dataset: incus copy --refresh fails
I think this is similar but at least in my situation, the zfs key is loaded on both source and destination already.
What is also strange is that I have another older container that does work perfectly fine. The only difference is that this is an old container running ubuntu 18 instance. However, creating a new ubuntu 18 instance fails.
Is there anything I can run on my end to help determine what or where the problem is?
(PS - I created a reddit /r/LXD post and posted an LXD github bug report, thinking that maybe it was specific to LXD. I was eventually going to migrate to Incus, and this bug motivated me to force the Incus migration and test the above scenario.)