kvm installation and uninstallation failure

Bug #183663 reported by Raúl Soriano
8
Affects Status Importance Assigned to Milestone
kvm (Ubuntu)
Fix Released
High
Soren Hansen

Bug Description

Binary package hint: kvm

When installing, kvm tries to load the kernel module. My bios seems to disable svm and kvm-amd can't load, so installation fails.

When uninstalling, kvm tries to unload the kernel module. Since it isn't loaded, uninstallation fails.

I have no option in my bios to enable svm support, so i can't fix it that way.

I've tried to force uninstallation, but doesn't work.

Some messages are in spanish, so I added translation to english

$ sudo dpkg --purge --force-all kvm
(Leyendo la base de datos ... # Reading database
274046 ficheros y directorios instalados actualmente.) # 274046 files and directories actually installed
Desinstalando kvm ... # Uninstalling kvm
ERROR: Module kvm_amd does not exist in /proc/modules
 * Failed to remove kvm-amd
invoke-rc.d: initscript kvm, action "stop" failed.
dpkg: error al procesar kvm (--purge):
 el subproceso pre-removal script devolvió el código de salida de error 1 # the pre-removal subprocess script returned exit code is error 1
FATAL: Error inserting kvm_amd (/lib/modules/2.6.24-3-generic/kernel/drivers/kvm/kvm-amd.ko): Operation not supported
 * Module kvm-amd failed to load
invoke-rc.d: initscript kvm, action "start" failed.
dpkg: error al reorganizar:
 el subproceso post-installation script devolvió el código de salida de error 1 # the post-install subprocess script returned exit code is error 1
Se encontraron errores al procesar: # there where errors found processing:
 kvm

Installation must NOT try to load modules or at least manage load errors.
Uninstallation must NOT try to unload modules or at least manage load errors.

Related branches

Soren Hansen (soren)
Changed in kvm:
assignee: nobody → shawarma
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kvm - 1:59+dfsg-0ubuntu6

---------------
kvm (1:59+dfsg-0ubuntu6) hardy; urgency=low

  * Removed 08_default_tdf.patch. No longer needed.
  * Modify init script to not exit with an error when stopping if the module
    isn't loaded (LP: #183663).
  * Use the correct names for the modules in init script.

 -- Soren Hansen <email address hidden> Fri, 18 Jan 2008 19:12:26 +0100

Changed in kvm:
status: New → Fix Released
Revision history for this message
Raúl Soriano (gatoloko) wrote : Re: [Bug 183663] Re: kvm installation and uninstallation failure

2008/1/18, Launchpad Bug Tracker <email address hidden>:
>
> This bug was fixed in the package kvm - 1:59+dfsg-0ubuntu6
>
>
The problem persist with the new release

Configurando kvm (1:59+dfsg-0ubuntu6) ... # Configuring kvm
(1:59+dfsg-0ubuntu6) ...
FATAL: Error inserting kvm_amd
(/lib/modules/2.6.24-4-generic/kernel/drivers/kvm/kvm-amd.ko): Operation not
supported
 * Module kvm_amd failed to load
invoke-rc.d: initscript kvm, action "start" failed.
dpkg: error al procesar kvm (--configure): # dpkg: error procesing kvm
(--configure)
 el subproceso post-installation script devolvió el código de salida de
error 1 # post-install script subproccess returned exit code is 1

--
Raúl Soriano (GatoLoko), SpainTeam Local Community Contact.
http://www.ubuntu-spain.org - http://wiki.ubuntu.com/GatoLoko

Revision history for this message
Soren Hansen (soren) wrote :

On Fri, Jan 18, 2008 at 11:49:50PM -0000, Raúl Soriano wrote:
> > This bug was fixed in the package kvm - 1:59+dfsg-0ubuntu6
> The problem persist with the new release

It's perfectly reasonable for kvm not not get properly configured (and
thus be marked as installed) if you don't have the proper hardware
extensions. You will not be able to use kvm.

The change I made should however allow you to remove the package?

--
Soren Hansen
Ubuntu Server Team
http://www.ubuntu.com/

Revision history for this message
Raúl Soriano (gatoloko) wrote :

> It's perfectly reasonable for kvm not not get properly configured (and
> thus be marked as installed) if you don't have the proper hardware
> extensions. You will not be able to use kvm.

For me, the only thing I can do is uninstall, and with the new release it works now, thanks for fixing that.

I'm going to make a suggestion for you to consider and see whether it is possible or desirable:

The problem is that some of us HAVE support for svm extensions on out systems, but bios disables it so support is there but can't be used.

When the installation script tries to load the modules, it fails and configurations fails, leaving an unconfigured package without a hint of what the problem is.

The installation script may be modified so it checks for virtualization support and do:
  1.-If there is no support (egrep ‘^flags.*(vmx|svm)’ /proc/cpuinfo), a message tell the user that the package can't work on that machine and stops the installation without trying to load the module.
  2.-If there is support, tries to load the module and if it fails, show a message telling the user to check the bios for options to enable virtualization.

Not all bioses have that option, and in some cases a bios upgrade is needed, but I think that this can help some users

Revision history for this message
Nicolas Valcarcel (nvalcarcel) wrote :

I'm experiencing this problem on hardy, reopening the bug.

Setting up vgabios (0.6a-3ubuntu1) ...
Setting up kvm (1:62+dfsg-0ubuntu3) ...
FATAL: Error inserting kvm_intel (/lib/modules/2.6.24-16-generic/kernel/arch/x86/kvm/kvm-intel.ko): Operation not supported
 * Module kvm_intel failed to load
invoke-rc.d: initscript kvm, action "start" failed.

Changed in kvm:
status: Fix Released → Confirmed
Revision history for this message
Marcos Felipe Mello (marcosfrm) wrote :

I'm having same problem here. Also, I can't get KVM working.

$ sudo /etc/init.d/kvm start
FATAL: Error inserting kvm_intel (/lib/modules/2.6.24-16-generic/kernel/arch/x86/kvm/kvm-intel.ko): Operation not supported
 * Module kvm_intel failed to load

$ uname -a
Linux dell 2.6.24-16-generic #1 SMP Thu Apr 10 12:47:45 UTC 2008 x86_64 GNU/Linux

Revision history for this message
Marcos Felipe Mello (marcosfrm) wrote :

Please disconsider my previous message. Intel VT wasn't enabled in BIOS! Sorry...

Revision history for this message
®om (rom1v) wrote :

I installed "kvm" package :
sudo apt-get install kvm

then remove it :
sudo apt-get remove kvm

The module was still there, I have to disable it manually :
sudo rmmod kvm_intel

Revision history for this message
Soren Hansen (soren) wrote :

Can you show me the output when you remove kvm and it keeps the module loaded?

Changed in kvm:
status: Confirmed → Incomplete
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

There hasn't been any activity on this bug in quite a while...

I can install and uninstall KVM successfully in Hardy, Intrepid, and Jaunty.

Can anyone confirm that this is still a problem?

I'm going to set the priority to "High", but leave marked as "Incomplete" and expire this bug report shortly if this problem is no longer reproducible.

Thanks,
:-Dustin

Changed in kvm:
importance: Undecided → High
Revision history for this message
Vitaliy Kulikov (slonua) wrote :

Occur after
sudo apt-get install kvm-source

Working perfectly on Intrepid before this hit

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Vitaly-

This bug has been opened and closed several times now...

Please provide more detail. What exactly is the problem you're seeing? Can you paste more of the output of the issue?

What version of Ubuntu are you seeing this issue on?

:-Dustin

Revision history for this message
Vitaliy Kulikov (slonua) wrote :

So, quick info about versions:

>>uname -a
Linux case 2.6.27-14-generic #1 SMP Fri Mar 13 18:00:20 UTC 2009 i686 GNU/Linux

kvm and kvm-source (1:72+dfsg-1ubuntu6)

Issue occur after some manipulation. here are positive, negative and critical flows:

1. positive
a: U can install and un-install *kvm* many times.
b: U can install and un-install *kvm-source* many times, IF KVM instaled.

2. negative
If u install *kvm-source* in case of *kvm* isn't installed .. so, welcome to hell

3. critical *I'm out*
After install *kvm-source* .. i try remove *kvm-source* by

>> sudo dkms remove -m kvm -v 72 -k 2.6.27-14-generic

It was stupid ...

>> sudo apt-get purge kvm-source
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  kvm-source*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 909kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 153449 files and directories currently installed.)
Removing kvm-source ...

Error! There are no instances of module: kvm
72 located in the DKMS tree.
dpkg: error processing kvm-source (--purge):
 subprocess pre-removal script returned error exit status 3
Errors were encountered while processing:
 kvm-source
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Vitaliy Kulikov (slonua) wrote :

I'm know that *kvm-source* is not needed for Ubuntu systems =)))

Revision history for this message
Vitaliy Kulikov (slonua) wrote :

*kvm-source* purging after manual DKMS model removing fixed by:
(just download new version, then install and purge)

>> sudo dpkg -i kvm_84+dfsg-0ubuntu8_i386.deb
>> sudo apt-get purge kvm-source

Could U say .. who provide kvm.ko, kvm_intel.ko, kvm_amd.ko !?

Revision history for this message
Vitaliy Kulikov (slonua) wrote :

So, kvm.ko, kvm_intel.ko, kvm_amd.ko are provide with linux-image package.
All *.ko have bean removed by kvm-source ... waiting for new version of linux-image .. don't wanna boot with older kernel.

Revision history for this message
Philippe Coval (rzr) wrote :

> waiting for new version of linux-image .. don't wanna boot with older kernel.

Just reinstall the latest kernel then , It worked for me

--
http://rzr.online.fr/q/qemu

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Vitaliy-

There is a kvm.ko, kvm_intel.ko, and kvm_amd.ko provided by every Ubuntu linux kernel. These are the kvm modules as provided by the upstream linux kernel used in Ubuntu. This version of the kvm module is generally several releases older, a bit more stable, and usually lacking some features of the latest kvm module provided by the upstream kvm source project.

The kvm-source package provides a later, more featureful, less-thoroughly-tested update of the kvm module source code. When you install this package, this source code is built against your current Ubuntu kernel headers. Once built, it replaces the kvm modules provided by your ubuntu kernel. It uses DKMS to do this.

Your reproduce case was against kvm-72, which is in Intrepid. I cannot reproduce this bug against Jaunty. Can you try there?

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Vitaliy wrote:
> 2. negative
> If u install *kvm-source* in case of *kvm* isn't installed .. so, welcome to hell

debian/control has for kvm-source:
Enhances: kvm

I believe that this is correct. kvm could be aded the Depends, but I don't think that's so.

> 3. critical *I'm out*
> After install *kvm-source* .. i try remove *kvm-source* by
> sudo dkms remove -m kvm -v 72 -k 2.6.27-14-generic
...
> Error! There are no instances of module: kvm
> 72 located in the DKMS tree.
> dpkg: error processing kvm-source (--purge):
> subprocess pre-removal script returned error exit status 3

This is definitely fixed in jaunty by "|| true" the following in the prerm script:
dkms remove -m $PKG -v $PKGVER --all >/dev/null || true

As far as I can tell, this bug is fixed in Jaunty. I don't believe that an SRU is warranted for Intrepid. However, if you disagree, please talk to the SRU team and propose for release against 8.10 -- the decision will be theirs.

For now, I'm marking this bug 'Fix Released', again.

:-Dustin

Changed in kvm (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.