• >>>>>>>> [ovs][libvirt] virt-xml ovs-vsctl


    查看可用的参数:

    [root@vrouter1 tong]#  virt-xml --add-device --network=? |grep source
      source
      source_mode
      source_path
      source_type
    [root@vrouter1 tong]# 

    添加两个vhostuser的网卡

    [root@vrouter1 ~]# virt-xml --add-device --network type=vhostuser,model=virtio,source_type=unix,source_mode=server,source_path="/tmp/nlb_vm0.sock" centos7.0
    Domain 'centos7.0' defined successfully.
    [root@vrouter1 ~]# virt-xml --add-device --network type=vhostuser,model=virtio,source_type=unix,source_mode=server,source_path="/tmp/nlb_vm1.sock" centos7.0
    Domain 'centos7.0' defined successfully.
    [root@vrouter1 ~]# 

    删除所有类型为bridge的网卡

    [root@vrouter1 ~]# virt-xml --remove-device --network type=bridge centos7.0
    Domain 'centos7.0' defined successfully.
    [root@vrouter1 ~]# 

    设置OVS-dpdk

    [root@vrouter1 ~]# ovs-vsctl add-br ovs-br0
    ovs-vsctl: Error detected while setting up 'ovs-br0'.  See ovs-vswitchd log for details.
    ovs-vsctl: The default log directory is "/var/log/openvswitch".
    [root@vrouter1 ~]# ovs-vsctl set bridge ovs-br0 datapath_type=netdev

    设置 vhostuser port

    [root@vrouter1 ~]# ovs-vsctl add-port ovs-br0 vhostclient0 -- set Interface vhostclient0 type=dpdkvhostuserclient options:vhost-server-path=/tmp/nlb_vm0.sock

    编译qemu

    ./configure --prefix=/export/Datapath/tong/qemu_home/ --target-list=x86_64-softmmu --disable-gtk 

    设置ovs-dpdk port

    
    

    [root@vrouter1 ~]# dpdk-devbind -b vfio-pci eth0

    [root@vrouter1 ~]# ovs-vsctl add-port ovs-br0 pci_port1 -- set Interface pci_port1 type=dpdk options:dpdk-devargs=0000:03:00.1

    root@vrouter1 ~# ovs-vsctl add-br ovs-phy -- set bridge ovs-phy datapath_type=netdev
    [root@vrouter1 ~]# ovs-vsctl add-port ovs-br0 vxlantarget1 -- set interface vxlantarget1 type=vxlan options:remote_ip=192.168.77.200 options:local_ip=10.0.0.161 options:in_key=flow options:out_key=flow
    [root@vrouter1 ~]# ovs-vsctl add-port ovs-br0 vxlanclient1 -- set interface vxlanclient1 type=vxlan options:remote_ip=192.168.77.163 options:local_ip=10.0.0.161 options:in_key=flow options:out_key=flow
    [root@vrouter1 ~]# ovs-ofctl -O openflow13 del-flows ovs-br0
  • 相关阅读:
    常用命令收集
    wireshark 实用过滤表达式(针对ip、协议、端口、长度和内容)
    Wireshark找不到网络接口问题
    带卡扣的网卡接口使用小Tips,大家注意插拔网线的手法啊!
    HOW TO BE SINGLE 最后那段的摘录
    github常见操作和常见错误!错误提示:fatal: remote origin already exists.
    关于工伤事故索赔计算很好用的一款APP
    MySQL文件目录格式及存放位置
    如何取消win10电脑自动更新
    推荐!手把手教你使用Git
  • 原文地址:https://www.cnblogs.com/hugetong/p/8992692.html
Copyright © 2020-2023  润新知