Ubuntu – How to keep guest additions working in virtual box after updates

update-managerupdatesvirtualboxvirtualization

I installed Ubuntu 11.04 on Virtual Box. It had poor performance (had low max resolution, cursor was choppy when going across the screen, none of the unity stuff was there), until I installed the Virtual Box Guest additions. After installing the guest additions, everything worked beautifully until I an update through the update manager. Everything looked like crap again (the unity stuff is gone, and the mouse cursor lags when going across the screen, overall just doesn't look nearly as nice as it did pre-update).

I reran the guest additions installer and everything is almost back to normal (the mouse cursor is one cm off target and there is an inch at the bottom of the screen which you can't use), but I would like to mitigate this for future updates. Is there a way to mitigate this issue when installing updates?

Best Answer

This should have been taken care of by dkms - this builds kernel support each time the kernel is updated.

Ensure dkms is installed before the next time you run the VBoxGuestAdditions module

i.e.

sudo apt-get install dkms
cd /cdrom
sudo sh ./VBoxLinuxAdditions-x86.run