Hide Forgot
Description of problem: Login screen: Virtualization hardware is unavailable when virtualization is enable. Version-Release number of selected component (if applicable): rhev-hypervisor-6.2-0.15.el6 How reproducible: 100% Steps to Reproduce: 1. Install RHEV-H. 2. Login RHEV-H. 3. Actual results: RHEV-H shows Virtualization hardware is unavailable when virtualization is enable. #cat /etc/issue Red Hat Enterprise Virtualization Hypervisor release 6.2 (0.15.el6) Kernel \r on an \m (\l) Virtualization hardware is unavailable. (Virtualization hardware was detected but is disabled) Please login as 'admin' to configure the node [root@localhost admin]# cat /proc/cpuinfo | grep vmx flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority Expected results: Virtualization hardware is unavailable shouldn't show when virtualization is enable. Additional info:
Created attachment 521452 [details] virtualization hardware is unavailable
The intro text is added by the ovirt-post service. We look for "kvm" in the output of virsh --readonly capabilities. This seems to fail with: Fatal: no entropy gathering module detected full output of re-running ovirt-post with set -x # /etc/init.d/ovirt-post reload + local count=0post: [ OK ] + true + '[' -r /var/run/libvirt/libvirt-sock-ro ']' + break ++ mktemp + BACKUP=/tmp/tmp.PJ5vLx6iLv + ISSUE=/etc/issue + ISSUE_NET=/etc/issue.net + egrep -v '[Vv]irtualization hardware' /etc/issue + cp -f /tmp/tmp.PJ5vLx6iLv /etc/issue ++ virsh --readonly capabilities Fatal: no entropy gathering module detected + hwvirt= + [[ '' =~ kvm ]] + log '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' ++ date '+%b %d %H:%M:%S' + printf 'Sep 05 12:23:27 ' Sep 05 12:23:27 + '[' 1 = 1 ']' + echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + log '!!! Hardware Virtualization Is Unavailable !!!' ++ date '+%b %d %H:%M:%S' + printf 'Sep 05 12:23:27 ' Sep 05 12:23:27 + '[' 1 = 1 ']' + echo '!!! Hardware Virtualization Is Unavailable !!!' !!! Hardware Virtualization Is Unavailable !!! + log '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' ++ date '+%b %d %H:%M:%S' + printf 'Sep 05 12:23:27 ' Sep 05 12:23:27 + '[' 1 = 1 ']' + echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + echo 'Virtualization hardware is unavailable.' ++ cat /proc/cpuinfo ++ grep '^flags' + flags='flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority' + [[ flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority =~ vmx ]] + echo '(Virtualization hardware was detected but is disabled)' + is_local_storage_configured + lvs HostVG/Config + return 0 + echo '' + echo 'Please login as '\''admin'\'' to configure the node' + cp -f /etc/issue /etc/issue.net + is_standalone + is_managed + return 1 + return 0 + return 0
> Fatal: no entropy gathering module detected selinux policy changed for /dev/*random As a quickfix, ovirt-post will be made run unconfined, like ovirt-firstboot: --- a/recipe/rhevh6-post.ks +++ b/recipe/rhevh6-post.ks @@ -147,6 +147,7 @@ init_daemon_domain(unconfined_t,ovirt_exec_t) EOF_OVIRT_TE cat > ovirt.fc << \EOF_OVIRT_FC /etc/rc\.d/init\.d/ovirt-firstboot -- gen_context(system_u:object_r +/etc/rc\.d/init\.d/ovirt-post -- gen_context(system_u:object_r:ovir EOF_OVIRT_FC make NAME=targeted -f /usr/share/selinux/devel/Makefile semodule -v -i ovirt.pp
Hmm, that won't help, it's actually virsh which runs in xm_t domain and it's denied access do /dev/random: type=AVC msg=audit(1315393214.581:204): avc: denied { read } for pid=7069 comm="virsh" name="random" dev=devtmpfs ino=3615 scontext=unconfined_u:system_r:xm_t:s0 tcontext=system_u:object_r:random_device_t:s0 tclass=chr_file
Ignore above: when ovirt-post is unconfined, virsh stays unconfined.
Not a regression in ovirt-node
While at it, clean of temp file was missing: --- a/scripts/ovirt-post +++ b/scripts/ovirt-post @@ -39,6 +39,7 @@ start_ovirt_post() { ISSUE_NET=/etc/issue.net egrep -v "[Vv]irtualization hardware" $ISSUE > $BACKUP cp -f $BACKUP $ISSUE + rm $BACKUP hwvirt=$(virsh --readonly capabilities) if [[ $hwvirt =~ kvm ]]; then log "Hardware virtualization detected"
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1783.html