<div dir="ltr">Some added color... The interfaces are defined in Quantum and they have MAC addresses generated... They just don't make it into the nova-compute generated libvirt.xml.  There seems to be other stuff missing to, like the bridge name. Is that supposed to be blank?<div>

<br></div><div>From the nova-compute.log<div><br></div><div><div><font face="courier new, monospace">2013-03-01 10:48:48 DEBUG nova.compute.manager [req-35d0301e-ef44-4151-bfc4-9be13202e9c9 de223767529242ac85635b3863f6154b 33c19bf6b3c848f2842465ee27ef835f] [instance: 1466c180-2e03-4479-9fdb-2fe16201b516] </font></div>

<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">Instance network_info: |</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">[</font></div>

<div><font face="courier new, monospace">VIF({'network': Network({'bridge': '', 'subnets': [], 'meta': {'injected': False, 'tenant_id': u'c035fb76ea664bd59e9f64405933f105'}, 'id': u'19af012e-fa1e-4fc2-aac8-7611ef33428b', 'label': u'VLAN4'}), 'meta': {}, 'id': u'46f861de-6019-44cd-8835-a3044b2cac87', 'address': u'fa:16:3e:fc:95:21'}), </font></div>

<div><font face="courier new, monospace">VIF({'network': Network({'bridge': '', 'subnets': [], 'meta': {'injected': False, 'tenant_id': u'c035fb76ea664bd59e9f64405933f105'}, 'id': u'28310262-bcb3-43b9-8366-f31f5ac7a990', 'label': u'VLAN1'}), 'meta': {}, 'id': u'8f17842d-2331-47de-bfad-6d6e5acd45f6', 'address': u'fa:16:3e:37:2b:d8'}), </font></div>

<div><font face="courier new, monospace">VIF({'network': Network({'bridge': '', 'subnets': [], 'meta': {'injected': False, 'tenant_id': u'c035fb76ea664bd59e9f64405933f105'}, 'id': u'788bd827-5ba1-4b0f-99b4-e98040c9730d', 'label': u'VLAN2'}), 'meta': {}, 'id': u'721175a2-1021-4747-a7a1-1ef7a0ea92bb', 'address': u'fa:16:3e:12:ba:2b'}), </font></div>

<div><font face="courier new, monospace">VIF({'network': Network({'bridge': '', 'subnets': [], 'meta': {'injected': False, 'tenant_id': u'c035fb76ea664bd59e9f64405933f105'}, 'id': u'be859d44-1d16-4923-b33b-c5dc292cc68f', 'label': u'VLAN3'}), 'meta': {}, 'id': u'c39065d4-729b-484b-bcff-e7fa06e1f814', 'address': u'fa:16:3e:70:54:a7'})</font></div>

<div><font face="courier new, monospace">]</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">| _allocate_network /usr/lib/python2.7/dist-packages/nova/compute/manager.py:719</font></div>

</div><div><br></div><div><font face="courier new, monospace"><div>2013-03-01 10:48:49 DEBUG nova.virt.libvirt.config [req-35d0301e-ef44-4151-bfc4-9be13202e9c9 de223767529242ac85635b3863f6154b 33c19bf6b3c848f2842465ee27ef835f] Generated XML <domain type="kvm"></div>

<div>  <uuid>1466c180-2e03-4479-9fdb-2fe16201b516</uuid></div><div>  <name>instance-0000000d</name></div><div>  <memory>524288</memory></div><div>  <vcpu>1</vcpu></div><div>

  <os></div><div>    <type>hvm</type></div><div>    <boot dev="hd"/></div><div>  </os></div><div>  <features></div><div>    <acpi/></div><div>  </features></div><div>

  <clock offset="utc"></div><div>    <timer name="pit" tickpolicy="delay"/></div><div>    <timer name="rtc" tickpolicy="catchup"/></div><div>  </clock></div>

<div>  <cpu mode="host-model" match="exact"/></div><div>  <devices></div><div>    <disk type="file" device="disk"></div><div>      <driver name="qemu" type="qcow2" cache="none"/></div>

<div>      <source file="/var/lib/nova/instances/instance-0000000d/disk"/></div><div>      <target bus="virtio" dev="vda"/></div><div>    </disk></div><div>    <serial type="file"></div>

<div>      <source path="/var/lib/nova/instances/instance-0000000d/console.log"/></div><div>    </serial></div><div>    <serial type="pty"/></div><div>    <input type="tablet" bus="usb"/></div>

<div>    <graphics type="vnc" autoport="yes" keymap="en-us" listen="0.0.0.0"/></div><div>  </devices></div><div></domain></div><div>  to_xml /usr/lib/python2.7/dist-packages/nova/virt/libvirt/config.py:66</div>

</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"><br></font></div><div style><font face="arial, helvetica, sans-serif">John Gruber</font></div></div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Fri, Mar 1, 2013 at 12:58 PM, John Gruber <span dir="ltr"><<a href="mailto:john.t.gruber@gmail.com" target="_blank">john.t.gruber@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">I'm installing nova and quantum in an environment where L3 routing and DHCP are handled by other devices on a provider network for specific VLANs. I don't want the service of the quantum-l3 or quantum-dhcp agents, as there services are handled by external devices.<div>


<br></div><div>Nova compute is setup to use:</div><div><font face="courier new, monospace">libvirt_type=kvm<br></font></div><div><div><font face="courier new, monospace">libvirt_ovs_bridge=br-int</font></div>
<div><font face="courier new, monospace">libvirt_vif_type=ethernet</font></div><div><font face="courier new, monospace">libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver</font></div><div><font face="courier new, monospace">libvirt_use_virtio_for_bridges=True</font></div>


</div><div><br></div><div>I am using the OVS plugin for Quantum Folsom.  Here is the OVS section of my ovs_quantum_plugin.ini file.</div><div><br></div><div><div><font face="courier new, monospace">[OVS]</font></div>
<div><font face="courier new, monospace">tenant_network_type = vlan</font></div><div><font face="courier new, monospace">network_vlan_ranges = physnet1:1:4,physnet1:60:64</font></div><div><font face="courier new, monospace">bridge_mappings = physnet1:br-eth2</font></div>


<div><br></div><div>The output of ovs-vsctl show looks like the following:</div><div><br></div><div><div><font face="courier new, monospace">efbab661-98dd-46b3-b5c1-e234c3afac8e</font></div><div><font face="courier new, monospace">    Bridge "br-eth2"</font></div>


<div><font face="courier new, monospace">        Port "phy-br-eth2"</font></div><div><font face="courier new, monospace">            Interface "phy-br-eth2"</font></div><div><font face="courier new, monospace">        Port "br-eth2"</font></div>


<div><font face="courier new, monospace">            Interface "br-eth2"</font></div><div><font face="courier new, monospace">                type: internal</font></div><div><font face="courier new, monospace">        Port "eth2"</font></div>


<div><font face="courier new, monospace">            Interface "eth2"</font></div><div><font face="courier new, monospace">    Bridge br-int</font></div><div><font face="courier new, monospace">        Port br-int</font></div>


<div><font face="courier new, monospace">            Interface br-int</font></div><div><font face="courier new, monospace">                type: internal</font></div><div><font face="courier new, monospace">        Port "int-br-eth2"</font></div>


<div><font face="courier new, monospace">            Interface "int-br-eth2"</font></div><div><font face="courier new, monospace">    ovs_version: "1.4.0+build0"</font></div><div><br></div></div><div>


Interface eth2 is a VLAN trunk.  I can manually create ports in OVS and then add link and ip address for VLANs 1-4,60-64 verifying connectivity. </div><div><br></div><div>I run the following commands to setup the logical network:</div>


<div><br></div><div><div><font face="courier new, monospace">quantum net-create VLAN1 --router:external=True --shared --provider:network_type=vlan --provider:physical_network=physnet1 --provider:segmentation_id=1</font></div>


<div><font face="courier new, monospace">quantum net-create VLAN2 --router:external=True --shared --provider:network_type=vlan --provider:physical_network=physnet1 --provider:segmentation_id=2</font></div><div><font face="courier new, monospace">quantum net-create VLAN3 --router:external=True --shared --provider:network_type=vlan --provider:physical_network=physnet1 --provider:segmentation_id=3</font></div>


<div><font face="courier new, monospace">quantum net-create VLAN4 --router:external=True --shared --provider:network_type=vlan --provider:physical_network=physnet1 -- provider:segmentation_id=4</font></div></div><div>
<br></div><div><div>quantum net-list show:</div><div><br></div><div><font face="courier new, monospace">+--------------------------------------+-------+---------+</font></div><div><font face="courier new, monospace">| id                                   | name  | subnets |</font></div>


<div><font face="courier new, monospace">+--------------------------------------+-------+---------+</font></div><div><font face="courier new, monospace">| 19af012e-fa1e-4fc2-aac8-7611ef33428b | VLAN4 |         |</font></div>


<div><font face="courier new, monospace">| 28310262-bcb3-43b9-8366-f31f5ac7a990 | VLAN1 |         |</font></div><div><font face="courier new, monospace">| 788bd827-5ba1-4b0f-99b4-e98040c9730d | VLAN2 |         |</font></div>


<div><font face="courier new, monospace">| be859d44-1d16-4923-b33b-c5dc292cc68f | VLAN3 |         |</font></div><div><font face="courier new, monospace">+--------------------------------------+-------+---------+</font></div>


<div><br></div></div><div>If I create a guest instance with networks VLAN1, VLAN2, VLAN3, VLAN4, connected, but my nova created libvirtl.xml contains no entries for network interfaces at all. The VM boots without NICs.<br>


</div><div><br></div><div>However if I add:</div><div><br></div><div><div><font face="courier new, monospace">quantum subnet-create VLAN1 --gateway 10.0.0.1 <a href="http://10.0.0.0/24" target="_blank">10.0.0.0/24</a> -- --enable_dhcp=False</font></div>


<div><font face="courier new, monospace">quantum subnet-create VLAN2 --gateway 10.0.1.1 <a href="http://10.0.1.0/24" target="_blank">10.0.1.0/24</a> -- --enable_dhcp=False</font></div><div><font face="courier new, monospace">quantum subnet-create VLAN3 --gateway 10.0.2.1 <a href="http://10.0.2.0/24" target="_blank">10.0.2.0/24</a> -- --enable_dhcp=False</font></div>


<div><font face="courier new, monospace">quantum subnet-create VLAN4 --gateway 10.0.3.1 <a href="http://10.0.3.0/24" target="_blank">10.0.3.0/24</a> -- --enable_dhcp=False</font></div></div><div><br></div><div>Thus making quantum net-list show:</div>


<div><br></div><div><div><font face="courier new, monospace">+--------------------------------------+-------+--------------------------------------+</font></div><div><font face="courier new, monospace">| id                                   | name  | subnets                              |</font></div>


<div><font face="courier new, monospace">+--------------------------------------+-------+--------------------------------------+</font></div><div><font face="courier new, monospace">| 19af012e-fa1e-4fc2-aac8-7611ef33428b | VLAN4 | a451a6ad-ff4d-40e2-8a8a-2582bfd5a3ed |</font></div>


<div><font face="courier new, monospace">| 28310262-bcb3-43b9-8366-f31f5ac7a990 | VLAN1 | 98c42f7e-15e3-4c9b-b323-54346086bfd4 |</font></div><div><font face="courier new, monospace">| 788bd827-5ba1-4b0f-99b4-e98040c9730d | VLAN2 | e022730c-b0f7-4158-b8ef-e56da0ceb227 |</font></div>


<div><font face="courier new, monospace">| be859d44-1d16-4923-b33b-c5dc292cc68f | VLAN3 | 1b68886a-a693-4039-813b-23d085bb43d2 |</font></div><div><font face="courier new, monospace">+--------------------------------------+-------+--------------------------------------+</font></div>


<div><br></div></div><div>My generated libvirt.xml has NICs, but I'm stuck with allocation pools.. which I don't want or need. Also the interfaces seem to be bridged only to the integration bridge in OVS. </div>
<div><br></div><div>Q1) The <span style="font-family:'courier new',monospace">nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver </span><font face="arial, helvetica, sans-serif">driver is one of many that say 'deprecated' in the source code. What should I be using?  Just the generic?</font></div>


<div><font face="arial, helvetica, sans-serif">Q2) How do I have provider networks which are VLAN tagged by OVS, have no Quantum subnet assigned, yet will have nova-compute define vifs properly?</font></div><div>
<font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Thanks for your help in advance,</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div>
<div><font face="arial, helvetica, sans-serif">John Gruber</font></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div>
</blockquote></div><br></div>