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