7

I have Ubuntu running as a Virtualbox, and every time it upgrades the kernel, the Guest Additions stop working. The install process in Linux requires using a virtual CD, running scripts from the command line, etc. and it's annoying.

Is there any way to keep the guest additions constantly working even when the kernel is upgraded? Can they be installed as Ubuntu packages instead of installing off the virtual CD?

  • SUSE Linux comes with the VirtualBox additions. I thought the same would hold for Ubuntu. – Andrew J. Brehm Aug 19 '10 at 22:14
5

Ubuntu provides the guest utilities from the open source edition of Virtual Box. As far as I know, there is no difference between the two editions as far as the Linux guest utilities are concerned (for example, with a closed source edition of VirtualBox, you can access USB devices from a Linux guest even if the VM has the open source guest utilities).

The packages are virtualbox-ose-guest-utils, virtualbox-ose-guest-x11 and virtualbox-ose-guest-dkms. With that last package installed, the necessary kernel modules are compiled automatically when you upgrade the kernel.

  • Aha! I'd seen virtualbox-guest-additions, but it's just a copy of the ISO image. – endolith Aug 20 '10 at 14:00
  • This doesn't seem to fully work, though. The mouse is integrated, but the resolution doesn't change when the window is resized. Seamless mode is not available, etc. – endolith Aug 31 '10 at 13:32
  • @endolith: I have Ubuntu 10.04 i386 running inside closed-source VirtualBox 3.1 on a Linux amd64 host, with the OSE guest additions from the Ubuntu packages, and both these features work for me. Maybe it depends on the architecture, VirtualBox version, host OS, ... – Gilles Aug 31 '10 at 19:23
  • Is this answer still valid for 12.04? – opensourcechris Dec 17 '12 at 14:04
  • I followed this answer using Ubuntu 12.04 and it has worked fine so far. – opensourcechris Dec 17 '12 at 14:11
5

You can recompile the kernel modules with

/etc/init.d/vboxadd setup

That way, you don't need to reinstall them - just rebuild the modules after a kernel update.

  • 1
    Put that line in a file in the directory /etc/kernel/postinst.d, and it will run automatically whenever a new packaged kernel is installed. – rakslice Apr 5 '12 at 2:02
0

Another solution would be to install dkms (Dynamic Kernel Module Support).

See this answer for details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.