Bug 635328

Summary: error starting SDL guest w/o selinux: failed to retrieve chardev info in qemu with 'info chardev'
Product: [Fedora] Fedora Reporter: Anderson Silva <ansilva>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 14CC: amcnabb, berrange, bos, cfeller, clalance, crobinso, hbrock, itamar, jforbes, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-24 16:50:54 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
selinux errors related to this report.
none
/var/log/libvirt/qemu/XP-vpn.log
none
virsh dumpxml XP-vpn
none
testvm.log
none
testvm.dumpxml none

Description Anderson Silva 2010-09-18 22:29:49 EDT
Created attachment 448251 [details]
selinux errors related to this report.

Description of problem:
When trying to add a SDL Virtual Display to a Virtual Machine using virt-manager, I get the following error:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 878, in run_domain
    vm.startup()
  File "/usr/share/virt-manager/virtManager/domain.py", line 1321, in startup
    self._backend.create()
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 333, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: operation failed: failed to retrieve chardev info in qemu with 'info chardev'

If I turn off selinux, it works fine. 

This error is based on this article: http://linuxgazette.net/178/silva.html - I understand selinux is not recommended to be turned off, but to get this working that was the only way I was able to getting working.

Version-Release number of selected component (if applicable):
It has been like this with all version of 'yum groupinstall Virtualization' at least on Fedora 13.

How reproducible:
Error happens every time. It goes away when I turn off selinux. I have attached the audit.log w/ the qemu-kvm errors.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Andrew McNabb 2010-11-04 16:10:32 EDT
I have selinux disabled, and I'm still getting this error.  As far as I can tell, my traceback is identical to Anderson's except that I'm using Fedora 14:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 878, in run_domain
    vm.startup()
  File "/usr/share/virt-manager/virtManager/domain.py", line 1321, in startup
    self._backend.create()
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 333, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: operation failed: failed to retrieve chardev info in qemu with 'info chardev'

This problem makes it impossible to start a virtual machine.
Comment 2 Cole Robinson 2010-11-17 18:37:33 EST
Anderson, FYI a couple of your questions in that posting are answered here:

http://fedoraproject.org/wiki/Virtualization_tips#Known_issues

There is also a bug open tracking libvirt, SDL, and selinux issues:

https://bugzilla.redhat.com/show_bug.cgi?id=609279

Andrew, can you provide:

/var/log/libvirt/qemu/$vmname.log
virsh dumpxml $vmname

Does tail -f /var/log/audit.log show anything when you try to start the guest?
Comment 3 Bryan O'Sullivan 2010-11-24 22:48:35 EST
Created attachment 462801 [details]
/var/log/libvirt/qemu/XP-vpn.log

I've attached the log file from attempting to start my VM.

Here's the associated backtrace:


Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 878, in run_domain
    vm.startup()
  File "/usr/share/virt-manager/virtManager/domain.py", line 1321, in startup
    self._backend.create()
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 333, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error Process exited while reading console log output: char device redirected to /dev/pts/1
No protocol specified
No protocol specified
Could not initialize SDL(No available video device) - exiting
Comment 4 Bryan O'Sullivan 2010-11-24 22:50:35 EST
Created attachment 462802 [details]
virsh dumpxml XP-vpn

Attached virsh dumpxml output.
Comment 5 Bryan O'Sullivan 2010-11-24 22:52:01 EST
(In reply to comment #2)
> Andrew, can you provide:
> 
> /var/log/libvirt/qemu/$vmname.log
> virsh dumpxml $vmname

I did this, since I have the same problem as Andrew - see comment #3 and comment #4 above.
 
> Does tail -f /var/log/audit.log show anything when you try to start the guest?

No.
Comment 6 Bryan O'Sullivan 2010-11-24 22:58:41 EST
FYI, I was able to work around this by editing qemu.conf to run as user myself, group myself. It seems to be a pty permission issue.
Comment 7 Andrew McNabb 2011-04-06 13:06:04 EDT
Created attachment 490342 [details]
testvm.log

I know others have posted their logs, but here's mine, too.
Comment 8 Andrew McNabb 2011-04-06 13:06:28 EDT
Created attachment 490343 [details]
testvm.dumpxml
Comment 9 Andrew McNabb 2011-04-06 13:07:07 EDT
(In reply to comment #2)
> Does tail -f /var/log/audit.log show anything when you try to start the guest?

I am running with SELinux disabled.
Comment 10 Andrew McNabb 2011-04-06 13:09:13 EDT
(In reply to comment #6)
> FYI, I was able to work around this by editing qemu.conf to run as user myself,
> group myself. It seems to be a pty permission issue.

For what it's worth, my qemu.conf has these set to user = "root" and group = "root".
Comment 11 Fedora Admin XMLRPC Client 2011-09-22 13:58:59 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 12 Fedora Admin XMLRPC Client 2011-09-22 14:02:46 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 13 Fedora Admin XMLRPC Client 2011-11-30 14:59:00 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 14 Fedora Admin XMLRPC Client 2011-11-30 14:59:50 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 15 Fedora Admin XMLRPC Client 2011-11-30 15:05:09 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 16 Fedora Admin XMLRPC Client 2011-11-30 15:05:23 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 17 Cole Robinson 2012-01-24 16:50:54 EST
F14 is EOL, please reopen if this is still relevant in a more recent fedora.