Error: The target server is missing the required "container_push" API extension

I am trying to copy a container from one host to another (running LXD 3.0.2 & 2.0.11) with the following steps:

  1. create new lxc [target_host]
  2. configure [target_host] to be available over the network (lxd init)
  3. host2 needs to accept ssh login with PassworAuthentification
  4. 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

then i use --mode=relay

lxc copy --mode=relay [container] [target_host]:[container_name]
but i getting Error: The target server is missing the required "container_push" API extension

The default transfer mode is pull, so the remote node will try to connect back to the source server.

So yes configuring the source server to be accessible from the target will help.

You could also try --mode=push but the error you’re already getting suggests that push mode isn’t available.

You could try doing lxc export to create a backup, transferring that file to the new host and then doing lxc import.

Hi Tomp, i have try to use --mode=push also but result is same, still getting same error messages

# lxc copy --mode=push [container]  [target_host]:[container_name]
Error: The target server is missing the required "container_push" API extension

then i try to use lxc image export first following steps on this video and its work

thank you very much

1 Like