I want to move a container from my local host (lxd 3.11 from snap) to a new remote cloud server (running lxd 3.0.3-0ubuntu1~18.04.1).
The local host has a dynamic ip, the remote host lives on a hetzner cloudserver and has a static ip. For now, this only has to work once, so I don’t think the dynamic IP of my local host is much of a problem.
Now based on the linked Topic I assume there are 3 steps involved on my local lxd host
1. basic settings
lxc config set core.https_address [local-public-ip]
lxc config set core.trust_password SOME-PASSWORD
now with the first action I am running into an error where I have used the public ip addresse I found in my router’s settings (which is a dynamoc ip I assume)
lxc config set core.https_address [xx.yyy.zzz.xx]
Error: cannot listen on https socket: listen tcp [xx.yyy.zzz.xx]:8443: bind: cannot assign requested address
solved this bit. It did not work due to this problem. After dis-/enableing the lxd snap I can set the IP address.
however I am facing a connection problem with the remote IP now
lxc remote add hetzner [xx.yyy.zzz.xxx]
Generating a client certificate. This may take a minute...
Error: Get https://[xx.yyy.zzz.xxx]:8443: Unable to connect to: [xx.yyy.zzz.xxx]:8443
Can you do a quick test and telnet from the source host towards the IP / port of the destination server?
You might want to check firewall or routing towards your destination server.
I haven’t used telnet before much and it’s long ago, so I hope this is correct
telnet [95.yyy.zzz.149] 8443
Trying [95.yyy.zzz.149]...
telnet: Unable to connect to remote host: Connection refused
getting the same “Unable to connect to remote host: Connection refused” error, when I use the blank IP without specifying any port (telnet [95.yyy.zzz.149])
I would double check on the destination host if you have any rules that might be blocking.
First check that indeed LXD is listening on the correct IP / interface:
sudo netstat -ltpn | grep lxd
Check any firewall rules that might be blocking: sudo iptables -S sudo iptables -t nat -S
So it seems that LXD is not listening on the interface, can you try to restart the lxd snap with sudo snap restart lxd and run sudo netstat -ltpn | grep lxd to see if it is now listening?
If not can you share lxc config show.
well, that’s exactly where I haven’t done it yet because it sounded as if you had to process this on the local server). Will try that and report back once done. thx thus far