Ask Your Question

Openstack vhostuser support

asked 2019-03-04 06:35:15 -0500

hudac gravatar image

I want to add ovs-dpdk vhostuser support for openstack installation.
I have one controller node and one compute node.

According to (this site), After installing and configuring ovs-dpdk, the way for adding a vhostuser vnic is:

Create and add vhost-user network interfaces to instances in the same fashion as conventional interfaces.

What way is this? I don't understand this line.
How can I create a vhostuser network / vnic openstack-compatible ?

Eventually I have a port vhostuserclient1:

# ovs-vsctl show
    Bridge "br0_dpdk"
        Port "vhostuserclient1"
            Interface "vhostuserclient1"
                type: dpdkvhostuserclient
                options: {n_rxq="2", vhost-server-path="/var/run/dpdkvhostuserclient1"}

How can I attach it specifically to an instance, with openstack compatible commands? Or at least virsh commands.


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-03-05 05:47:12 -0500

hudac gravatar image

I was able to add vhostuserclientport directly to a VM.

  1. There was a problem with apparmor, I had to give it rw access to the place I wanted to create the vhost socket.
    For example, this is how I did it. I'm sure there's a better way:
    Add these two lines to /etc/apparmor.d/libvirt/libvirt-f80091e1-f0d1-412b-a58a-e1c25be3d4f8.files
    "/run/" rwk,
    " rwk,
    apparmor_parser -r /etc/apparmor.d/libvirt/libvirt-f80091e1-f0d1-412b-a58a-e1c25be3d4f8
  2. Create the xml

        <interface type='vhostuser'>
          <mac address='00:00:00:00:00:01'/>
          <source type='unix' path='/var/run/dpdkvhostuserclient0' mode='server'/>
          <model type='virtio'/>
          <driver queues='2'/>
  3. Attach it to the vm

    virsh attach-device --domain instance-00000084 --live --config --file vhostuserclient0.xml

BTW. /var/run/dpdkvhostuserclient0 is from creating the port (and first the bridge)

ovs-vsctl add-br br0_dpdk -- set bridge br0_dpdk datapath_type=netdev
ovs-vsctl add-port br0_dpdk vhostuserclient0 -- set Interface vhostuserclient0 type=dpdkvhostuserclient options:vhost-server-path=/var/run/dpdkvhostuserclient0 ofport_request=1

1. I don't understand how I get ovs-dpdk implementation for "free". Normal traffic between the vms stay low
2. This is using ovs-vsctl - how do I do that in the formal openstack way?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2019-03-04 06:35:15 -0500

Seen: 24 times

Last updated: Mar 05