Lxc copy freezes/hangs

After renaming a countainer I had a problem with the IP address. The command ‘hostname -i’ did not return the IP address. I tried to fix it but ended op in deleting the container and making a new copy of another similar container.

But not the copy command freezes. I waited 30 minutes but nothing happens. After CTRL-C’ing the copy the container seems to be created but it was not:

root@oev1 ~ # lxc start kas-groen
Error: Failed preparing container for start: Failed to run: zfs mount tank/containers/kas-groen: cannot open ‘tank/containers/kas-groen’: dataset does not exist
Try lxc info --show-log kas-groen for more info

root@oev1 ~ # lxc info --show-log kas-groen
Name: kas-groen
Location: none
Remote: unix://
Architecture: x86_64
Created: 2021/01/23 21:41 UTC
Status: Stopped
Type: container
Profiles: kas-little
snap0 (taken at 2021/01/06 15:29 UTC) (stateless)


As soon as a copy operation starts the container is created in the target database, so that part is normal. Though it sounds like something isn’t happy during the actual migration.

I’d recommend deleting that broken container on the target and trying the copy again, this time passing --mode=relay, this will usually work around most potential network issues.

Thanks for the quick answer. After doing ‘lxc delete kas-groen -force’ and then copying another container as base it worked. I used ‘lcx copy kas-demo kas-groen --debug’ to see where it might go wrong but this time it did just finish.

So I don’t know why it did not work the first time. Maybe some zfs issues.