On Thu, Nov 26, 2015 at 11:26 AM, Aaron Conole <acon...@redhat.com> wrote:

> Ryan Yang <toryan...@gmail.com> writes:
> > On Wed, Nov 25, 2015 at 10:53 PM, Aaron Conole <acon...@redhat.com>
> wrote:
> >
> >> Ryan Yang <toryan...@gmail.com> writes:
> >> > Hello All,
> >> >
> >> > I am trying to connect to vhost-user socket created on openvswitch
> with
> >> > DPDK but kept receiving following error:
> >> >
> >> > error: internal error: process exited while connecting to monitor:
> >> > 2015-11-25T19:19:02.192794Z qemu-kvm: -chardev
> >> > socket,id=charnet2,path=/usr/local/var/run/openvswitch/vhost-user-1:
> >> Failed
> >> > to connect to socket: Permission denied
> >> > 2015-11-25T19:19:02.193226Z qemu-kvm: -chardev
> >> > socket,id=charnet2,path=/usr/local/var/run/openvswitch/vhost-user-1:
> >> > chardev: opening backend "socket" failed
> >> >
> >> > I already made sure that the user and group are both root since I am
> >> using
> >> > root privilege and also have vhost-user socket created:
> >>
> >> Just to make sure, you qemu is running as root, too?
> >>
> >
> > Yes, I am running it as root.
> >
> >>
> >> > srwxr-x---. 1 root root    0 Nov 25 09:02 capabilities.monitor.sock
> >> > drwxr-xr-x. 3 root root 4096 Nov 25 10:05 channel
> >> > drwxrwxrwx. 2 root root 4096 Nov 17 21:35 dump
> >> > drwx--x--x. 2 root root 4096 Nov  3 21:59 nvram
> >> > drwxr-xr-x. 2 root root 4096 Nov 17 21:35 save
> >> > drwxr-xr-x. 2 root root 4096 Nov 17 21:35 snapshot
> >> > [root@localhost qemu]# pwd
> >> > /var/lib/libvirt/qemu
> >> > [root@localhost qemu]#
> >> >
> >> > -rw-r--r--. 1 root root      6 Nov 25 07:07 ovs-vswitchd.pid
> >> > -rw-r--r--. 1 root root 197120 Nov 25 07:18 vdisk.img
> >> > srwxr-xr-x. 1 root root      0 Nov 26 02:11 vhost-user-1
> >> > [root@localhost openvswitch]#
> >>
> >> If I read this right, you have a vhost socket in /var/lib/libvirt/qemu,
> >> but according to the following:
> >>
> >
> >  Sorry forgot to print the path, it's in /usr/local/var/run/openvswitch.
> >
> >>
> >> > And following is the XML that I manually added for vhost-user
> interface
> >> > creation:
> >> >
> >> > <interface type='vhostuser'>
> >> >       <source type='unix'
> >> > path='/usr/local/var/run/openvswitch/vhost-user-1' modd
> >> > e='client'/>
> >> >       <mac address='52:54:00:02:d9:01'/>
> >> >       <model type='virtio'/>
> >> >     </interface>
> >>
> >> You've said that the vhost socket is in /usr/local/var/run/openvswitch?
> >> Yes.
>
> I noticed your xml (I've reformatted it) says:
> <source type='unix'
>         path='/usr/local/var/run/openvswitch/vhost-user-1'
>         modde='client'/>
>
> One property I see is modde, is that a typo from transferring to your
> mail client?
>
> Here's a working example I have (for reference):
>
> <interface type='vhostuser'>
>     <mac address='52:54:00:e7:b6:8d'/>
>     <source type='unix' path='/var/run/openvswitch/vhost-user-1'
> mode='client'/>
>     <model type='virtio'/>
>     <address type='pci' domain='0x0000' bus='0x00' slot='0x06'
> function='0x0'/>
> </interface>
>
> I don't think that the <address ../> tag is needed.
>
> The mode is okay because it is caused because of accessing terminal via
console, and the address tag is also appended after saving the config.

Another question is that, when I do 'virsh start', it actually executes
qemu-kvm but not qemu-system-x86_64, does it matter?
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to