Bug 511179

Summary: svirt errors causing qemu guests to fail to start
Product: [Fedora] Fedora Reporter: darrell pfeifer <darrellpf>
Component: glibcAssignee: Andreas Schwab <schwab>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: urgent    
Version: rawhideCC: berrange, clalance, crobinso, dowdle, dwalsh, gczarcinski, hbrock, itamar, jakub, jlaska, john.haxby, markmc, nyman.jonas, schwab, veillard, virt-maint, waf, walovaton
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: 2009-08-12 07:34:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 498968    
Attachments:
Description Flags
conf file (unchanged from the standard install)
none
guest log file
none
vir manager log file from failed install none

Description darrell pfeifer 2009-07-14 03:10:42 UTC
Description of problem:

Unable to complete install '<class 'libvirt.libvirtError'> internal error unable to start guest: qemu: could not open monitor device 'pty'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 1501, in do_install
    dom = guest.start_install(False, meter = meter)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 541, in start_install
    return self._do_install(consolecb, meter, removeOld, wait)
  File "/usr/lib/python2.6/site-packages/virtinst/Guest.py", line 633, in _do_install
    self.domain = self.conn.createLinux(install_xml, 0)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 1073, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: internal error unable to start guest: qemu: could not open monitor device 'pty'

'


Version-Release number of selected component (if applicable):

virt-manager-0.7.0-5.fc12.x86_64
qemu-0.10.50-9.kvm87.fc12.x86_64
qemu-kvm-0.10.50-9.kvm87.fc12.x86_64
libvirt-0.6.5-2.fc12.x86_64

(This has the new polkit changes for various components like gnome, etc. There seem to have been some strangeness with it. Running as a regular user, but made sure that system/prefs/authorizations for virt were assigned to the user, selinux is off)

Not sure if this belongs to qemu

How reproducible:

Tried to create a new F11 virtual machine


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


Expected results:


Additional info:

Comment 1 Cole Robinson 2009-07-14 14:23:49 UTC
I've seen this too, though my rawhide box crapped out before I could really investigate it. Has something to do with recent change to drop capabilities: if I recompiled with --with-capng=no, the errors stopped. So this is probably one for danpb.

Comment 2 Itamar Reis Peixoto 2009-07-26 17:02:35 UTC
(In reply to comment #1)
> I've seen this too, though my rawhide box crapped out before I could really
> investigate it. Has something to do with recent change to drop capabilities: if
> I recompiled with --with-capng=no, the errors stopped. So this is probably one
> for danpb.  

you're right, I can confirm this, but the bug is in libvirt, not in virt-manager, you have reported the bug to wrong package.

Comment 3 Daniel Berrangé 2009-07-27 10:50:20 UTC
Do you have anything in /var/log/libvirt/qemu/$GUEST.log ?

Also could you attach the XML config for a guest exhibiting the problem, and your /etc/libvirt/qemu.conf  file.

Comment 4 darrell pfeifer 2009-07-27 13:18:36 UTC
Created attachment 355272 [details]
conf file (unchanged from the standard install)

Comment 5 darrell pfeifer 2009-07-27 13:20:22 UTC
Created attachment 355273 [details]
guest log file

There are two entries because I hit the "finish" button twice (rather than cancel the second time)

Comment 6 darrell pfeifer 2009-07-27 13:22:44 UTC
Can you tell me where the XML config file would be stored? I hunted around for a bit, including the man pages, but can't find them.

Note that the image files from the failed attempts should probably be removed. I don't think they're accessible afterwards.

Comment 7 Daniel Berrangé 2009-07-27 18:52:01 UTC
The config is in /etc/libvirt/qemu/$GUEST.xml, or even better just use  'virsh dumpxml GUEST' since that tells you exactly what libvirtd knows.

If you have SELinux in enforcing mode, could you also try with 'setenforce 0' to see if that makes any difference.

Finally, there will shortly be a new libvirt 0.7.0 appearing in rawhide which could be worth trying, unless i discover the problem soon...

Comment 8 darrell pfeifer 2009-07-27 19:03:59 UTC
The only thing in the /etc/libvirt/qemu directory is a networks directory.

I can't find an option in virsh that just lists the valid domains (but there aren't any anyway)

This was a fresh F11 install, so this is the first guest I've tried to create on this physical machine.

SELinux?  ewwww. I mean... I don't run selinux.

I'm in no hurry, so will happily wait for the 0.7.0 version. Let me know if you have anything else you want me to look at in the mean time.

Comment 9 Daniel Berrangé 2009-07-27 19:12:15 UTC
Oh of course there's no config, since you didn't actually successfully launch your first VM !

You were using virt-manager, so if you provide the $HOME/.virt-manager/virt-manager.log file that will be sufficient to show us the config.

Comment 10 Itamar Reis Peixoto 2009-07-27 19:17:37 UTC
(In reply to comment #7)

> Finally, there will shortly be a new libvirt 0.7.0 appearing in rawhide which
> could be worth trying, unless i discover the problem soon...  


let me know when it available and I will test it.

Comment 11 darrell pfeifer 2009-07-27 19:21:56 UTC
Created attachment 355309 [details]
vir manager log file from failed install

Comment 12 darrell pfeifer 2009-07-28 20:45:08 UTC
Same error with libvirt-0.7.0-0.2.gitf055724.fc12.x86_64

Comment 13 William Lovaton 2009-08-11 02:38:24 UTC
I'm getting the same error on Fedora 11 after applying today's updates, the only relevant packages in the updates were:

glibc-2.10.1-4.i686
glibc-common-2.10.1-4.i586
nscd-2.10.1-4.i586

After configuring SELinux as permissive the virtual machines were able to boot fine just as yesterday.

My virtualization packages are:
virt-manager-0.7.0-5.fc11.i586
qemu-kvm-0.10.5-3.fc11.i586
libvirt-0.6.2-13.fc11.i586

Regards.

Comment 14 William Lovaton 2009-08-11 02:46:57 UTC
Damn!!! after booting, my virtual machines are unable to connect to the network.

This is really bad!.

Comment 15 James Laska 2009-08-11 12:47:52 UTC
Seeing this issue as well after latest rawhide updates.

I'm able to start my existing guests with selinux in permissive mode.  However, when I attempt to start my guests in enforcing mode, I see the following AVC messages:

# setroubleshoot: SELinux prevented qemu-kvm from using the terminal 1. For complete SELinux messages. run sealert -l 3541fc17-e3ca-451a-b377-980508853f55 

 * AVC logged at http://fpaste.org/ktt8/

# setroubleshoot: SELinux is preventing qemu-kvm (svirt_t) "setrlimit" svirt_t. For complete SELinux messages. run sealert -l 82f80418-ebe4-4189-99af-c9e5a71cc453

 * AVC logged at http://fpaste.org/ibhn/

# setroubleshoot: SELinux is preventing qemu-kvm (svirt_t) "fsetid" svirt_t. For complete SELinux messages. run sealert -l 3145e077-df77-46de-9c1f-2e1370312d36

 * AVC logged at http://fpaste.org/OZCy/

I've made the boolean correction suggested in the first AVC, but the problem remains.

Comment 16 darrell pfeifer 2009-08-11 14:53:28 UTC
As the original bug reporter, I've always run with selinux off.

I'm using today's rawhide. The new guest dialog gets past the pty problem now.

The bochs emulator comes up in text mode but now it can't find the cdrom.

brw-rw----+ 1 qemu qemu 11, 0 2009-08-10 14:18 /dev/sr0

I'm running as a 'normal' user, giving the root password to start creating the virtual machine.

Comment 17 Mark McLoughlin 2009-08-11 18:37:26 UTC
The setrlimit() one is in F-11 too - see bug #515521

dwalsh: any ideas?

Comment 18 Jonas Nyman 2009-08-12 04:41:35 UTC
A temporary fix is to rollback to glibc-2.10.1-2. 
Execute:

#yum downgrade glibc glibc-common glibc-headers glibc-devel

Comment 19 Andreas Schwab 2009-08-12 07:28:42 UTC
What do you get from "grep /dev/pts /etc/fstab"?

Comment 20 Andreas Schwab 2009-08-12 07:34:05 UTC

*** This bug has been marked as a duplicate of bug 515521 ***

Comment 21 Daniel Walsh 2009-08-12 19:25:23 UTC
If you fix your fstab entry and reboot, your virtual machines should work with SELinux in enforcing mode.

devpts                  /dev/pts                devpts  gid=5,mode=620  0 0

Comment 22 Scott Dowdle 2009-08-20 17:09:38 UTC
Daniel Walsh, that devpts /etc/fstab change fixed it for me... but what to do to resolve this more correctly?  A libvirt package updated pending?

Comment 23 Jakub Jelinek 2009-08-20 17:15:32 UTC
The /etc/fstab change is the most correct way to fix this.
Perhaps some package should try to edit /etc/fstab in its %post if it detects this bug.

Comment 24 Daniel Walsh 2009-08-20 17:22:49 UTC
Which is where we get into an argument about which package is correct, and realize that this patch will have to be carried until F11 dissapears.

Comment 25 Daniel Berrangé 2009-08-20 17:26:43 UTC
There's no argument to be had - /etc/fstab is owned by 'setup'

$ rpm -qf /etc/fstab
setup-2.8.3-1.fc11.noarch