ovs-dpdk + qemu 使用vhostuserclient通信,连路不通,libvirt报错如下:

  -- ::37.265+: starting up libvirt version: 3.2., package: .el7_4. (CentOS BuildSystem <http://bugs.centos.org>, 2018-03-07-13:51:24, x86-01.bsys.centos.org), qemu version: 2.9.0, hostna
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=none /export/Datapath/tong/qemu_home/bin/qemu-system-x86_64 -name guest=centos7.,debug-threads=on -S -object secret,id=master
--04T13::.295614Z qemu-system-x86_64: -chardev socket,id=charnet1,path=/tmp/nlb_vm0.sock,server: QEMU waiting for connection on: disconnected:unix:/tmp/nlb_vm0.sock,server
--04T13::.808975Z qemu-system-x86_64: -chardev socket,id=charnet2,path=/tmp/nlb_vm1.sock,server: QEMU waiting for connection on: disconnected:unix:/tmp/nlb_vm1.sock,server
--04T13::.809417Z qemu-system-x86_64: -chardev pty,id=charserial0: char device redirected to /dev/pts/ (label charserial0)
--04T13::.706248Z qemu-system-x86_64: Failed initializing vhost-user memory map, consider using -object memory-backend-file share=on
--04T13::.706284Z qemu-system-x86_64: vhost_set_mem_table failed: Interrupted system call ()
--04T13::.706421Z qemu-system-x86_64: unable to start vhost net: : falling back on userspace virtio
--04T13::.708417Z qemu-system-x86_64: Failed initializing vhost-user memory map, consider using -object memory-backend-file share=on
--04T13::.708436Z qemu-system-x86_64: vhost_set_mem_table failed: Resource temporarily unavailable ()
--04T13::.708558Z qemu-system-x86_64: unable to start vhost net: : falling back on userspace virtio
--04T13::.734457Z qemu-system-x86_64: terminating on signal from pid (/usr/sbin/libvirtd)

在libvirt的xml里增加一行:

        <cpu mode='host-passthrough' check='none'>
<topology sockets='' cores='' threads=''/>
<numa>
<cell id='' cpus='0-7' memory='' unit='KiB' memAccess='shared'/>
</numa>
</cpu>

对应的qemu命令增加了:

 -object memory-backend-file,id=ram-node0,prealloc=yes,mem-path=/dev/hugepages/libvirt/qemu/-centos7.,share=yes,size= -

排障成功。

参考:

http://docs.openvswitch.org/en/latest/topics/dpdk/vhost-user/

In addition, QEMU must allocate the VM’s memory on hugetlbfs. vhost-user ports access a virtio-net device’s 
virtual rings and packet buffers mapping the VM’s physical memory on hugetlbfs. To enable vhost-user ports
to map the VM’s memory into their process address space, pass the following parameters to QEMU:
-object memory-backend-file,id=mem,size=4096M,mem-path=/dev/hugepages,share=on
-numa node,memdev=mem -mem-prealloc

https://libvirt.org/formatdomain.html#elementsNUMATuning

最新文章

  1. Prometheus 系统监控方案 二 安装与配置
  2. SQL Like模糊查询一些小知识
  3. (转)DES、RSA、MD5、SHA、随机生成加密与解密
  4. PHP搭建OAuth2.0
  5. Android Studio 解决方法No JVM installation found. Please install a 64-bit JDK.
  6. 由动态库文件dll生成lib库文件(手动生成.def文件,然后使用lib命令编译,非常牛),同理可使用dll生成.a库文件
  7. iOS 10 / Swift 3.0 / XCode 8 总结
  8. Gentoo挂载ntfs的NTFS分区
  9. JavaScript 逗号表达式
  10. ejabberd mod_echo 解析
  11. 结合JDK源码看设计模式——观察者模式
  12. SSH(Struts+spring+hibernate)配置
  13. Kotlin 检查空类型
  14. 微信退款回调AES算法(AES-256-ECB)
  15. Java开发面试题,3年工作经验的Java程序员面试经
  16. Tampermonkey脚本属性
  17. ThinkPHP5.0源码学习之注册自动加载
  18. BZOJ4237 JOISC2014 稻草人 CDQ分治、单调栈
  19. AtCoder Regular Contest 067 F - Yakiniku Restaurants
  20. Maven入门---修改tomcat版本及端口及访问路径(四)

热门文章

  1. 微信小程序-开心大转盘(圆盘指针)代码分析
  2. json简介及JsonCpp用法
  3. 基于Docker的redis集群搭建
  4. linux下为目录和文件设置权限
  5. 【emWin】例程二十:窗口对象——Dropdown
  6. Cordova开发App入门之创建android项目
  7. 快播王欣发布匿名IM社交软件“马桶MT”
  8. Linux下使用vim命令编辑与修改文本内容
  9. 集群介绍 keepalived介绍 用keepalived配置高可用集群
  10. MAC下Myeclipse SVN插件安装