TL;DR: Add “noapic” to your kernel line if your VBoxHeadless process uses far too much CPU.
I’ve been working on making space-efficient CentOS 5.6 and 6 images for VirtualBox recently. I’m building the images as part of a pilot program to start using the Vagrant gem to allow our developers to test the Drupal code they write on the real production OS before pushing it to the dev server. (I’m also learning Puppet, both for this project and as a way to more easily re-use tested configurations as we launch new sites.)
The CentOS 5.6 images I made worked like a charm, but ran into a problem wherein the VBoxHeadless process that hosted my CentOS 6 image would always use 25% CPU on my MacBook Air (one full core) despite the guest OS showing between 98% and 100% idle.
I read through a number of suggestions that applied to CentOS 5.6, which involved setting
divider="10" in the kernel parameters, but these have no effect under CentOS 6, which uses a tickless kernel.
In reading further on the subject, I found that some other forums advocated looking at the APIC settings. Sure enough, as soon as I added the text
noapic to the end of my kernel line in
/boot/grub/grub.conf and restarted, the issue went away.