Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not on others

2016-10-24 Thread Pierce Ng
On Thu, Oct 20, 2016 at 02:07:09PM -0400, Michael Peek wrote:
> I started out with lxd but ran into problems when I tried googling for
> instructions on how to assign a static IP address to a container. 

I set static IP for my LXD containers by configuring each container's
/etc/network/interfaces.d/50-cloud-init.cfg:

  auto lo
  iface lo inet loopback
  
  auto eth0
  iface eth0 inet static
address 10.x.x.x
netmask 255.255.255.0
network 10.x.x.x
broadcast 10.x.x.x
gateway 10.x.x.x
dns-nameservers 10.x.x.x
dns-search xxx.xxx

HTH.

Pierce
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not on others

2016-10-20 Thread Marat Khalili

On 20/10/16 21:42, Michael Peek wrote:
On the host, if I assign the host ip configuration to br1, don't I 
need to change something about the eno1 configuration?

Yes. You should delete it. Everything must be under br1.

--

With Best Regards,
Marat Khalili

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not on others

2016-10-20 Thread Saint Michael
if you use macvlan, there is no bridge anymore.
It is either or

On Thu, Oct 20, 2016 at 2:42 PM, Michael Peek  wrote:

> On the host, if I assign the host ip configuration to br1, don't I need to
> change something about the eno1 configuration?
>
> Michael
>
>
> On 10/20/2016 02:32 PM, Marat Khalili wrote:
>
> Hello,
>
> I use lxc (not lxd!) with static IP addresses. Here's my config (Ubuntu
> 16.04):
>
> /etc/network/interfaces:
>
> auto br1
> iface br1 inet static
> bridge_ports eno1
> bridge_fd 0
> address 10... # host ip configuration follows
>
> /etc/lxc/default.conf:
>
> lxc.network.type = veth
> lxc.network.link = br1
> lxc.network.flags = up
> lxc.network.hwaddr = 00:16:3e:xx:xx:xx
>
> /var/lib/lxc/test/rootfs/etc/network/interfaces:
>
> auto eth0
> iface eth0 inet static
> address 10... #container ip configuration follows
>
> You seem to use macvlan. It is explicitly designed to prevent containers
> from talking to each other (they can only talk via external router), and it
> complicates things, e.g. requires router support (which might be a problem
> in your case). Unless you specifically need this feature you may have
> better results (and performance) with bridge like above.
>
> Unfortunately, many places on the web teach people to configure macvlan
> with containers without really explaining why.
>
> --
>
> With Best Regards,
> Marat Khalili
>
>
> On 20/10/16 20:33, Michael Peek wrote:
>
> Hi gurus,
>
> I'm scratching my head again.  I'm using the following commands to create
> an LXC container with a static IP address:
>
> # lxc-create -n my-container-1 -t download -- -d ubuntu -r xenial -a amd64
>
> # vi /var/lib/lxc/my-container-1/config
>
> Change:
> # Network configuration
> # lxc.network.type = veth
> # lxc.network.link = lxcbr0
> # lxc.network.flags = up
> # lxc.network.hwaddr = 00:16:3e:0d:ec:13
> lxc.network.type = macvlan
> lxc.network.link = eno1
>
> # vi /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces
>
> Change:
> #iface eth0 inet dhcp
> iface eth0 inet static
>   address xxx.xxx.xxx.4
>   netmask 255.255.255.0
>   network xxx.xxx.xxx.0
>   broadcast xxx.xxx.xxx.255
>   gateway xxx.xxx.xxx.1
>   dns-nameservers xxx.xxx.0.66 xxx.xxx.128.66 8.8.8.8
>   dns-search my.domain
>
> # lxc-start -n my-container-1 -d
>
>
> It failed to work.  I reviewed my notes from past posts to the list but
> found no discrepancies.  So I deleted the container and tried it on another
> host -- and it worked.  Next I deleted that container and went back to the
> first host, and it failed.  Lastly, I tried the above steps on multiple
> hosts and found that it works fine on some hosts, but not on others, and I
> have no idea why.  On hosts where this fails there are no error messages,
> but the container can't access the network, and nothing on the network can
> access the container.
>
> Is there some step that I'm missing?
>
> Thanks for any help,
>
> Michael Peek
>
>
> ___
> lxc-users mailing 
> listlxc-users@lists.linuxcontainers.orghttp://lists.linuxcontainers.org/listinfo/lxc-users
>
>
>
>
> ___
> lxc-users mailing 
> listlxc-users@lists.linuxcontainers.orghttp://lists.linuxcontainers.org/listinfo/lxc-users
>
>
>
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not on others

2016-10-20 Thread Michael Peek
On the host, if I assign the host ip configuration to br1, don't I need
to change something about the eno1 configuration?

Michael

On 10/20/2016 02:32 PM, Marat Khalili wrote:
>
> Hello,
>
> I use lxc (not lxd!) with static IP addresses. Here's my config
> (Ubuntu 16.04):
>
> /etc/network/interfaces:
>
>> auto br1
>> iface br1 inet static
>> bridge_ports eno1
>> bridge_fd 0
>> address 10... # host ip configuration follows
> /etc/lxc/default.conf:
>> lxc.network.type = veth
>> lxc.network.link = br1
>> lxc.network.flags = up
>> lxc.network.hwaddr = 00:16:3e:xx:xx:xx
> /var/lib/lxc/test/rootfs/etc/network/interfaces:
>> auto eth0
>> iface eth0 inet static
>> address 10... #container ip configuration follows
>
> You seem to use macvlan. It is explicitly designed to prevent
> containers from talking to each other (they can only talk via external
> router), and it complicates things, e.g. requires router support
> (which might be a problem in your case). Unless you specifically need
> this feature you may have better results (and performance) with bridge
> like above.
>
> Unfortunately, many places on the web teach people to configure
> macvlan with containers without really explaining why.
>
> --
>
> With Best Regards,
> Marat Khalili
>  
> On 20/10/16 20:33, Michael Peek wrote:
>> Hi gurus,
>>
>> I'm scratching my head again.  I'm using the following commands to
>> create an LXC container with a static IP address:
>>
>> # lxc-create -n my-container-1 -t download -- -d ubuntu -r xenial
>> -a amd64
>>
>> # vi /var/lib/lxc/my-container-1/config
>>
>> Change:
>> # Network configuration
>> # lxc.network.type = veth
>> # lxc.network.link = lxcbr0
>> # lxc.network.flags = up
>> # lxc.network.hwaddr = 00:16:3e:0d:ec:13
>> lxc.network.type = macvlan
>> lxc.network.link = eno1
>>
>> # vi /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces
>>
>> Change:
>> #iface eth0 inet dhcp
>> iface eth0 inet static
>>   address xxx.xxx.xxx.4
>>   netmask 255.255.255.0
>>   network xxx.xxx.xxx.0
>>   broadcast xxx.xxx.xxx.255
>>   gateway xxx.xxx.xxx.1
>>   dns-nameservers xxx.xxx.0.66 xxx.xxx.128.66 8.8.8.8
>>   dns-search my.domain
>>
>> # lxc-start -n my-container-1 -d
>>
>>
>> It failed to work.  I reviewed my notes from past posts to the list
>> but found no discrepancies.  So I deleted the container and tried it
>> on another host -- and it worked.  Next I deleted that container and
>> went back to the first host, and it failed.  Lastly, I tried the
>> above steps on multiple hosts and found that it works fine on some
>> hosts, but not on others, and I have no idea why.  On hosts where
>> this fails there are no error messages, but the container can't
>> access the network, and nothing on the network can access the container.
>>
>> Is there some step that I'm missing?
>>
>> Thanks for any help,
>>
>> Michael Peek
>>
>>
>> ___
>> lxc-users mailing list
>> lxc-users@lists.linuxcontainers.org
>> http://lists.linuxcontainers.org/listinfo/lxc-users
>
>
>
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not on others

2016-10-20 Thread Saint Michael
macvlan does not require router support. I use it everyday.

On Thu, Oct 20, 2016 at 2:32 PM, Marat Khalili  wrote:

> Hello,
>
> I use lxc (not lxd!) with static IP addresses. Here's my config (Ubuntu
> 16.04):
>
> /etc/network/interfaces:
>
> auto br1
> iface br1 inet static
> bridge_ports eno1
> bridge_fd 0
> address 10... # host ip configuration follows
>
> /etc/lxc/default.conf:
>
> lxc.network.type = veth
> lxc.network.link = br1
> lxc.network.flags = up
> lxc.network.hwaddr = 00:16:3e:xx:xx:xx
>
> /var/lib/lxc/test/rootfs/etc/network/interfaces:
>
> auto eth0
> iface eth0 inet static
> address 10... #container ip configuration follows
>
> You seem to use macvlan. It is explicitly designed to prevent containers
> from talking to each other (they can only talk via external router), and it
> complicates things, e.g. requires router support (which might be a problem
> in your case). Unless you specifically need this feature you may have
> better results (and performance) with bridge like above.
>
> Unfortunately, many places on the web teach people to configure macvlan
> with containers without really explaining why.
>
> --
>
> With Best Regards,
> Marat Khalili
>
>
> On 20/10/16 20:33, Michael Peek wrote:
>
> Hi gurus,
>
> I'm scratching my head again.  I'm using the following commands to create
> an LXC container with a static IP address:
>
> # lxc-create -n my-container-1 -t download -- -d ubuntu -r xenial -a amd64
>
> # vi /var/lib/lxc/my-container-1/config
>
> Change:
> # Network configuration
> # lxc.network.type = veth
> # lxc.network.link = lxcbr0
> # lxc.network.flags = up
> # lxc.network.hwaddr = 00:16:3e:0d:ec:13
> lxc.network.type = macvlan
> lxc.network.link = eno1
>
> # vi /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces
>
> Change:
> #iface eth0 inet dhcp
> iface eth0 inet static
>   address xxx.xxx.xxx.4
>   netmask 255.255.255.0
>   network xxx.xxx.xxx.0
>   broadcast xxx.xxx.xxx.255
>   gateway xxx.xxx.xxx.1
>   dns-nameservers xxx.xxx.0.66 xxx.xxx.128.66 8.8.8.8
>   dns-search my.domain
>
> # lxc-start -n my-container-1 -d
>
>
> It failed to work.  I reviewed my notes from past posts to the list but
> found no discrepancies.  So I deleted the container and tried it on another
> host -- and it worked.  Next I deleted that container and went back to the
> first host, and it failed.  Lastly, I tried the above steps on multiple
> hosts and found that it works fine on some hosts, but not on others, and I
> have no idea why.  On hosts where this fails there are no error messages,
> but the container can't access the network, and nothing on the network can
> access the container.
>
> Is there some step that I'm missing?
>
> Thanks for any help,
>
> Michael Peek
>
>
> ___
> lxc-users mailing 
> listlxc-users@lists.linuxcontainers.orghttp://lists.linuxcontainers.org/listinfo/lxc-users
>
>
>
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not on others

2016-10-20 Thread Marat Khalili

Hello,

I use lxc (not lxd!) with static IP addresses. Here's my config (Ubuntu 
16.04):


/etc/network/interfaces:


auto br1
iface br1 inet static
bridge_ports eno1
bridge_fd 0
address 10... # host ip configuration follows

/etc/lxc/default.conf:

lxc.network.type = veth
lxc.network.link = br1
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:xx:xx:xx

/var/lib/lxc/test/rootfs/etc/network/interfaces:

auto eth0
iface eth0 inet static
address 10... #container ip configuration follows


You seem to use macvlan. It is explicitly designed to prevent containers 
from talking to each other (they can only talk via external router), and 
it complicates things, e.g. requires router support (which might be a 
problem in your case). Unless you specifically need this feature you may 
have better results (and performance) with bridge like above.


Unfortunately, many places on the web teach people to configure macvlan 
with containers without really explaining why.


--

With Best Regards,
Marat Khalili
 


On 20/10/16 20:33, Michael Peek wrote:

Hi gurus,

I'm scratching my head again.  I'm using the following commands to 
create an LXC container with a static IP address:


# lxc-create -n my-container-1 -t download -- -d ubuntu -r xenial
-a amd64

# vi /var/lib/lxc/my-container-1/config

Change:
# Network configuration
# lxc.network.type = veth
# lxc.network.link = lxcbr0
# lxc.network.flags = up
# lxc.network.hwaddr = 00:16:3e:0d:ec:13
lxc.network.type = macvlan
lxc.network.link = eno1

# vi /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces

Change:
#iface eth0 inet dhcp
iface eth0 inet static
  address xxx.xxx.xxx.4
  netmask 255.255.255.0
  network xxx.xxx.xxx.0
  broadcast xxx.xxx.xxx.255
  gateway xxx.xxx.xxx.1
  dns-nameservers xxx.xxx.0.66 xxx.xxx.128.66 8.8.8.8
  dns-search my.domain

# lxc-start -n my-container-1 -d


It failed to work.  I reviewed my notes from past posts to the list 
but found no discrepancies.  So I deleted the container and tried it 
on another host -- and it worked.  Next I deleted that container and 
went back to the first host, and it failed.  Lastly, I tried the above 
steps on multiple hosts and found that it works fine on some hosts, 
but not on others, and I have no idea why.  On hosts where this fails 
there are no error messages, but the container can't access the 
network, and nothing on the network can access the container.


Is there some step that I'm missing?

Thanks for any help,

Michael Peek


___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users


___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not on others

2016-10-20 Thread McDonagh, Ed
Yes, the naming convention they have chosen makes looking for lxd information 
very difficult when the commands, file paths and conventions are different to 
the lxc predecessor/underlying programs.

But I think that has been discussed on this list before!

From: lxc-users [mailto:lxc-users-boun...@lists.linuxcontainers.org] On Behalf 
Of Michael Peek
Sent: 20 October 2016 19:07
To: LXC users mailing-list
Subject: Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not 
on others

I started out with lxd but ran into problems when I tried googling for 
instructions on how to assign a static IP address to a container.  All of the 
instructions I found said to edit /var/lib/lxc//config, and there 
was no /var/lib/lxc/ directory.  So I uninstalled lxd and installed lxc instead.

Michael



On 10/20/2016 01:59 PM, McDonagh, Ed wrote:
I’m very much not a guru on this topic, but it strikes me to check if you are 
using lxc for a reason, rather than using lxd?

If you don’t have a legacy reason, I don’t know why you wouldn’t want to use 
the new tools that are being developed.

From: lxc-users [mailto:lxc-users-boun...@lists.linuxcontainers.org] On Behalf 
Of Michael Peek
Sent: 20 October 2016 18:57
To: LXC users mailing-list
Subject: Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not 
on others

There is no lxc-profile command, and lxc-ls and lxc-info don't list anything 
about a profile.  I have no idea if that means anything.

Michael



On 10/20/2016 01:53 PM, McDonagh, Ed wrote:
It will be the new lxc software, but without the niceness of the lxd interface.

Hence all his commands being lxc-command instead of lxc command

From: lxc-users [mailto:lxc-users-boun...@lists.linuxcontainers.org] On Behalf 
Of Ron Kelley
Sent: 20 October 2016 18:51
To: LXC users mailing-list
Subject: Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not 
on others

hmmm, seems you are running the “original” version of lxc and not the new 
lxc/lxd software.  Please ignore my comments then…


On Oct 20, 2016, at 1:47 PM, Michael Peek 
<p...@nimbios.org<mailto:p...@nimbios.org>> wrote:

# lxc profile show
The program 'lxc' is currently not installed. You can install it by typing:
apt install lxd-client

Maybe that's part of the problem?  Am I missing a package?  Here are the 
packages I have installed for lxc:

# dpkg -l | grep lxc | cut -c1-20
ii  liblxc1
ii  lxc
ii  lxc-common
ii  lxc-templates
ii  lxc1
ii  lxcfs
ii  python3-lxc

Michael

On 10/20/2016 01:43 PM, Ron Kelley wrote:
"lxc profile show”.  Usually, you have a default profile that gets applied to 
your container unless you have created a new/custom profile.





On Oct 20, 2016, at 1:41 PM, Michael Peek 
<p...@nimbios.org<mailto:p...@nimbios.org>> wrote:

How do I tell?

Michael



On 10/20/2016 01:35 PM, Ron Kelley wrote:
What profile(s) are you using for your LXC containers?



On Oct 20, 2016, at 1:33 PM, Michael Peek 
<p...@nimbios.org<mailto:p...@nimbios.org>> wrote:

Hi gurus,

I'm scratching my head again.  I'm using the following commands to create an 
LXC container with a static IP address:
# lxc-create -n my-container-1 -t download -- -d ubuntu -r xenial -a amd64

# vi /var/lib/lxc/my-container-1/config

Change:
# Network configuration
# lxc.network.type = veth
# lxc.network.link = lxcbr0
# lxc.network.flags = up
# lxc.network.hwaddr = 00:16:3e:0d:ec:13
lxc.network.type = macvlan
lxc.network.link = eno1

# vi /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces

Change:
#iface eth0 inet dhcp
iface eth0 inet static
  address xxx.xxx.xxx.4
  netmask 255.255.255.0
  network xxx.xxx.xxx.0
  broadcast xxx.xxx.xxx.255
  gateway xxx.xxx.xxx.1
  dns-nameservers xxx.xxx.0.66 xxx.xxx.128.66 8.8.8.8
  dns-search my.domain

# lxc-start -n my-container-1 -d

It failed to work.  I reviewed my notes from past posts to the list but found 
no discrepancies.  So I deleted the container and tried it on another host -- 
and it worked.  Next I deleted that container and went back to the first host, 
and it failed.  Lastly, I tried the above steps on multiple hosts and found 
that it works fine on some hosts, but not on others, and I have no idea why.  
On hosts where this fails there are no error messages, but the container can't 
access the network, and nothing on the network can access the container.

Is there some step that I'm missing?

Thanks for any help,

Michael Peek
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org<mailto:lxc-users@lists.linuxcontainers.org>
http://lists.linuxcontainers.org/listinfo/lxc-users







___

lxc-users mailing list

lxc-users@lists.linuxcontainers.org<mailto:lxc-users@lists.linuxcontainers.org>

http://lists.linuxcontainers.org/listinfo/lxc-users

___
lxc-users mailing list
lxc-users@lists.linuxcont

Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not on others

2016-10-20 Thread Michael Peek
I started out with lxd but ran into problems when I tried googling for
instructions on how to assign a static IP address to a container.  All
of the instructions I found said to edit
/var/lib/lxc//config, and there was no /var/lib/lxc/
directory.  So I uninstalled lxd and installed lxc instead.

Michael



On 10/20/2016 01:59 PM, McDonagh, Ed wrote:
>
> I’m very much not a guru on this topic, but it strikes me to check if
> you are using lxc for a reason, rather than using lxd?
>
>  
>
> If you don’t have a legacy reason, I don’t know why you wouldn’t want
> to use the new tools that are being developed.
>
>  
>
> *From:*lxc-users [mailto:lxc-users-boun...@lists.linuxcontainers.org]
> *On Behalf Of *Michael Peek
> *Sent:* 20 October 2016 18:57
> *To:* LXC users mailing-list
> *Subject:* Re: [lxc-users] LXC containers w/ static IPs work on some
> hosts, not on others
>
>  
>
> There is no lxc-profile command, and lxc-ls and lxc-info don't list
> anything about a profile.  I have no idea if that means anything.
>
> Michael
>
>
>
> On 10/20/2016 01:53 PM, McDonagh, Ed wrote:
>
> It will be the new lxc software, but without the niceness of the
> lxd interface.
>
>  
>
> Hence all his commands being lxc-command instead of lxc command
>
>  
>
> *From:*lxc-users
> [mailto:lxc-users-boun...@lists.linuxcontainers.org] *On Behalf Of
>     *Ron Kelley
>     *Sent:* 20 October 2016 18:51
> *To:* LXC users mailing-list
> *Subject:* Re: [lxc-users] LXC containers w/ static IPs work on
> some hosts, not on others
>
>  
>
> hmmm, seems you are running the “original” version of lxc and not
> the new lxc/lxd software.  Please ignore my comments then…
>
>  
>
>  
>
> On Oct 20, 2016, at 1:47 PM, Michael Peek <p...@nimbios.org
> <mailto:p...@nimbios.org>> wrote:
>
>  
>
> # lxc profile show
> The program 'lxc' is currently not installed. You can install it
> by typing:
> apt install lxd-client
>
> Maybe that's part of the problem?  Am I missing a package?  Here
> are the packages I have installed for lxc:
>
> # dpkg -l | grep lxc | cut -c1-20
> ii  liblxc1
> ii  lxc
> ii  lxc-common 
> ii  lxc-templates  
> ii  lxc1   
> ii  lxcfs  
> ii  python3-lxc
>
> Michael
>
> On 10/20/2016 01:43 PM, Ron Kelley wrote:
>
> "lxc profile show”.  Usually, you have a default profile that
> gets applied to your container unless you have created a
> new/custom profile.
>
>  
>
>  
>
>  
>
>  
>
>  
>
> On Oct 20, 2016, at 1:41 PM, Michael Peek <p...@nimbios.org
> <mailto:p...@nimbios.org>> wrote:
>
>  
>
> How do I tell?
>
> Michael
>
>
>
> On 10/20/2016 01:35 PM, Ron Kelley wrote:
>
> What profile(s) are you using for your LXC containers?
>
>  
>
>  
>
>  
>
> On Oct 20, 2016, at 1:33 PM, Michael Peek
> <p...@nimbios.org <mailto:p...@nimbios.org>> wrote:
>
>  
>
> Hi gurus,
>
> I'm scratching my head again.  I'm using the following
> commands to create an LXC container with a static IP address:
>
> # lxc-create -n my-container-1 -t download -- -d ubuntu -r
> xenial -a amd64
>
> # vi /var/lib/lxc/my-container-1/config
>
> Change:
> # Network configuration
> # lxc.network.type = veth
> # lxc.network.link = lxcbr0
> # lxc.network.flags = up
> # lxc.network.hwaddr = 00:16:3e:0d:ec:13
> lxc.network.type = macvlan
> lxc.network.link = eno1
>
> # vi /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces
>
> Change:
> #iface eth0 inet dhcp
> iface eth0 inet static
>   address xxx.xxx.xxx.4
>   netmask 255.255.255.0
>   network xxx.xxx.xxx.0
>   broadcast xxx.xxx.xxx.255
>   gateway xxx.xxx.xxx.1
>   dns-nameservers xxx.xxx.0.66 xxx.xxx.128.66 8.8.8.8
>   dns-search my.domain
>
> # lxc-start -n my-container-1 -d
>
>
> It failed to work.  I reviewed my notes from past posts to
> the list but found no discrepancies.  So I deleted the
>

Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not on others

2016-10-20 Thread McDonagh, Ed
I’m very much not a guru on this topic, but it strikes me to check if you are 
using lxc for a reason, rather than using lxd?

If you don’t have a legacy reason, I don’t know why you wouldn’t want to use 
the new tools that are being developed.

From: lxc-users [mailto:lxc-users-boun...@lists.linuxcontainers.org] On Behalf 
Of Michael Peek
Sent: 20 October 2016 18:57
To: LXC users mailing-list
Subject: Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not 
on others

There is no lxc-profile command, and lxc-ls and lxc-info don't list anything 
about a profile.  I have no idea if that means anything.

Michael



On 10/20/2016 01:53 PM, McDonagh, Ed wrote:
It will be the new lxc software, but without the niceness of the lxd interface.

Hence all his commands being lxc-command instead of lxc command

From: lxc-users [mailto:lxc-users-boun...@lists.linuxcontainers.org] On Behalf 
Of Ron Kelley
Sent: 20 October 2016 18:51
To: LXC users mailing-list
Subject: Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not 
on others

hmmm, seems you are running the “original” version of lxc and not the new 
lxc/lxd software.  Please ignore my comments then…


On Oct 20, 2016, at 1:47 PM, Michael Peek 
<p...@nimbios.org<mailto:p...@nimbios.org>> wrote:

# lxc profile show
The program 'lxc' is currently not installed. You can install it by typing:
apt install lxd-client

Maybe that's part of the problem?  Am I missing a package?  Here are the 
packages I have installed for lxc:

# dpkg -l | grep lxc | cut -c1-20
ii  liblxc1
ii  lxc
ii  lxc-common
ii  lxc-templates
ii  lxc1
ii  lxcfs
ii  python3-lxc

Michael

On 10/20/2016 01:43 PM, Ron Kelley wrote:
"lxc profile show”.  Usually, you have a default profile that gets applied to 
your container unless you have created a new/custom profile.





On Oct 20, 2016, at 1:41 PM, Michael Peek 
<p...@nimbios.org<mailto:p...@nimbios.org>> wrote:

How do I tell?

Michael



On 10/20/2016 01:35 PM, Ron Kelley wrote:
What profile(s) are you using for your LXC containers?



On Oct 20, 2016, at 1:33 PM, Michael Peek 
<p...@nimbios.org<mailto:p...@nimbios.org>> wrote:

Hi gurus,

I'm scratching my head again.  I'm using the following commands to create an 
LXC container with a static IP address:
# lxc-create -n my-container-1 -t download -- -d ubuntu -r xenial -a amd64

# vi /var/lib/lxc/my-container-1/config

Change:
# Network configuration
# lxc.network.type = veth
# lxc.network.link = lxcbr0
# lxc.network.flags = up
# lxc.network.hwaddr = 00:16:3e:0d:ec:13
lxc.network.type = macvlan
lxc.network.link = eno1

# vi /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces

Change:
#iface eth0 inet dhcp
iface eth0 inet static
  address xxx.xxx.xxx.4
  netmask 255.255.255.0
  network xxx.xxx.xxx.0
  broadcast xxx.xxx.xxx.255
  gateway xxx.xxx.xxx.1
  dns-nameservers xxx.xxx.0.66 xxx.xxx.128.66 8.8.8.8
  dns-search my.domain

# lxc-start -n my-container-1 -d

It failed to work.  I reviewed my notes from past posts to the list but found 
no discrepancies.  So I deleted the container and tried it on another host -- 
and it worked.  Next I deleted that container and went back to the first host, 
and it failed.  Lastly, I tried the above steps on multiple hosts and found 
that it works fine on some hosts, but not on others, and I have no idea why.  
On hosts where this fails there are no error messages, but the container can't 
access the network, and nothing on the network can access the container.

Is there some step that I'm missing?

Thanks for any help,

Michael Peek
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org<mailto:lxc-users@lists.linuxcontainers.org>
http://lists.linuxcontainers.org/listinfo/lxc-users






___

lxc-users mailing list

lxc-users@lists.linuxcontainers.org<mailto:lxc-users@lists.linuxcontainers.org>

http://lists.linuxcontainers.org/listinfo/lxc-users

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org<mailto:lxc-users@lists.linuxcontainers.org>
http://lists.linuxcontainers.org/listinfo/lxc-users






___

lxc-users mailing list

lxc-users@lists.linuxcontainers.org<mailto:lxc-users@lists.linuxcontainers.org>

http://lists.linuxcontainers.org/listinfo/lxc-users

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org<mailto:lxc-users@lists.linuxcontainers.org>
http://lists.linuxcontainers.org/listinfo/lxc-users


Attention:
This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary, confidential and/or privileged 
information and should not be copied, disclosed, distributed, retained or used 
by any other party. If you are not an int

Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not on others

2016-10-20 Thread Michael Peek
There is no lxc-profile command, and lxc-ls and lxc-info don't list
anything about a profile.  I have no idea if that means anything.

Michael



On 10/20/2016 01:53 PM, McDonagh, Ed wrote:
>
> It will be the new lxc software, but without the niceness of the lxd
> interface.
>
>  
>
> Hence all his commands being lxc-command instead of lxc command
>
>  
>
> *From:*lxc-users [mailto:lxc-users-boun...@lists.linuxcontainers.org]
> *On Behalf Of *Ron Kelley
> *Sent:* 20 October 2016 18:51
> *To:* LXC users mailing-list
> *Subject:* Re: [lxc-users] LXC containers w/ static IPs work on some
> hosts, not on others
>
>  
>
> hmmm, seems you are running the “original” version of lxc and not the
> new lxc/lxd software.  Please ignore my comments then…
>
>  
>
>  
>
> On Oct 20, 2016, at 1:47 PM, Michael Peek <p...@nimbios.org
> <mailto:p...@nimbios.org>> wrote:
>
>  
>
> # lxc profile show
> The program 'lxc' is currently not installed. You can install it by
> typing:
> apt install lxd-client
>
> Maybe that's part of the problem?  Am I missing a package?  Here are
> the packages I have installed for lxc:
>
> # dpkg -l | grep lxc | cut -c1-20
> ii  liblxc1
> ii  lxc
> ii  lxc-common 
> ii  lxc-templates  
> ii  lxc1   
> ii  lxcfs  
> ii  python3-lxc
>
> Michael
>
> On 10/20/2016 01:43 PM, Ron Kelley wrote:
>
> "lxc profile show”.  Usually, you have a default profile that gets
> applied to your container unless you have created a new/custom
> profile.
>
>  
>
>  
>
>  
>
>  
>
>  
>
> On Oct 20, 2016, at 1:41 PM, Michael Peek <p...@nimbios.org
> <mailto:p...@nimbios.org>> wrote:
>
>  
>
> How do I tell?
>
> Michael
>
>
>
> On 10/20/2016 01:35 PM, Ron Kelley wrote:
>
> What profile(s) are you using for your LXC containers?
>
>  
>
>  
>
>  
>
> On Oct 20, 2016, at 1:33 PM, Michael Peek <p...@nimbios.org
> <mailto:p...@nimbios.org>> wrote:
>
>  
>
> Hi gurus,
>
> I'm scratching my head again.  I'm using the following
> commands to create an LXC container with a static IP address:
>
> # lxc-create -n my-container-1 -t download -- -d ubuntu -r
> xenial -a amd64
>
> # vi /var/lib/lxc/my-container-1/config
>
> Change:
> # Network configuration
> # lxc.network.type = veth
> # lxc.network.link = lxcbr0
> # lxc.network.flags = up
> # lxc.network.hwaddr = 00:16:3e:0d:ec:13
> lxc.network.type = macvlan
> lxc.network.link = eno1
>
> # vi /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces
>
> Change:
> #iface eth0 inet dhcp
> iface eth0 inet static
>   address xxx.xxx.xxx.4
>   netmask 255.255.255.0
>   network xxx.xxx.xxx.0
>   broadcast xxx.xxx.xxx.255
>   gateway xxx.xxx.xxx.1
>   dns-nameservers xxx.xxx.0.66 xxx.xxx.128.66 8.8.8.8
>   dns-search my.domain
>
> # lxc-start -n my-container-1 -d
>
>
> It failed to work.  I reviewed my notes from past posts to the
> list but found no discrepancies.  So I deleted the container
> and tried it on another host -- and it worked.  Next I deleted
> that container and went back to the first host, and it
> failed.  Lastly, I tried the above steps on multiple hosts and
> found that it works fine on some hosts, but not on others, and
> I have no idea why.  On hosts where this fails there are no
> error messages, but the container can't access the network,
> and nothing on the network can access the container.
>
> Is there some step that I'm missing?
>
> Thanks for any help,
>
> Michael Peek
>
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org
> <mailto:lxc-users@lists.linuxcontainers.org>
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
>  
>
>
>
>
> ___
>
> lxc-users mailing list
>
> lxc-users@lists.linuxcontainers.org
> <mailto:lxc-users@lists.linuxcontainers.org>
>
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
>  
>
> ___
>   

Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not on others

2016-10-20 Thread Ron Kelley
hmmm, seems you are running the “original” version of lxc and not the new 
lxc/lxd software.  Please ignore my comments then…


On Oct 20, 2016, at 1:47 PM, Michael Peek  wrote:

# lxc profile show
The program 'lxc' is currently not installed. You can install it by typing:
apt install lxd-client

Maybe that's part of the problem?  Am I missing a package?  Here are the 
packages I have installed for lxc:

# dpkg -l | grep lxc | cut -c1-20
ii  liblxc1 
ii  lxc 
ii  lxc-common  
ii  lxc-templates   
ii  lxc1
ii  lxcfs   
ii  python3-lxc 

Michael

On 10/20/2016 01:43 PM, Ron Kelley wrote:
> "lxc profile show”.  Usually, you have a default profile that gets applied to 
> your container unless you have created a new/custom profile.
> 
> 
> 
> 
> 
> On Oct 20, 2016, at 1:41 PM, Michael Peek  > wrote:
> 
> How do I tell?
> 
> Michael
> 
> 
> 
> On 10/20/2016 01:35 PM, Ron Kelley wrote:
>> What profile(s) are you using for your LXC containers?
>> 
>> 
>> 
>> On Oct 20, 2016, at 1:33 PM, Michael Peek > > wrote:
>> 
>> Hi gurus,
>> 
>> I'm scratching my head again.  I'm using the following commands to create an 
>> LXC container with a static IP address:
>> 
>> # lxc-create -n my-container-1 -t download -- -d ubuntu -r xenial -a amd64
>> 
>> # vi /var/lib/lxc/my-container-1/config
>> 
>> Change:
>> # Network configuration
>> # lxc.network.type = veth
>> # lxc.network.link = lxcbr0
>> # lxc.network.flags = up
>> # lxc.network.hwaddr = 00:16:3e:0d:ec:13
>> lxc.network.type = macvlan
>> lxc.network.link = eno1
>> 
>> # vi /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces
>> 
>> Change:
>> #iface eth0 inet dhcp
>> iface eth0 inet static
>>   address xxx.xxx.xxx.4
>>   netmask 255.255.255.0
>>   network xxx.xxx.xxx.0
>>   broadcast xxx.xxx.xxx.255
>>   gateway xxx.xxx.xxx.1
>>   dns-nameservers xxx.xxx.0.66 xxx.xxx.128.66 8.8.8.8
>>   dns-search my.domain
>> 
>> # lxc-start -n my-container-1 -d
>> 
>> It failed to work.  I reviewed my notes from past posts to the list but 
>> found no discrepancies.  So I deleted the container and tried it on another 
>> host -- and it worked.  Next I deleted that container and went back to the 
>> first host, and it failed.  Lastly, I tried the above steps on multiple 
>> hosts and found that it works fine on some hosts, but not on others, and I 
>> have no idea why.  On hosts where this fails there are no error messages, 
>> but the container can't access the network, and nothing on the network can 
>> access the container.
>> 
>> Is there some step that I'm missing?
>> 
>> Thanks for any help,
>> 
>> Michael Peek
>> ___
>> lxc-users mailing list
>> lxc-users@lists.linuxcontainers.org 
>> 
>> http://lists.linuxcontainers.org/listinfo/lxc-users 
>> 
>> 
>> 
>> ___
>> lxc-users mailing list
>> lxc-users@lists.linuxcontainers.org 
>> 
>> http://lists.linuxcontainers.org/listinfo/lxc-users 
>> 
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org 
> 
> http://lists.linuxcontainers.org/listinfo/lxc-users 
> 
> 
> 
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org 
> 
> http://lists.linuxcontainers.org/listinfo/lxc-users 
> 
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not on others

2016-10-20 Thread Michael Peek
# lxc profile show
The program 'lxc' is currently not installed. You can install it by typing:
apt install lxd-client

Maybe that's part of the problem?  Am I missing a package?  Here are the
packages I have installed for lxc:

# dpkg -l | grep lxc | cut -c1-20
ii  liblxc1
ii  lxc
ii  lxc-common 
ii  lxc-templates  
ii  lxc1   
ii  lxcfs  
ii  python3-lxc

Michael

On 10/20/2016 01:43 PM, Ron Kelley wrote:
> "lxc profile show”.  Usually, you have a default profile that gets
> applied to your container unless you have created a new/custom profile.
>
>
>
>
>
> On Oct 20, 2016, at 1:41 PM, Michael Peek  > wrote:
>
> How do I tell?
>
> Michael
>
>
>
> On 10/20/2016 01:35 PM, Ron Kelley wrote:
>> What profile(s) are you using for your LXC containers?
>>
>>
>>
>> On Oct 20, 2016, at 1:33 PM, Michael Peek > > wrote:
>>
>> Hi gurus,
>>
>> I'm scratching my head again.  I'm using the following commands to
>> create an LXC container with a static IP address:
>>
>> # lxc-create -n my-container-1 -t download -- -d ubuntu -r xenial
>> -a amd64
>>
>> # vi /var/lib/lxc/my-container-1/config
>>
>> Change:
>> # Network configuration
>> # lxc.network.type = veth
>> # lxc.network.link = lxcbr0
>> # lxc.network.flags = up
>> # lxc.network.hwaddr = 00:16:3e:0d:ec:13
>> lxc.network.type = macvlan
>> lxc.network.link = eno1
>>
>> # vi /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces
>>
>> Change:
>> #iface eth0 inet dhcp
>> iface eth0 inet static
>>   address xxx.xxx.xxx.4
>>   netmask 255.255.255.0
>>   network xxx.xxx.xxx.0
>>   broadcast xxx.xxx.xxx.255
>>   gateway xxx.xxx.xxx.1
>>   dns-nameservers xxx.xxx.0.66 xxx.xxx.128.66 8.8.8.8
>>   dns-search my.domain
>>
>> # lxc-start -n my-container-1 -d
>>
>>
>> It failed to work.  I reviewed my notes from past posts to the list
>> but found no discrepancies.  So I deleted the container and tried it
>> on another host -- and it worked.  Next I deleted that container and
>> went back to the first host, and it failed.  Lastly, I tried the
>> above steps on multiple hosts and found that it works fine on some
>> hosts, but not on others, and I have no idea why.  On hosts where
>> this fails there are no error messages, but the container can't
>> access the network, and nothing on the network can access the container.
>>
>> Is there some step that I'm missing?
>>
>> Thanks for any help,
>>
>> Michael Peek
>> ___
>> lxc-users mailing list
>> lxc-users@lists.linuxcontainers.org
>> 
>> http://lists.linuxcontainers.org/listinfo/lxc-users
>>
>>
>>
>> ___
>> lxc-users mailing list
>> lxc-users@lists.linuxcontainers.org
>> http://lists.linuxcontainers.org/listinfo/lxc-users
>
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org
> 
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
>
>
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not on others

2016-10-20 Thread Michael Peek
How do I tell?

Michael



On 10/20/2016 01:35 PM, Ron Kelley wrote:
> What profile(s) are you using for your LXC containers?
>
>
>
> On Oct 20, 2016, at 1:33 PM, Michael Peek  > wrote:
>
> Hi gurus,
>
> I'm scratching my head again.  I'm using the following commands to
> create an LXC container with a static IP address:
>
> # lxc-create -n my-container-1 -t download -- -d ubuntu -r xenial
> -a amd64
>
> # vi /var/lib/lxc/my-container-1/config
>
> Change:
> # Network configuration
> # lxc.network.type = veth
> # lxc.network.link = lxcbr0
> # lxc.network.flags = up
> # lxc.network.hwaddr = 00:16:3e:0d:ec:13
> lxc.network.type = macvlan
> lxc.network.link = eno1
>
> # vi /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces
>
> Change:
> #iface eth0 inet dhcp
> iface eth0 inet static
>   address xxx.xxx.xxx.4
>   netmask 255.255.255.0
>   network xxx.xxx.xxx.0
>   broadcast xxx.xxx.xxx.255
>   gateway xxx.xxx.xxx.1
>   dns-nameservers xxx.xxx.0.66 xxx.xxx.128.66 8.8.8.8
>   dns-search my.domain
>
> # lxc-start -n my-container-1 -d
>
>
> It failed to work.  I reviewed my notes from past posts to the list
> but found no discrepancies.  So I deleted the container and tried it
> on another host -- and it worked.  Next I deleted that container and
> went back to the first host, and it failed.  Lastly, I tried the above
> steps on multiple hosts and found that it works fine on some hosts,
> but not on others, and I have no idea why.  On hosts where this fails
> there are no error messages, but the container can't access the
> network, and nothing on the network can access the container.
>
> Is there some step that I'm missing?
>
> Thanks for any help,
>
> Michael Peek
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org
> 
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
>
>
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] LXC containers w/ static IPs work on some hosts, not on others

2016-10-20 Thread Ron Kelley
What profile(s) are you using for your LXC containers?



On Oct 20, 2016, at 1:33 PM, Michael Peek  wrote:

Hi gurus,

I'm scratching my head again.  I'm using the following commands to create an 
LXC container with a static IP address:

# lxc-create -n my-container-1 -t download -- -d ubuntu -r xenial -a amd64

# vi /var/lib/lxc/my-container-1/config

Change:
# Network configuration
# lxc.network.type = veth
# lxc.network.link = lxcbr0
# lxc.network.flags = up
# lxc.network.hwaddr = 00:16:3e:0d:ec:13
lxc.network.type = macvlan
lxc.network.link = eno1

# vi /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces

Change:
#iface eth0 inet dhcp
iface eth0 inet static
  address xxx.xxx.xxx.4
  netmask 255.255.255.0
  network xxx.xxx.xxx.0
  broadcast xxx.xxx.xxx.255
  gateway xxx.xxx.xxx.1
  dns-nameservers xxx.xxx.0.66 xxx.xxx.128.66 8.8.8.8
  dns-search my.domain

# lxc-start -n my-container-1 -d

It failed to work.  I reviewed my notes from past posts to the list but found 
no discrepancies.  So I deleted the container and tried it on another host -- 
and it worked.  Next I deleted that container and went back to the first host, 
and it failed.  Lastly, I tried the above steps on multiple hosts and found 
that it works fine on some hosts, but not on others, and I have no idea why.  
On hosts where this fails there are no error messages, but the container can't 
access the network, and nothing on the network can access the container.

Is there some step that I'm missing?

Thanks for any help,

Michael Peek
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

[lxc-users] LXC containers w/ static IPs work on some hosts, not on others

2016-10-20 Thread Michael Peek
Hi gurus,

I'm scratching my head again.  I'm using the following commands to
create an LXC container with a static IP address:

# lxc-create -n my-container-1 -t download -- -d ubuntu -r xenial -a
amd64

# vi /var/lib/lxc/my-container-1/config

Change:
# Network configuration
# lxc.network.type = veth
# lxc.network.link = lxcbr0
# lxc.network.flags = up
# lxc.network.hwaddr = 00:16:3e:0d:ec:13
lxc.network.type = macvlan
lxc.network.link = eno1

# vi /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces

Change:
#iface eth0 inet dhcp
iface eth0 inet static
  address xxx.xxx.xxx.4
  netmask 255.255.255.0
  network xxx.xxx.xxx.0
  broadcast xxx.xxx.xxx.255
  gateway xxx.xxx.xxx.1
  dns-nameservers xxx.xxx.0.66 xxx.xxx.128.66 8.8.8.8
  dns-search my.domain

# lxc-start -n my-container-1 -d


It failed to work.  I reviewed my notes from past posts to the list but
found no discrepancies.  So I deleted the container and tried it on
another host -- and it worked.  Next I deleted that container and went
back to the first host, and it failed.  Lastly, I tried the above steps
on multiple hosts and found that it works fine on some hosts, but not on
others, and I have no idea why.  On hosts where this fails there are no
error messages, but the container can't access the network, and nothing
on the network can access the container.

Is there some step that I'm missing?

Thanks for any help,

Michael Peek
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users