On 2015/2/4 9:38, Xu, Qian Q wrote: > 4. Launch the VM1 and VM2 with virtio device, note: you need use qemu > version>2.1 to enable the vhost-user server's feature. Old qemu such as > 1.5,1.6 didn't support it. > Below is my VM1 startup command, for your reference, similar for VM2. > /home/qemu-2.2.0/x86_64-softmmu/qemu-system-x86_64 -name us-vhost-vm1 -cpu > host -enable-kvm -m 2048 -object > memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on -numa > node,memdev=mem -mem-prealloc -smp 2 -drive file=/home/img/dpdk1-vm1.img > -chardev socket,id=char0,path=/home/dpdk-vhost/vhost-net -netdev > type=vhost-user,id=mynet1,chardev=char0,vhostforce -device > virtio-net-pci,mac=00:00:00:00:00:01, -nographic > > 5. Then in the VM, you can have the same operations as before, send packet > from virtio1 to virtio2. > > Pls let me know if any questions, issues.
Hi xie & xu When I try to start VM vhost-switch crashed. VHOST_CONFIG: read message VHOST_USER_SET_MEM_TABLE VHOST_CONFIG: mapped region 0 fd:19 to 0xffffffffffffffff sz:0xa0000 off:0x0 VHOST_CONFIG: mmap qemu guest failed. VHOST_CONFIG: read message VHOST_USER_SET_VRING_NUM VHOST_CONFIG: read message VHOST_USER_SET_VRING_BASE VHOST_CONFIG: read message VHOST_USER_SET_VRING_ADDR run_dpdk_vhost.sh: line 19: 1854 Segmentation fault ${RTE_SDK}/examples/vhost/build/app/vhost-switch -c 0x300 -n 4 --huge-dir /dev/hugepages -m 2048 -- -p 0x1 --vm2vm 2 --mergeable 0 --zero-copy 0 -- Regards, Haifeng