<p dir="ltr"><br>
oracle@g70:~ lxc config show lxdora7a</p>
<p dir="ltr">name: lxdora7a <br>
profiles: <br>
- default <br>
config: <br>
volatile.base_image: ad1d975af5bee4ef947ecca36084dbe2934277ed62e6a02c1fa60f1c902d2280<br>
volatile.eth0.hwaddr: 00:16:3e:da:03:3e <br>
volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":231072,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":231072,"Nsid":0,"Maprange":65536}]'<br>
devices: <br>
<b>eth0: </b><br>
<b>host_name: lxdora7a </b><br>
<b>name: eth0 </b><br>
<b>nictype: bridged </b><br>
<b>parent: sw1 </b><br>
<b>type: nic </b><br>
root: <br>
path: / <br>
type: disk <br>
ephemeral: false </p>
<p dir="ltr">oracle@g70:~$</p>
<p dir="ltr">How to add VLAN tagging in the lxc config file above so that the ovs switch port gets tagged when the container starts?</p>
<p dir="ltr"> I was able to manually put the VLAN tag on the port that the LXD container automatically creates when it boots using the following command after it had already booted.  </p>
<p dir="ltr">At that point, eth0 is still unconfigured even though onboot is set to YES in the ifcfg-eth0 because the VLAN 10 is not passing the traffic from the LXD container lxdora7a because of the VLAN'g.</p>
<p dir="ltr">So I ran this command to put a VLAN 10 on the port after the container had already booted:</p>
<p dir="ltr">sudo ovs-vsctl set port lxdora7a tag=10</p>
<p dir="ltr">Then I logged into the container using the lxc exec lxdora7a /bin/sh command and ran "ifup eth0" which brought up the network interface, got a dhcp address from my isc-dhcp-server and updated my DNS dynamically with the DNS IP info.  Again, not an elegant solution, but at least it gets me in business.</p>
<p dir="ltr">oracle@g70:~$ nslookup lxdora7a<br>
Server:        127.0.1.1<br>
Address:    127.0.1.1#53</p>
<p dir="ltr">Name:    <a href="http://lxdora7a.rs.com">lxdora7a.rs.com</a><br>
Address: 10.207.39.26</p>
<p dir="ltr">oracle@g70:~$ ssh root@lxdora7a<br>
root@lxdora7a's password: <br>
Last login: Tue Sep 20 18:42:36 2016 from <a href="http://stlns01.rs.com">stlns01.rs.com</a></p>
<p dir="ltr">[root@lxdora7a ~]# cat /etc/resolv.conf<br>
; generated by /usr/sbin/dhclient-script<br>
search <a href="http://rs.com">rs.com</a><br>
nameserver 10.207.39.1</p>
<p dir="ltr">[root@lxdora7a ~]# nslookup stlns01<br>
Server:        10.207.39.1<br>
Address:    10.207.39.1#53</p>
<p dir="ltr">Name:    <a href="http://stlns01.rs.com">stlns01.rs.com</a><br>
Address: 10.207.39.1</p>
<p dir="ltr">[root@lxdora7a ~]#</p>