[lxc-users] Q: Connecting a container to a static IP alias?

Michael Peek peek at nimbios.org
Fri Sep 30 15:16:33 UTC 2016


Okay, this is awesome!  Thank you, I got it working!

On 09/30/2016 10:23 AM, Michael Peek wrote:
> Ah, well that at least explains some of my confusion.  Purging all lxd
> packages and installing just lxc, then I'll see if I can figure things out.
>
> Thank you!
>
> Michael
>
> On 09/29/2016 04:09 PM, Andrey Repin wrote:
>> Greetings, Michael Peek!
>>
>>> Thank you for your time!  But whatever I'm doing, it doesn't seem to be
>>> working:
>>> # lxc init images:ubuntu/xenial/amd64 my-ubuntu-1 \
>>> --config lxc.network.type=macvlan \
>>> --config lxc.network.link=enp0s10 \
>>> --config lxc.network.ipv4=X.X.X.117
>>> Creating my-ubuntu-1
>>> error: Bad key: lxc.network.ipv4
>>> # lxc init images:ubuntu/xenial/amd64 my-ubuntu-1
>>> --config lxc.network.type=macvlan \
>>> --config lxc.network.link=enp0s10
>>> Creating my-ubuntu-1
>>> error: Bad key: lxc.network.link
>>> I've found sources online in several places that say lxc.network.link
>>> and lxc.network.type are valid configuration keys.
>> They are valid for LXC.
>> For LXD, you'd need to configure instances differently.
>>
>>> The same sources speak of editing files in /var/lib/lxc/ to change these
>>> configuration settings too, but the installation of lxc (version 2.0.4) on
>>> my Ubuntu host (version 16.04) doesn't have a /var/lib/lxc/ directory.
>> Doesn't look like you have LXC installed.
>>
>>> I'm sorry to keep pestering the list, but I'm pretty confused.
>>> Michael
>>> On 09/28/2016 05:16 PM, Andrey Repin wrote:
>>>> Greetings, Michael Peek!
>>>>
>>>>> On 09/27/2016 12:01 PM, Andrey Repin wrote:
>>>>>> Just remove alias from host and configure the address inside a VM. 
>>>>> Thanks, that gets me one step closer.  The VM has the right address on
>>>>> the inside.  But how do I get the *.117 address on the outside?
>>>> There's no inside or outside. It either have it or not.
>>>>
>>>>> I tried creating the container with several variations of:
>>>>> lxc init images:ubuntu/xenial/amd64 my-ubuntu-1 --config
>>>>> lxc.network.type=[phys|maclan] --config lxc.network.link=enp0s10:testvm1
>>>> Same mistake.
>>>>
>>>>> --config lxc.network.ipv4=X.X.X.117
>>>>> Thanks for any help you can give!
>>>> macvlan and ***enp0s10*** … Which is your real physical adapter.
>>>>
>>>>
>>> _______________________________________________
>>> lxc-users mailing list
>>> lxc-users at lists.linuxcontainers.org
>>> http://lists.linuxcontainers.org/listinfo/lxc-users
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users



More information about the lxc-users mailing list