The template below is mostly useful for bug reports and support questions.
Feel free to remove anything which doesn't apply to you and add more information where it makes sense.
The output of "lxc info" or if that fails:
`apicompat: 0
auth: trusted
environment:
addresses: []
architectures:
driver: lxc
driverversion: 2.0.3
kernel: Linux
kernelarchitecture: x86_64
kernelversion: 4.4.0-31-generic
server: lxd
serverpid: 4293
serverversion: 2.0.3
storage: zfs
storageversion: "5"
config:
storage.zfs_pool_name: logging
public: false
`
macvlan doesnt appear to allow access to physical interface. In general I have tried about 10 guides, and cannot seem to get containers direct access to the network in order to pull a DHCP address from my network's DHCP. I have tried bridged mode as well.
A brief description of what failed or what could be improved.
Easy method for having containers pretend they are physical boxes accessing the network.
Update your server: sudo apt-get update ; sudo apt-get dist-upgrade -y ; sudo apt-get install lxd -y
Update your groups: newgrp
Install ZFS (it's better that you do, not required): sudo apt-get install zfs -yf
Install bridge-utils: sudo apt-get install bridge-utils
Initialize LXD and configure it using wizard: sudo lxd init
Tell LXD to bridge containers to physical nic: lxc profile device set default eth0 parent
Create containers service account sudo useradd -G lxd -s /bin/rbash
Change to service account: sudo su containers
Launch your container (Note: the hostname you choose will be it's hostname...): lxc launch ubuntu:16.04 mycontainerhostname
Log:
lxc 20160728145100.592 INFO lxc_start - start.c:lxc_check_inherited:251 - closed inherited fd 3
lxc 20160728145100.592 INFO lxc_start - start.c:lxc_check_inherited:251 - closed inherited fd 9
lxc 20160728145100.595 INFO lxc_container - lxccontainer.c:do_lxcapi_start:797 - Attempting to set proc title to [lxc monitor] /var/lib/lxd/containers unda-elsa
lxc 20160728145100.595 INFO lxc_start - start.c:lxc_check_inherited:251 - closed inherited fd 9
lxc 20160728145100.595 INFO lxc_lsm - lsm/lsm.c:lsm_init:48 - LSM security driver AppArmor
lxc 20160728145100.596 INFO lxc_seccomp - seccomp.c:parse_config_v2:342 - processing: .reject_force_umount # comment this to allow umount -f; not recommended.
lxc 20160728145100.596 INFO lxc_seccomp - seccomp.c:parse_config_v2:446 - Adding native rule for reject_force_umount action 0
lxc 20160728145100.596 INFO lxc_seccomp - seccomp.c:do_resolve_add_rule:216 - Setting seccomp rule to reject force umounts
macvlan and straight bridging with VMWare usually won't work because of VMWare doing MAC filtering on their side. So any traffic coming from a MAC address other than the VM's.
I believe there is a flag somewhere in recent vmware to turn off the MAC filtering feature at which point things should start to work normally.
@stgraber ugh... figured it was esxi specific... spent 27 hours on this, Thanks!
To be specific for those suffering its the vswitch configuration on ESXi make it promiscuous mode
I also had this problem with a container running on a VM and it was immediately resolved by enabling promiscuous mode on the VMWare vSwitch. Thank you all of you, saved me hours no doubt!
Most helpful comment
To be specific for those suffering its the vswitch configuration on ESXi make it promiscuous mode