Question

I have a Gentoo VM which I have created by installing from the latest (20131224) minimal x86 ISO and stage 3 tarball, using genkernel as the kernel. I created a Vagrant box after updating all the packages on the VM and installing a few extras such as vim and virtualbox-guest-additions.

My Vagrantfile is as follows:

Vagrant.configure("2") do |config|
  config.vm.box = "gentoo-x86"

  config.vm.provider :virtualbox do |vb|
    vb.gui = true
    vb.customize ["modifyvm", :id, "--memory", 1024]
    #vb.customize ["modifyvm", :id, "--hwvirtex", "off"]
    vb.customize ["modifyvm", :id, "--cpus", 1]
  end
end

As it stands, the box boots fine when running vagrant up. However, if I uncomment the line for disabling the --hwvirtex parameter, the following errors show in the VM console:

INIT: version 2.88 booting
INFO: rcu_sched detected stalls on CPUs/tasks: {} (detected by 0, t=2102, jiffies, g=4595, c=4594, q=10)
INFO: Stall ended before state dump start

The two INFO lines repeat indefinitely (with increasing t= values, which I guess might stand for 'time') until I run vagrant halt followed by vagrant destroy. I've tried this on two different hosts (one Ubuntu, one Windows 7) and get the same error message.

I suspect this a Gentoo problem because there are three major components (Gentoo, VirtualBox, Vagrant) and I can be reasonably confident in ruling out two of them as follows:

  1. If I run the VM directly from VirtualBox with VT-X disabled, I get the same error message as I do when using the box in Vagrant with hwvirtex switched off - probably not a Vagrant issue.
  2. If I use the precise32 box (supplied by the Vagrant maintainers), it works with hwvirtex on or off (there's a noticeable performance penalty when it's switched off, but I'd expect that) - probably not a VirtualBox issue.

I'm disabling VT-X in VirtualBox/Vagrant only (my CPU supports it and it is enabled in the BIOS).

My CPU (from /proc/cpuinfo) is: Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz. The machine has 8GB of RAM installed and the host OS is Ubuntu 13.10.

Output from uname -a in the VM is:

Linux vagrant-gentoo-x86 3.10.25-gentoo #1 SMP Fri Jan 10 14:58:12 GMT 2014 i686 Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz GenuineIntel GNU/Linux

I need to use this box on another machine with an older CPU (Intel E4600), which doesn't support VT-X, so leaving hardware virtualization on is not an option.

Are there any other things I could try in order to fix this?

Was it helpful?

Solution

Of course, sod's law dictates that after spending an hour writing up that question, I come across the answer via another source...

The problem seems to be a combination of the kernel which Gentoo uses (3.10 - hence why Precise doesn't have problems) and support for guests in general when hardware virtualization is disabled. The relevant VirtualBox bug for anyone who is experiencing similar problems is:

https://www.virtualbox.org/ticket/12469

Unfortunately the main response so far is that 'fixing bugs for hosts which don't support VT-x/AMD-V have lower priority'.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top