When start Vbox getting KVM error

Discussions related to using VirtualBox on Linux hosts.

When start Vbox getting KVM error

Postby kermit2030 » 23. Mar 2009, 05:04

Before I installed virtualbox from the website (2.1.4 for Ubuntu linux 8.10 64 bit I read on the internet that I needed KVM

So I did aptitude install dkms
Then I installed the virtual box 2.1.4 and intalled 32 bit Windows vista Ultimate on it . After doing that I shut down the windows and tried to restart the virutalbox and it gave me the following error.


VirtualBox can't operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).


Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
Console
Interface:
IConsole {e3c6d4a1-a935-47ca-b16d-f9e9c496e53e}

I did a apittude remove dkms
and tried to start virtual box and got the same error.

I remove virtual box and reinstalled it and got the same error.

How do I correct this problem? I don't know how to recompile the kernal like it says?

Your help would be greatly appreciated.
kermit2030
 
Posts: 3
Joined: 23. Mar 2009, 04:47

Re: When start Vbox getting KVM error

Postby johnleo » 23. Mar 2009, 21:22

I think you're seeing a conflict between KVM and VirtualBox.

Try removing the kvm module before starting VirtualBox:
Code: Select all   Expand viewCollapse view
sudo rmmod kvm-intel

or for host with AMD processor:
Code: Select all   Expand viewCollapse view
sudo rmmod kvm-amd
johnleo
 
Posts: 2
Joined: 23. Mar 2009, 17:14

Re: When start Vbox getting KVM error

Postby Sasquatch » 23. Mar 2009, 22:23

KVM is a virtualization of it's own. Just like Xen, VB can't work on that kernel.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: When start Vbox getting KVM error

Postby kermit2030 » 23. Mar 2009, 23:17

Thank you so much this fixed my problem and I am up and running now. And it was such an easy painless fix.

God bless you.
kermit2030
 
Posts: 3
Joined: 23. Mar 2009, 04:47

Re: When start Vbox getting KVM error

Postby AntiMatter » 3. May 2009, 17:21

Hi,

What is the exact effects of the commands rmmod kvm-intel or rmmod kvm-amd ?
1. Disable KVM to allow VirtualBox to run
2. Allow both KVM and VirtualBox to run

If the answer is 1, then how to enable KVM back gain?
AntiMatter
Volunteer
 
Posts: 176
Joined: 2. Nov 2008, 06:48
Location: Canada
Primary OS: Ubuntu 12.04
VBox Version: PUEL
Guest OSses: All Windows (x32 & x64), Linux

Re: When start Vbox getting KVM error

Postby baf » 3. May 2009, 18:05

AntiMatter wrote:What is the exact effects of the commands rmmod kvm-intel or rmmod kvm-amd ?

It unloads those modules from your kernel until your next reboot.

AntiMatter wrote:1. Disable KVM to allow VirtualBox to run

either those rmmod lines to do it on the fly or find where they are loaded. /etc/init.d/kvm ? /etc/modprobe? somewhere like that.
AntiMatter wrote:2. Allow both KVM and VirtualBox to run

Sorry not possible.

AntiMatter wrote:If the answer is 1, then how to enable KVM back gain?

If you just used rmmod then either reboot or modprobe kvm-intel and/or modprobe kvm-amd
Virtualbox probably has some modules like it so look at the output from lsmod and see what they are.
Also check with ps auxww what processes are running.
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
baf
Volunteer
 
Posts: 829
Joined: 27. Sep 2008, 06:18
Location: Luleå or Skellefteå, Sweden
Primary OS: Mac OS X Leopard
VBox Version: PUEL
Guest OSses: linux,xp,win7

Re: When start Vbox getting KVM error

Postby AntiMatter » 4. May 2009, 07:44

baf wrote:If you just used rmmod then either reboot or modprobe kvm-intel and/or modprobe kvm-amd
Virtualbox probably has some modules like it so look at the output from lsmod and see what they are.
Also check with ps auxww what processes are running.


Oh crap, if KVM and VirtualBox are installed in the same machine, then each time I want to run one I have to disable/unload the other? I will experiment KVM soon so I would like to make sure to know the troubles beforehand. From what I found on the Internet, I see more often KVM blocking VirtualBox, not the opposite.

If you have used both KVM and VirtualBox on the same machine, what is your recommendation to keep both working? Only one working at a time is fine. I have no need to have both of them run at the same time.

Thanks in advance.
AntiMatter
Volunteer
 
Posts: 176
Joined: 2. Nov 2008, 06:48
Location: Canada
Primary OS: Ubuntu 12.04
VBox Version: PUEL
Guest OSses: All Windows (x32 & x64), Linux

Re: When start Vbox getting KVM error

Postby Brausepaul » 29. Oct 2009, 19:56

Can someone point me to the place where these modules are loaded? I'd like to permanently prohibit them being loaded.
Brausepaul
 
Posts: 17
Joined: 23. Mar 2009, 19:46

Re: When start Vbox getting KVM error

Postby Sasquatch » 30. Oct 2009, 21:15

Modules are loaded and/or blacklisted in /etc/modprobe.d/blacklist. Exact file might differ on other distro's, as this is the file on Debian based ones.

Antimatter, you can make a script to start VB which would unload the module before starting the GUI (or just make a script to enable/disable KVM). Another thing you can do is have two kernel configs, one that allows the KVM module, the other disallows the module. You will then just reboot to the proper kernel for either KVM or VB.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: When start Vbox getting KVM error

Postby pearsonbe » 8. May 2010, 14:24

After upgrading from Kubuntu Lucid to Lucid Lynx 10 LTS, an existing Windows XP machine would not start until I disabled Hardware Acceleration (AMD-V). If the machine state is Saved (not Powered Off), you can't change the settings. You will have to unload the KVM module (using the command rmmod kvm-amd for AMD processor) to start the machine, then power it off. Losing Hardware Acceleration also meant I lost support for multiple virtual CPUs. I had to revert to a single CPU before disabling acceleration.
pearsonbe
 
Posts: 1
Joined: 2. Aug 2009, 03:40
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: WinXP

Re: When start Vbox getting KVM error

Postby Sasquatch » 9. May 2010, 00:11

Yes, that is true, because the KVM modules lock the hardware assisted virtualisation option of the CPU. VB will then work in software mode. Since you don't use KVM, you can just remove the KVM related packages.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: When start Vbox getting KVM error

Postby abdulazizalmass » 3. Oct 2012, 15:26

I only registered just to say thank you ALL for this info ^_^
abdulazizalmass
 
Posts: 1
Joined: 3. Oct 2012, 15:22


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 11 guests