Bug 593577 - map serial port throws "chardev: opening backend "tty" failed"
Summary: map serial port throws "chardev: opening backend "tty" failed"
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-19 08:20 UTC by Angel Abad
Modified: 2016-03-21 00:10 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-03-21 00:10:02 UTC

Attachments (Terms of Use)

Description Angel Abad 2010-05-19 08:20:49 UTC
In Ubuntu Otto Berger reported:

after updating from karmic to lucid, starting a virtual machine with a serial port throws an error and failed to start. if i remove the serial port (/dev/ttyS14) the machine start successfully...

log entry:
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc-0.11 -enable-kvm -m 2048 -smp 1,sockets=1,cores=1,threads=1 -name web2 -uuid 17c99639-2299-ce13-c1b6-c7a627dd181e -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/web2.monitor,server,nowait -mon chardev=monitor,mode=readline -rtc base=utc -boot c -drive file=/dev/vmdata/web2,if=none,id=drive-virtio-disk0,boot=on -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -device virtio-net-pci,vlan=0,id=net0,mac=52:54:00:68:45:ab,bus=pci.0,addr=0x5 -net tap,fd=39,vlan=0,name=hostnet0 -chardev tty,id=serial0,path=/dev/ttyS14 -device isa-serial,chardev=serial0 -usb -vnc -k de -vga cirrus -device ES1370,id=sound0,bus=pci.0,addr=0x6 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
chardev: opening backend "tty" failed

You can see logs and configs in

Launchpad ref: https://bugs.edge.launchpad.net/libvirt/+bug/578527


Comment 1 Jamie Strandboge 2010-06-10 17:01:01 UTC
So, this turned out to be an AppArmor issue. I'll be updating the example profile and submit a patch to the mailing list during my next iteration.

Comment 2 Juan Antonio Martinez 2010-06-14 09:46:23 UTC
Confirm bug in Fedora 13

If I remove all serial and parallel ports on virtual machine, I runs fine.
once started and stopped, add serial port again and problem is over

Tested with Windows XP SP3 as guest system

Comment 3 Konstantin Zemlyak 2011-07-01 06:51:38 UTC
This bug is fixed in http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=2e5e614e6b3b7407fe8741ab1a44ac323c0262e4 and present in fedora's libvirt now. So comment 2 is most likely about bug 596553

Comment 4 Cole Robinson 2016-03-21 00:10:02 UTC
Closing per Comment #3

Note You need to log in before you can comment on or make changes to this bug.