Workaround to re-install guest additions after every kernel update

I have a working VM with ubuntu under virtual box. Everything works fine, but there's a detail that's getting on my nerves.

Every time i receive a kernel update, i have to re-install virtual box's guest additions. Is there a way to automate this besides skipping the update (i found information on that approach here ). Is there a way to keep up with kernel updates without reinstalling the guest additions every time?

Thanks,


Quoting the VirtualBox User Manual:

Be sure to install DKMS before installing the Linux Guest Additions. If DKMS is not available or not installed, the guest kernel modules will need to be recreated manually whenever the guest kernel is updated using the command

/etc/init.d/vboxadd setup as root.

[...]

If it is not installed, use this command for Ubuntu/Debian systems:

sudo apt-get install dkms