2 # Called by packer to install VirtualBox Guess Additions, which
3 # required by Vagrant for things like mounting shared dirs.
5 # Echo commands as they are run
8 # Install utilities required by VB Guest Additions install
9 # TODO: Is all of @Base and @Core strictly required?
10 sudo yum install -y @Base @Core bzip2 gcc kernel-devel
12 # Install VirtualBox Guest Additions (downloaded by Packer)
13 sudo mount -o loop /home/vagrant/VBoxGuestAdditions.iso /mnt
14 sudo /mnt/VBoxLinuxAdditions.run
16 # Clean up VirtualBox Guest Additions install media to save space
18 rm -rf /home/vagrant/VBoxGuestAdditions.iso
19 sudo rm -rf /usr/src/vboxguest*
21 # Clean up utilities required by VB Guest Additions install to save space
22 # Don't remove bzip2, it's only 87k. Removing gcc saves 37M, kernel-devel 32M.
23 sudo yum remove -y gcc kernel-devel