Macvlan Not Working for LXC centos/8 Container

Hi,

I’ve tried to spin up Centos/8 lxc container with profile using macvlan,however container is not getting assigned with any IP’s,Please note the same works well for Centos/7 containers.

below is my profile details:

description: Macvlan LXD profile
devices:
eth0:
name: eth0
nictype: macvlan
parent: ens33
type: nic
projects:
path: /data
source: /data
type: disk
root:
path: /
pool: newstorage
type: disk
name: new
used_by:

Is this expected behavior ?

Any help on this will be appreciated

@simos : can you please help on this ?

Is that inside a VM or something?

Those kind of macvlan failures are usually either because the underlying network performs MAC filtering and so just blocks the traffic or the NIC driver not properly implementing macvlan.

Thanks for your reply.

Well… Below is my setup

HostMachine :- Ubuntu 18:04 running on VMWare.
when i spin up centos/7 image it works well it is taking IP,however if it is centos/8 image it is not.
I wonder if there is any additional setting required for centos/08 in profile level?

Here is what am trying:

lxc launch -p macvlan images:centos/8 elk1
lxc launch -p macvlan images:centos/7 elk2

Below are the results,I’m using the same profile which i’ve mentioned in earlier post.

Below for Centos/7 with IP

image

Below for Centos/8 without IP

image

How can i sort this out? as i need centos/8 container with Macvlan,Any help will be appreciated.

Thanks in advance!

Hi!

It varies depending on whether you use VMware, virtual box, hyperv, KVM. Your case is with VMware.

I have tried with virtualbox. I had to enable Promiscuous mode in the settings. And also set the host’s interface to “promisc”. Then, it worked.

A user reported that it worked with VMware at https://blog.simos.info/how-to-make-your-lxd-container-get-ip-addresses-from-your-lan/

Also see this post regarding a similar issue Containers without connection

Thanks for your reply.

I will try with Virtualbox,however my question still remains the same.

if centos/7 container is able to fetch macvlan IP why NOT centos/8 given am running both container in same VM?

am i missing something?

@Subham_mandal I’m not sure, you’re best bet is to start some network traces on the VM host and inside the container and see what is happening with the DHCP requests: are they making it out from the container to the VM host, do they get replies?

I just noticed that you mention a change between Centos 7 and 8, working only the former.
Therefore disregard me suggesting to switch VM. If it works in one version of the distro, then it is a regression when it does not work on another version.

would you mind trying this once in VMWare and advise if i’m missing any config,i will be happy to provide more info if it demands.

Thanks in advance!

@simos : May i know if you had sometime and tried this? I still dint get this working.

Thanks,
Subham