ubuntu qemu-kvm package attempts to start a service and fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Committed
|
High
|
Unassigned | ||
qemu-kvm (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Precise |
Fix Released
|
High
|
Serge Hallyn |
Bug Description
=======
impact: qemu-kvm cannot be installed if modprobe of kvm will fail
test case: create a precise container; rm /bin/running-
regression potential: if the modprobe failures were due to real errors, kvm may fail later on
=======
Iso 172, 180, 183
Ubuntu (guest) 12.04.04 qemu-kvm fails to install because upstart wont pass.
root@node-2:~# apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up qemu-kvm (1.2.0+
start: Job failed to start
invoke-rc.d: initscript qemu-kvm, action "start" failed.
dpkg: error processing qemu-kvm (--configure):
subprocess installed post-installation script returned error exit status 1
expected result: qemu-kvm should install and "start" anyways even if acceleration can't be loaded.
grep "^flags.* svm" /proc/cpuinfo
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb lm 3dnowext 3dnow rep_good nopl extd_apicid pni cx16 popcnt hypervisor cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw
root@node-
root@node-
FATAL: Error inserting kvm_amd (/lib/modules/
root@node-
ls: cannot access /dev/kvm: No such file or directory
dmesg:
[10925.939670] has_svm: can't execute cpuid_8000000a
[10925.939677] kvm: no hardware support
init fails due to
cat /etc/init/
...
pre-start script
# Silently exit if the package isn't installed anymore
if [ ! -e /usr/bin/kvm ]; then
fi
[ -r /etc/default/
# Load the appropriate module, respecting blacklists
if grep -qs "^flags.* vmx" /proc/cpuinfo; then
elif grep -qs "^flags.* svm" /proc/cpuinfo; then
fi
...
It appears that guest might have been passed bad CPU flags and qemu-kvm in host might not be allowing kvm acceleration to load. It appears that similar results have been noted in Debian upstream, where they are testing for -e /dev/kvm before attempting to load more acceleration
in Debian SID
case "$1" in
start|
[ ! -e /dev/kvm ] || exit 0 # nothing to do
Changed in fuel: | |
importance: | Critical → High |
description: | updated |
description: | updated |
Changed in fuel: | |
status: | Confirmed → Triaged |
Changed in qemu-kvm (Ubuntu Precise): | |
assignee: | nobody → Serge Hallyn (serge-hallyn) |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in qemu-kvm (Ubuntu): | |
status: | Triaged → Fix Released |
description: | updated |
Changed in fuel: | |
assignee: | Fuel QA Team (fuel-qa) → Tatyana (tatyana-leontovich) |
status: | In Progress → Fix Committed |
Changed in fuel: | |
assignee: | Registry Administrators (registry) → nobody |
Returning 0 if /dev/kvm does not exist after the modprobe would be ok, so long as those users do nto want to have hugetlbfs mounted. Otherwise we can simply guard the chmod with || true as we do the modprobe.