In the current Natty alpha this doesn’t work well. I have VirtualBox 4.0 installed from Oracle’s repository, but it doesn’t manage to compile the kernel module it needs – probably because of the “RC” nature of the current Natty’s kernel (2.6.38-rc4) as of this writing.
I’ve seen many posts on the internet about running Ubuntu 11.04 as a guest in VirtualBox, but couldn’t find anyone talking about my problem, which is the opposite – running VirtualBox on Ubuntu 11.04. So here’s how to get this thing working:
- Install VirtualBox 4.0 (from Oracle’s repository)
- Install the kernel headers package for Ubuntu:
sudo apt-get install linux-headers
- Edit the headers’
Makefileto declare the same version as the uname command: run
uname -rand note the suffix after the version number, for example mine says “
2.6.38-3-generic“, so I am interested in “
-3-generic“. Edit the Makefile using
sudo gedit /usr/src/linux-headers-<version>-3-generic/Makefile, and the fourth line should say something like “
EXTRAVERSION = -rc4“. Change the value (in this case “
-rc4“) to what you found out from uname.
autoconf.hto the linux include directory, because it is missing for some reason:
sudo ln -s ../generated/autoconf.h
Now you can run
sudo /etc/init.d/vboxdrv setup and it should complete successfuly and allow you to start VirtualBox.
- Ubuntu 11.04 “Natty Narhwal” Will Not Have A Release Candidate (digitizor.com)
- ‘Natty Narwhal’ Alpha Offers Peek at Ubuntu 11.04 (pcworld.com)