[lxc-users] lxc image copy from behind NAT

Fajar A. Nugraha list at fajar.net
Tue Jun 13 00:35:42 UTC 2017


On Mon, Jun 12, 2017 at 10:22 PM, Christoph Mathys <eraserix at gmail.com>
wrote:

> In a test setup, I run an VM with lxd in a NATed network. When I try
> to copy an image to another server (on the other side of the NAT), it
> cannot do that because the other server tries to connect to the IP of
> the VM behind the NAT. I tried with portforwarding, but I think I
> would also need to tell the lxd behind the NAT what its reachable IP
> is.
>
>
The destination lxd will try to connect to the source lxd directly to
perform the copy.

You can probably try something like this:
lxc copy local:src_vm remote_name:dst_vm

where "local" is the literal string local. If that doesn't work, try adding
the local IP as another remote (e.g. "lxc remote add local_instance
127.0.0.1") and then retry the copy with "lxc copy local_instance:src_vm
remote_name:dst_vm".

The idea is to treat both src and dst lxd as remotes, so that traffic will
go thru lxc process instead of directly between lxd daemons. Last time I
tested it works.

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170613/fca36d8c/attachment.html>


More information about the lxc-users mailing list