I am trying to copy a container from one host to another (running LXD 3.0.3 & 3.0.4) with the following steps:
create new lxc [target_host]
configure [target_host] to be available over the network (lxd init)
host2 needs to accept ssh login with PassworAuthentification
on [source_host] run
lxc remote add [target_host] [ip-addresse]
lxc copy [container/snapshot] [target_host]:[newcontainername]
but I am getting the below error, which seems to indicate that the [source_host] server also needs to be configured to âlistenâ over the network.
$ lxc copy [container] [target_host]:[container_name]
Error: The source server isn't listening on the network
how can I enable listening over the network on an existing LDX daemon? Do I need to carefully re-run âlxd initâ or ist there any other way to do this?
worked once ⊠I needed to rebuild the target server and now on the second copy I am getting trouble with a proxy device attached to my container
~$ lxc copy --mode=relay ct1 host2:ct2
Error: Invalid devices: Device validation failed for "myport443": Invalid value for device option "connect": Not an IP address "localhost"
so I remove and recreate the 2 proxies with connect: tcp:127.0.0.1:[port] instead the localhost which gave the error. Still the lxc copy operation throws the same error message, even with the old device names (changed from myport80 -> port80 in the recreation process.
I thought this could be some sort of caching issue so I restartet the daemon and (when this did not heal anything) restarted the host server alltogether ⊠same error (with reference to the old proxy device) pops up again.
Even if I remove the proxy devices from that container completely before running the lxc copy --mode=relay [ct1] lxd2:[ct2]
command I get that error.
hm ⊠specifying a snapshot did the job apparently. I believe it wansât necesarry the last time I tried (which makes sense because it is not impossible that you want to copy a container with all snapshots to a different host)