[ovs-discuss] Port persistence after a network.service restart

Alexander Witte alexander.witte at baicanada.com
Thu Nov 22 23:11:03 UTC 2018


Quick question hopefully someone can help me out with!

Environment- OVS and KVM running in Fedora29 Desktop.

I’m creating my OVS ports programmatically via virt-install on VM creation.  (I’ve defined a libvirt network that associates some portgroups with the OVS).  This works fine and adds the ports to the OVS.  When I restart the network.service on the host, it wipes all the port configs in OVS.  Any tips on for what I can do to make these ports persistent?

Example of a virt-install command:

virt-install  -n wlc  --description "Wireless Lan Controller VM"  --os-type=Linux  --ram=4096  --vcpus=1 --cpu mode=host-passthrough  --disk device=cdrom,bus=sata --disk path=/var/lib/libvirt/qemu/wlc2.img,size=8,sparse=true,format=raw,bus=ide --network network:CentralNetwork,portgroup=mgmt,target=wlc-mgmt,model=virtio --network network:CentralNetwork,portgroup=wlc-trunk,target=wlc-trunk,model=virtio --graphics vnc,listen=,port=5901 --boot cdrom,hd

Here’s my libvirt network:

[root at lannardemo ~]# virsh net-dumpxml CentralNetwork
<network connections='5'>
  <forward mode='bridge'/>
  <bridge name='rootbridge'/>
  <virtualport type='openvswitch'/>
  <portgroup name='mgmt' default='yes'>
  <portgroup name='capwap'>
      <tag id='2'/>
  <portgroup name='wan'>
  <portgroup name='client'>
      <tag id='101'/>
  <portgroup name='wlc-trunk'>
      <tag id='2'/>

Here’s my OVS:

[root at lannardemo ~]# ovs-vsctl show
    Bridge rootbridge
        Port "enp5s0"
            Interface "enp5s0"
        Port utility-client
            tag: 101
            Interface utility-client
        Port utility-capwap
            tag: 2
            Interface utility-capwap
        Port rootbridge
            Interface rootbridge
                type: internal
        Port utility-mgmt
            Interface utility-mgmt
    ovs_version: "2.10.0"
[root at lannardemo ~]#

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20181122/e57a042a/attachment.html>

More information about the discuss mailing list