Bug 618652

Summary: libvirt does not install
Product: [Fedora] Fedora Reporter: Enrique <cquike>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: berrange, clalance, crobinso, 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: 2010-08-17 12:29:11 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:
Attachments:
Description Flags
List of installed rpm (from rpm -qa) none

Description Enrique 2010-07-27 13:18:23 UTC
Description of problem:

 I try to install libvirt with yum but it does not work:

Running Transaction
Error in PREIN scriptlet in rpm package libvirt-0.8.2-1.fc13.x86_64
useradd: group 'kvm' does not exist
error: %pre(libvirt-0.8.2-1.fc13.x86_64) scriptlet failed, exit status 6
error:   install: %pre scriptlet failed (2), skipping libvirt-0.8.2-1.fc13

Failed:
  libvirt.x86_64 0:0.8.2-1.fc13                                                 


Steps to Reproduce:
1. yum install libvirt
2. The installation fails

Comment 1 Enrique 2010-07-30 15:21:21 UTC
 The same happens if I install the Virtualization group:

yum groupinstall Virtualization

Comment 2 Enrique 2010-08-03 09:54:48 UTC
Created attachment 436232 [details]
List of installed rpm (from rpm -qa)

Comment 3 Enrique 2010-08-03 09:56:26 UTC
 I have attached the list of installed rpms in the machine, just in case that it helps to troubleshoot the problem.
 I would like to increase the severity to high, since it is a critical bug in our platform. However it seems that I don't have permissions to raise the severity.
 Regards,
 Enrique

Comment 4 Daniel Berrangé 2010-08-06 11:31:52 UTC
The 'libvirt' RPM contains a %pre script to create all these accounts, in case your 'setup' RPM hasn't already created them. Something on your system must be preventing this from working, becasue I've verified that this %pre script is correctly creating accounts. Please try running the following manually

getent group kvm >/dev/null || groupadd -g 36 -r kvm
getent group qemu >/dev/null || groupadd -g 107 -r qemu
getent passwd qemu >/dev/null || \
  useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
    -c "qemu user" qemu

Comment 5 Enrique 2010-08-06 15:51:57 UTC
 The problem is that we are using NIS for the accounts. Group id 36 is already claimed by a NIS group.
 I have created the kvm group with gid 37 (getent group kvm >/dev/null || groupadd -g 37 -r kvm) and the installation went through sucesfully. virt-manager seems to connect to libvirt, so everything seems to be ok.
 Could it be possible that there is an alternative gid for kvm so that if the default (36) exists there is a fallback solution?

 Thank you very much for the support!
 Enrique

Comment 6 Daniel Berrangé 2010-08-17 12:29:11 UTC
I don't think there is any way around this problem. Libvirt is required to use these designated GID/UIDs, since those are what are reserved for us in the 'setup' RPM's default /etc/passwd & /etc/group files. Ordinarily this would not be a problem because those values would have been setup by anaconda during your initial OS install. We only hit a problem here because the GA release of F13 didn't have those values reserved.