[lxc-users] How to configure lxd to comply with commands

jjs - mainphrame jjs at mainphrame.com
Wed Aug 17 20:14:43 UTC 2016


Greetings,

I'm running lxd version 2.0.3-0ubuntu1~ubuntu16.04.2

I'm trying to get lxd to correctly execute a move of a container from one
lxd host to another. I have two ubuntu 16.04 hosts, ronnie (designated as
lxd1) and olympia (designated as lxd2):

root at olympia:~# lxc remote list
+-----------------+------------------------------------------+---------------+--------+--------+
|      NAME       |                   URL                    |   PROTOCOL
 | PUBLIC | STATIC |
+-----------------+------------------------------------------+---------------+--------+--------+
| images          | https://images.linuxcontainers.org       | lxd
  | YES    | NO     |
+-----------------+------------------------------------------+---------------+--------+--------+
| local (default) | unix://                                  | lxd
  | NO     | YES    |
+-----------------+------------------------------------------+---------------+--------+--------+
| lxd1            | https://192.168.111.20:8443              | lxd
  | NO     | NO     |
+-----------------+------------------------------------------+---------------+--------+--------+
| ubuntu          | https://cloud-images.ubuntu.com/releases |
simplestreams | YES    | YES    |
+-----------------+------------------------------------------+---------------+--------+--------+
| ubuntu-daily    | https://cloud-images.ubuntu.com/daily    |
simplestreams | YES    | YES    |
+-----------------+------------------------------------------+---------------+--------+--------+

root at ronnie:~# lxc remote list
+-----------------+------------------------------------------+---------------+--------+--------+
|      NAME       |                   URL                    |   PROTOCOL
 | PUBLIC | STATIC |
+-----------------+------------------------------------------+---------------+--------+--------+
| images          | https://images.linuxcontainers.org       | lxd
  | YES    | NO     |
+-----------------+------------------------------------------+---------------+--------+--------+
| local (default) | unix://                                  | lxd
  | NO     | YES    |
+-----------------+------------------------------------------+---------------+--------+--------+
| lxd2            | https://192.168.111.193:8443             | lxd
  | NO     | NO     |
+-----------------+------------------------------------------+---------------+--------+--------+
| ubuntu          | https://cloud-images.ubuntu.com/releases |
simplestreams | YES    | YES    |
+-----------------+------------------------------------------+---------------+--------+--------+
| ubuntu-daily    | https://cloud-images.ubuntu.com/daily    |
simplestreams | YES    | YES    |
+-----------------+------------------------------------------+---------------+--------+--------+

You can see that the remotes are configured with their local lan addresses.
So far so good?



Here are the 2 containers currently on lxd2:
root at olympia:~# lxc list
+--------+---------+-----------------------+------+------------+-----------+
|  NAME  |  STATE  |         IPV4          | IPV6 |    TYPE    | SNAPSHOTS |
+--------+---------+-----------------------+------+------------+-----------+
| akita  | RUNNING | 192.168.111.22 (eth0) |      | PERSISTENT | 0         |
+--------+---------+-----------------------+------+------------+-----------+
| kangal | RUNNING | 192.168.111.44 (eth0) |      | PERSISTENT | 0         |
+--------+---------+-----------------------+------+------------+-----------+



Now, I try to move a container from lxd2 to lxd1:
root at olympia:~# lxc move kangal lxd1:
error: Error transferring container data: Unable to connect to:
192.168.1.8:8443

Why is it trying to connect to 192.168.1.8? That is a local wireless
address on lxd2, but it was never mentioned in any lxd configuration:

root at olympia:~# ifconfig wlp3s0
wlp3s0    Link encap:Ethernet  HWaddr 80:56:f2:05:ce:6c
          inet addr:192.168.1.8  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::8256:f2ff:fe05:ce6c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:401712 errors:0 dropped:0 overruns:0 frame:0
          TX packets:219214 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:95097222 (95.0 MB)  TX bytes:34201360 (34.2 MB)


So my question is, how do we get lxd to ignore the local wireless IP, and
execute the lxc move command using the configured IPs?

Regards,

Jake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160817/58f8d3cf/attachment.html>


More information about the lxc-users mailing list