Wednesday, April 16, 2014

Oracle Virtual Box - This kernel requires an x86-64 CPU, but only detected an i686 CPU

A new Lenevo I5 with 16GB RAM didn't please me a lot after my Macbook Pro of same config which I have been using since last one and a half years. Will not start upon the differences and speed cause that's not the aim of this post. In a nutshell I love my Mac due to its ease of use, speed and performance.

I was already using Virtual Box and Vagrant on my Mac but never faced any issue. So on my "shiny new" machine, I installed the needed stuff. I wanted to work on a HAProxy based solution for changing TCP Headers and for a quick setup used Shamil's HAProxy Vagrant Example from GitHub.

To my dismay the vagrant script couldn't start even one of the three instances it was supposed to start. While on the second run it showed instance is running but I cant connect or use it. A deeper check revealed that the machine was stuck on
This kernel requires an x86-64 CPU, but only detected an i686 CPU.
Virtual Box Virtual box manual says ...
3.1.2. 64-bit guests
VirtualBox supports 64-bit guest operating systems, even on 32-bit host operating systems, provided that the following conditions are met:
  1. You need a 64-bit processor with hardware virtualization support (see Section 10.3, “Hardware vs. software virtualization”). 
  2. You must enable hardware virtualization for the particular VM for which you want 64-bit support; software virtualization is not supported for 64-bit VMs. 
  3. If you want to use 64-bit guest support on a 32-bit host operating system, you must also select a 64-bit operating system for the particular VM. Since supporting 64 bits on 32-bit hosts incurs additional overhead, VirtualBox only enables this support upon explicit request. 
On 64-bit hosts (which typically come with hardware virtualization support), 64-bit guest operating systems are always supported regardless of settings, so you can simply install a 64-bit operating system in the guest.
Warning On any host, you should enable the I/O APIC for virtual machines that you intend to use in 64-bit mode. This is especially true for 64-bit Windows VMs. See Section 3.3.2, “"Advanced" tab”. In addition, for 64-bit Windows guests, you should make sure that the VM uses the Intel networking device, since there is no 64-bit driver support for the AMD PCNet card; see Section 6.1, “Virtual networking hardware”.

64 Bit Processor
For my I5 3230M Intel Says
The important thing here is that my processor supports VT-x. So I should be good.

However when I checked the instance properties it shows VT-x - Disabled. The icon on virtualbox showed 64bit and the OS Type here showed only Ubuntu (32 bit).

The solution(Part - 1)

Go to your systems CMOS, depending on what system you use. You might have to press Del, F2 or OM Key on the splash screen after restating your system.

Choose A > B > C and set Virtulization to Enable. Press F10 to save and exit or whatever other method your CMOS might present.

64 Bit OS.
I am running 64 bit Windows 7 Professional. So what needs to be done here.

The Solution (Part - 2)

Goto Control Panel > Programs and Features > Turn Windows features on or off and there you will need to enable Remote Server Administration Tools > Role Administration Tools > Hyper - V Tools.

In case you don't see Remote Server Administration Tools please install Remote Server Administration Tools for Windows 7 with Service Pack 1 (SP1). To be more precise Windows6.1-KB958830-x64-RefreshPkg.msu





And Voila you will see both 32 and 64 bit machines and VirtualBox will work as expected.

No comments:

Post a Comment