[ovs-discuss] DPDK vhost-user socket problem for QEMU
Ali Volkan Atli
Volkan.Atli at argela.com.tr
Mon Dec 7 13:43:08 UTC 2015
Hi
First, thanks for the reply. vHost-user(s) can bind to the related socket right now, but I have another problem. I followed the link (https://software.intel.com/en-us/articles/using-open-vswitch-with-dpdk-for-inter-vm-nfv-applications) and while booting a VM with Fedora-Cloud-Base-23-20151030.x86_64.qcow2 image by qemu, it gives me the following error, even so I can login the VM but and I cannot connect the VM via ssh or cannot connect to the Internet from the VM. Therefore I cannot transfer anything into the VM. By the way, I don't know it is related to the OvS DPDK or not?
Thanks in advance..
- Volkan
argela at argela-HP-Z800-Workstation:~$ sudo ovs-vsctl show
[sudo] password for argela:
0ffb784f-f54e-428c-b569-b3524a387710
Bridge "br0"
Port "br0"
Interface "br0"
type: internal
Port "dpdk0"
Interface "dpdk0"
type: dpdk
Port "vhost-user2"
Interface "vhost-user2"
type: dpdkvhostuser
Port "vhost-user1"
Interface "vhost-user1"
type: dpdkvhostuser
...
argela at argela-HP-Z800-Workstation:~/ovs_dpdk/qemu_images$ sudo qemu-system-x86_64 -m 512 -smp 4 -cpu host -hda qemu_images/Fedora-Cloud-Base-23-20151030.x86_64.qcow2 -boot c -enable-kvm -no-reboot -nographic -net nic -net user,hostfwd=tcp::10022-:22 -chardev socket,id=char1,path=/usr/local/var/run/openvswitch/vhost-user1 -netdev type=vhost-user,id=mynet1,chardev=char1,vhostforce -device virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1 -object memory-backend-file,id=mem,size=512M,mem-path=/mnt/huge_2mb,share=on -numa node,memdev=mem -mem-prealloc
...
...
Starting Initial cloud-init job (metadata service crawler)...
[ 66.669708] cloud-init[681]: Cloud-init v. 0.7.7 running 'init' at Mon, 07 Dec 2015 13:33:13 +0000. Up 65.97 seconds.
[ 66.670147] cloud-init[681]: ci-info: +++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++
[ 66.671295] cloud-init[681]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[ 66.671479] cloud-init[681]: ci-info: | Device | Up | Address | Mask | Scope | Hw-Address |
[ 66.671656] cloud-init[681]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[ 66.671835] cloud-init[681]: ci-info: | lo: | True | 127.0.0.1 | 255.0.0.0 | . | . |
[ 66.672133] cloud-init[681]: ci-info: | lo: | True | . | . | d | . |
[ 66.672409] cloud-init[681]: ci-info: | eth0: | True | . | . | . | 00:00:00:00:00:01 |
[ 66.672703] cloud-init[681]: ci-info: | eth0: | True | . | . | d | 00:00:00:00:00:01 |
[ 66.672968] cloud-init[681]: ci-info: | eth1: | False | . | . | . | 52:54:00:12:34:56 |
[ 66.673271] cloud-init[681]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[ 66.673535] cloud-init[681]: 2015-12-07 13:33:14,286 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [0/120s]: request error [('Connection aborted.', OSError(101, 'Network is unreachable'))]
[ 67.675085] cloud-init[681]: 2015-12-07 13:33:15,290 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [1/120s]: request error [('Connection aborted.', OSError(101, 'Network is unreachable'))]
...
...
[ 185.978295] cloud-init[681]: 2015-12-07 13:35:13,593 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [119/120s]: request error [('Connection aborted.', OSError(101, 'Network is unreachable'))]
[ 192.985262] cloud-init[681]: 2015-12-07 13:35:20,601 - DataSourceEc2.py[CRITICAL]: Giving up on md from ['http://169.254.169.254/2009-04-04/meta-data/instance-id'] after 126 seconds
[ 192.996385] cloud-init[681]: 2015-12-07 13:35:20,608 - DataSourceCloudSigma.py[WARNING]: failed to get hypervisor product name via dmi data
...
...
Fedora 23 (Cloud Edition)
Kernel 4.2.3-300.fc23.x86_64 on an x86_64 (ttyS0)
localhost login:
________________________________________
From: Traynor, Kevin [kevin.traynor at intel.com]
Sent: Thursday, December 03, 2015 3:36 PM
To: Ali Volkan Atli; discuss at openvswitch.org
Cc: Loftus, Ciara
Subject: RE: DPDK vhost-user socket problem for QEMU
> -----Original Message-----
> From: discuss [mailto:discuss-bounces at openvswitch.org] On Behalf Of Ali
> Volkan Atli
> Sent: Thursday, December 3, 2015 7:39 AM
> To: discuss at openvswitch.org
> Subject: [ovs-discuss] DPDK vhost-user socket problem for QEMU
>
> Hi all
>
> I followed the INSTALL and INSTALL.DPDK docs but when I try to attach a vhost
> port to QEMU VM, I'm getting the error:
>
> argela at argela-HP-Z800-Workstation:~$ sudo qemu-system-x86_64 -cpu host -
> boot c -hda qemu_images/Fedora-Cloud-Base-23-20151030.x86_64.qcow2 -snapshot
> -m 1024M -smp 2 --enable-kvm -vnc :1 -net user,hostfwd=tcp::10022-:22 -net
> nic -chardev socket,id=char0,path=/usr/local/var/run/openvswitch/vhost-user-0
> -netdev type=vhost-user,id=mynet0,chardev=char0,vhostforce -device virtio-
> net-pci,mac=00:00:00:00:00:01,netdev=mynet0 -chardev
> socket,id=char1,path=/usr/local/var/run/openvswitch/vhost-user-1 -netdev
> type=vhost-user,id=mynet1,chardev=char1,vhostforce -device virtio-net-
> pci,mac=00:00:00:00:00:02,netdev=mynet1 -object memory-backend-
> file,id=mem,size=4096M,mem-path=/dev/hugepages,share=on -numa node,memdev=mem
> -mem-prealloc
> qemu-system-x86_64: -chardev
> socket,id=char0,path=/usr/local/var/run/openvswitch/vhost-user-0: Failed to
> connect socket: Connection refused
>
> argela at argela-HP-Z800-Workstation:~$ ll
> /usr/local/var/run/openvswitch/vhost-user*
> srwxr-xr-x 1 root root 0 Ara 1 15:59
> /usr/local/var/run/openvswitch/vhost-user-0
> srwxr-xr-x 1 root root 0 Ara 1 15:59
> /usr/local/var/run/openvswitch/vhost-user-1
>
> Actually I'm getting related errors for the vhost users while starting ovs-
> vswitchd as follows
>
> argela at argela-HP-Z800-Workstation:~$ sudo ovs-vswitchd --dpdk -c 0x1 -n 4
> --socket-mem 1024,0 -- unix:$DB_SOCK --pidfile --detach
> 2015-12-03T07:08:57Z|00001|dpdk|INFO|No -vhost_sock_dir provided -
> defaulting to /usr/local/var/run/openvswitch
> ...
> VHOST_CONFIG: socket created, fd:48
> VHOST_CONFIG: fail to bind fd:48, remove
> file:/usr/local/var/run/openvswitch/vhost-user-1 and try again.
Maybe the code you are using does not have the below commit? Try
removing the file manually before re-running.
commit e04f7e4f2f574500334326dbda1bb808cf25c721
Author: Ciara Loftus <ciara.loftus at intel.com>
Date: Wed Oct 21 14:50:36 2015 +0100
netdev-dpdk: Clean-up after vHost User port delete
Unregister and delete the socket associated with a vhost-user
port when the port is deleted and/or the switch is brought down.
Do not delete the socket if the vhost-user device is still attached
to the guest.
> 2015-12-03T07:09:15Z|00021|dpdk|ERR|vhost-user socket device setup
> failure for socket /usr/local/var/run/openvswitch/vhost-user-1
> 2015-12-03T07:09:15Z|00022|dpdk|INFO|Socket
> /usr/local/var/run/openvswitch/vhost-user-1 created for vhost-user port
> vhost-user-1
> 2015-12-03T07:09:15Z|00003|dpif_netdev(pmd16)|INFO|Core 0 processing port
> 'dpdk1'
> 2015-12-03T07:09:15Z|00004|dpif_netdev(pmd16)|INFO|Core 0 processing port
> 'vhost-user-1'
> 2015-12-03T07:09:15Z|00023|bridge|INFO|bridge br0: added interface vhost-
> user-1 on port 4
> VHOST_CONFIG: socket created, fd:48
> VHOST_CONFIG: fail to bind fd:48, remove
> file:/usr/local/var/run/openvswitch/vhost-user-0 and try again.
> 2015-12-03T07:09:15Z|00024|dpdk|ERR|vhost-user socket device setup
> failure for socket /usr/local/var/run/openvswitch/vhost-user-0
> 2015-12-03T07:09:15Z|00025|dpdk|INFO|Socket
> /usr/local/var/run/openvswitch/vhost-user-0 created for vhost-user port
> vhost-user-0
> 2015-12-03T07:09:15Z|00005|dpif_netdev(pmd16)|INFO|Core 0 processing port
> 'vhost-user-0'
> 2015-12-03T07:09:15Z|00006|dpif_netdev(pmd16)|INFO|Core 0 processing port
> 'dpdk1'
> 2015-12-03T07:09:15Z|00007|dpif_netdev(pmd16)|INFO|Core 0 processing port
> 'vhost-user-1'
> 2015-12-03T07:09:15Z|00026|bridge|INFO|bridge br0: added interface vhost-
> user-0 on port 3
> ...
>
> argela at argela-HP-Z800-Workstation:~$ sudo ovs-vsctl show
> a0ba4b74-4412-45ba-a8ab-fea39afbf10f
> Bridge "br0"
> Port "vhost-user-1"
> Interface "vhost-user-1"
> type: dpdkvhostuser
> Port "dpdk0"
> Interface "dpdk0"
> type: dpdk
> Port "br0"
> Interface "br0"
> type: internal
> Port "vhost-user-0"
> Interface "vhost-user-0"
> type: dpdkvhostuser
> Port "dpdk1"
> Interface "dpdk1"
> type: dpdk
>
>
> What am I doing wrong? Thanks in advance..
>
> - Volkan
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss
More information about the discuss
mailing list