Bug 516120 - unable to start guest: qemu: could not open serial device 'pty'
Summary: unable to start guest: qemu: could not open serial device 'pty'
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-06 19:52 UTC by Eric Paris
Modified: 2009-09-04 07:51 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-04 07:51:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
virt-manager.log (8.50 KB, text/plain)
2009-08-11 19:42 UTC, Eric Paris
no flags Details
guest.log (559 bytes, text/plain)
2009-08-11 19:43 UTC, Eric Paris
no flags Details

Description Eric Paris 2009-08-06 19:52:40 UTC
virt-manager-0.8.0-1.fc12.noarch
libvirt-0.7.0-2.fc12.x86_64
libvirt-python-0.7.0-2.fc12.x86_64
libvirt-client-0.7.0-2.fc12.x86_64

selinux is permissive.

create a new vm in virt-manager
set the install to an iso
do not create storage
try to start the vm
backtrace

Error starting domain: internal error unable to start guest: qemu: could not open serial device 'pty

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/engine.py", line 567, in run_domain
    vm.startup()
  File "/usr/share/virt-manager/virtManager/domain.py", line 652, in startup
    self.vm.create()
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 293, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error unable to start guest: qemu: could not open serial device 'pty'

Comment 1 Mark McLoughlin 2009-08-11 18:04:07 UTC
Could you include ~/.virt-manager/virt-manager.log and /var/log/libvirt/qemu/$guest.log ?

Comment 2 Mark McLoughlin 2009-08-11 18:34:50 UTC
Hmm, this sounds similar to bug #511179

Comment 3 Eric Paris 2009-08-11 19:42:52 UTC
Created attachment 357068 [details]
virt-manager.log

Comment 4 Eric Paris 2009-08-11 19:43:32 UTC
Created attachment 357069 [details]
guest.log

Comment 5 Eric Paris 2009-08-11 19:45:17 UTC
Side note, since virt-manager is unusable as a non-root user this is done by logging into X as a normal user and using sudo -s to get root.  (I don't know if that is in any way relevant)

Comment 6 Gene Czarcinski 2009-08-11 20:44:55 UTC
I am running on Fedora 11 with the "preview" set which includes libvirt-0.7.0-3.fc11 (BTW< shouldn't that be "f11" rather than "fc11") an qemu-kvm.

I sure hope someone is working on the fix for this problem!

Right now I cannot run any linux virtual machine or define one.  Even if I manually edit the guest xml file to add the pts definitions.  Both virt-manager AND virsh start do not work ... both get the same error.

Comment 7 Mark McLoughlin 2009-08-14 17:09:16 UTC
Okay, this is openpty() in qemu-kvm process failing

You say selinux is permissive, so it's not #515521

The qemu-kvm process is now running as the qemu user. What permissions does /dev/pts have?

Comment 8 Scott Dowdle 2009-08-20 16:44:58 UTC
I too am experiencing this bug.  I try to start any of the three VMs I have and I get:

libvirtError: internal error unable to start guest: qemu: could not open monitor device 'pty'

I assume this is related to the recent qemu updates in Fedora 11?

qemu-common-0.10.6-1.fc11.x86_64
qemu-img-0.10.6-1.fc11.x86_64
qemu-system-x86-0.10.6-1.fc11.x86_64

I have tried running as a regular user and being prompted for the root password and running it directly as root... and I still get the same error.

Comment 9 Mark McLoughlin 2009-08-21 09:15:39 UTC
Scott: could you try reverting to 0.10.5-3 and see if that helps:

  https://koji.fedoraproject.org/koji/buildinfo?buildID=106744

if not, it rules out 0.10.6 as the cause

Also, what permissions are on your /dev/ptmx

They should be:

  $> ls -l /dev/ptmx 
  crw-rw-rw-. 1 root tty 5, 2 2009-08-21 10:12 /dev/ptmx
  $> ls -lZ /dev/ptmx 
  crw-rw-rw-. root tty system_u:object_r:ptmx_t:s0      /dev/ptmx

Eric had different permissions and was going to try correcting them to see if that helps

Comment 10 Eric Paris 2009-08-21 15:01:28 UTC
With 'fixed' perms and ownership like you show in comment #9 I am thus far unable to reproduce this problem.

libvirt-0.7.0-6.fc12.x86_64

Comment 11 Scott Dowdle 2009-08-21 23:13:44 UTC
Mark McLoughlin,

I was unable to view that koji page for some reason.  I accepted the cert but then got an SSL nego. error.  In any event I saw fix that one of the SELinux guys came up with in a related bug report that involved changing how devpts is mounted (which is probably what that koji page documents?) and that worked for me.

Comment 12 Mark McLoughlin 2009-09-04 07:51:04 UTC
Okay, closing this then

If anyone knows how /dev/ptmx or /dev/pts came to have incorrect permissions, please let us know


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