Skip to contentSkip to conversation

problem in setting up vmchannel with libvirt

Qemu-devel will 2 participants 2 messages Nov 29, 2011

lore
Share & tools
lore

will

author
#0 lore raw

Hi,
I am trying to set up vmchannel between the host and guest os.

However, "sudo virsh start vm1" always gave me this error:
*************************************************************
error: Failed to start domain vm1
error: internal error Process exited while reading console log output: char device redirected to /dev/pts/5
bind(unix:/tmp/foo): Permission denied
chardev: opening backend "socket" failed
*************************************************************

Related xml is:
*************************************************************
<channel type='unix'>
<source mode='bind' path='/tmp/foo'/>
<target type='virtio' name='channel.port.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
*************************************************************

I can succeed while I manually run the guest os by:
*************************************************************
sudo kvm -device virtio-serial \
-chardev socket,path=/tmp/foo,server,nowait,id=foo \
-device virtserialport,chardev=foo,name=org.fedoraproject.port.0\
/path/to/vm1.img
*************************************************************

I also noticed that libvirt is able to create socke /var/lib/libvirt/qemu/vm1.monitor every time. I can't win even I change the unix socket path to "/var/lib/libvirt/qemu/foo"

Any information will be appreciated!

#1 lore raw
Quoted 29 lines · will

Hi,
I am trying to set up vmchannel between the host and guest os.

However, "sudo virsh start vm1" always gave me this error:
*************************************************************
error: Failed to start domain vm1
error: internal error Process exited while reading console log output: char device redirected to /dev/pts/5
bind(unix:/tmp/foo): Permission denied
chardev: opening backend "socket" failed
*************************************************************

Related xml is:
*************************************************************
<channel type='unix'>
<source mode='bind' path='/tmp/foo'/>
<target type='virtio' name='channel.port.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
*************************************************************

I can succeed while I manually run the guest os by:
*************************************************************
sudo kvm -device virtio-serial \

(quoted diff) +0 -2
-chardev socket,path=/tmp/foo,server,nowait,id=foo \
-device virtserialport,chardev=foo,name=org.fedoraproject.port.0\

/path/to/vm1.img
*************************************************************

Quoted 8 lines

I also noticed that libvirt is able to create socke /var/lib/libvirt/qemu/vm1.monitor every time. I can't win even I change the unix socket path to "/var/lib/libvirt/qemu/foo"

Any information will be appreciated!

Try the libvirt-users list for questions like this one:

[email protected]

Dave