Red Hat Bugzilla – Bug 768559
libvirt won't install on rawhide
Last modified: 2011-12-19 09:26:48 EST
yum install libvirt results in:
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Error in PREIN scriptlet in rpm package libvirt-0.9.7-3.fc17.x86_64
error: %pre(libvirt-0.9.7-3.fc17.x86_64) scriptlet failed, exit status 6
Verifying : libvirt-0.9.7-3.fc17.x86_64 1/1
The %pre script is:
# Normally 'setup' adds this in /etc/passwd, but this is
# here for case of upgrades from earlier Fedora/RHEL. This
# UID/GID pair is reserved for qemu:qemu
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
So, first things first - what do these output on your system (when run as root)?
getent group kvm
getent group qemu
getent passwd qemu
My assumption is that somehow these groups/users did not already exist, and that the scriptlet moved on to the attempt to create them. groupadd does not document exit status 6, but useradd documents exit status 6 as 'specified group does not exist'. But that seems odd, given that the specified group 'kvm' was just validated or created two commands earlier. Could this be a SELinux issue, where running (as root) 'setenforce 0' prior to 'yum install libvirt' changes behavior? I also know that rawhide has recently changed SELinux label policies, where an incrementally installed system could have stale labels that interfere with the new expected behavior; can you run 'restorecon -rv /etc' to fix up labels before trying the installation again?
All three of those ran with no stdout/err output. Their error codes were 2.
I set permissive and re-installed, which succeeded with one error:
error reading information on service cgconfig: No such file or directory
But it does appear to have installed.
(In reply to comment #2)
> All three of those ran with no stdout/err output. Their error codes were 2.
Probably evidence of a SELinux mislabeling preventing them from succeeding.
> I set permissive and re-installed, which succeeded with one error:
Good - the problem is not libvirt, but SELinux labeling issues on your machine. As such, I will close this bug, as there's nothing that libvirt can do about that. If you need to reopen this issue, then reassign it to selinux.
> error reading information on service cgconfig: No such file or directory
That should be fixed independently when libvirt 0.9.8 is released for rawhide.