[Bug 1316812] Re: ubuntu qemu-kvm package attempts to start a service and fails

Serge Hallyn 1316812 at bugs.launchpad.net
Wed May 7 14:49:58 UTC 2014


** Description changed:

+ ======================================
+ impact: qemu-kvm cannot be installed if modprobe of kvm will fail
+ test case: create a precise container;  rm /bin/running-in-container; ln -s /bin/false /bin/running-in-container;  apt-get install qemu-kvm
+ 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 at 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+noroms-0ubuntu7.12.10) ...
  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 at node-1:/etc/init# modprobe kvm
  root at node-1:/etc/init# modprobe kvm_amd
  FATAL: Error inserting kvm_amd (/lib/modules/3.11.0-18-generic/kernel/arch/x86/kvm/kvm-amd.ko): Operation not supported
  root at node-1:/etc/init# ls -l /dev/kvm
  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/qemu-kvm.conf
  ...
  pre-start script
          # Silently exit if the package isn't installed anymore
          if [ ! -e /usr/bin/kvm ]; then
                  exit 0
          fi
          [ -r /etc/default/qemu-kvm ] && . /etc/default/qemu-kvm
          # Load the appropriate module, respecting blacklists
          if grep -qs "^flags.* vmx" /proc/cpuinfo; then
                  modprobe -b kvm_intel "$KVM_NESTED" || true
                  chown root:kvm /dev/kvm
                  chmod 0660 /dev/kvm
          elif grep -qs "^flags.* svm" /proc/cpuinfo; then
                  modprobe -b kvm_amd || true
                  chown root:kvm /dev/kvm
                  chmod 0660 /dev/kvm
          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|restart|force-reload)
  
          [ ! -e /dev/kvm ] || exit 0     # nothing to do

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to qemu-kvm in Ubuntu.
https://bugs.launchpad.net/bugs/1316812

Title:
  ubuntu qemu-kvm package attempts to start a service and fails

To manage notifications about this bug go to:
https://bugs.launchpad.net/fuel/+bug/1316812/+subscriptions



More information about the Ubuntu-server-bugs mailing list