This is a POC. Not sure if it works yet.
Add the kernel headers to ROS
$ sudo ros service enable kernel-headers-system-docker
$ sudo ros service up kernel-headers-system-docker
VBox seems to load the guest additions iso to /dev/sr0, but I've been unable to mount it.
RancherOS has a special config that defines the mount points. Not sure if this means it's the only way to add mounts.
I used WinSCP to scp the %VBOX_HOME%\VBoxGuestAdditions.iso to the RancherOS VM.
NOTE: if you upgrade VBox you will probably need to re-install guest additions.
Start a container that will be used to build the guest additions.
NOTE: I had to use the --privileged option to allow the guest iso to be mounted. Probably a more elegant way.
# Run a container in System Docker and bind mount specific directories
$ sudo system-docker run -it --rm --name build-vbox-guest --privileged -v /opt:/opt -v /usr/src:/usr/src -v /lib/modules:/lib/modules ubuntu:17.04
# INSIDE THE CONTAINER
# REF: https://forums.virtualbox.org/viewtopic.php?t=15679
$ apt-get update
$ apt-get install dkms build-essential -y
# Assuming iso is located in /opt, now mount the iso
$ mount -o loop -r -v -t iso9660 /opt/VBoxGuestAdditions.iso /mnt
$ cd /mnt
$ sh ./VBoxLinuxAdditions.run
# TODO: Not sure this will install the module in the host...
# See whats changed in the last 24hrs
$ cd /
$ find . -mtime 0 -printf '%T+\t%s\t%p\n' 2>/dev/null | sort -r | more