[libvirt-users] serial console (another problem)

david at dit.upm.es david at dit.upm.es
Thu May 10 16:56:25 UTC 2012


I also have some problems related to serial consoles. When I try to create
a virtual machine (virsh create test.xml) with a serial port connected to
a unix socket in the host by using:

    <serial type="unix">
      <source mode="bind" path="/tmp/.vnx/simple_ubuntu/ubuntu_socket"/>
      <target port="1"/>

(see the complete XML below)

I get this error:

error: Failed to create domain from test.xml
error: internal error Process exited while reading console log output:
char device redirected to /dev/pts/3
bind(unix:/tmp/.vnx/simple_ubuntu/ubuntu_socket): Permission denied
chardev: opening backend "socket" failed: Permission denied

(I've executed libvirt in debug mode, but I've not seen any relevant
traces related to the problem)

This problem arises only when I try over an Ubuntu system with libvirt
installed as a package. When I try it over the same system with libvirt
manually installed, it works.

Latest tests have been made over a Ubuntu 12.04 system with apparmor
disabled using libvirt 0.9.8 as package or manually compiled with standard
configure options. But, I also made tests with other Ubuntu and libvirt
versions and the result is similar.

Any idea about how to solve the problem or a workaround will be highly

Best regards,

David Fernández
Universidad Politécnica de Madrid
Virtual Networks over linuX (VNX)

test.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<domain type="kvm" xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0">
    <type arch="i686" machine="pc">hvm</type>
    <boot dev='hd'/>
  <clock sync="localtime"/>
    <disk type='file' device='disk'>
      <source file='/usr/share/vnx/filesystems/rootfs_ubuntu'/>
      <target dev='hda'/>
      <driver name="qemu" type="qcow2"/>
    <serial type="unix">
      <source mode="bind" path="/tmp/.vnx/simple_ubuntu/ubuntu_socket"/>
      <target port="1"/>
    <graphics type='vnc'/>

More information about the libvirt-users mailing list