Skip to content

Instantly share code, notes, and snippets.

@tkdchen
Last active July 6, 2016 10:21
Show Gist options
  • Save tkdchen/b1ffea8df4a546ef05e747a103c60f75 to your computer and use it in GitHub Desktop.
Save tkdchen/b1ffea8df4a546ef05e747a103c60f75 to your computer and use it in GitHub Desktop.
Install VBoxGuestAdditions in vagrant box
function install_vb_additions
{
local VB_VERSION="$1";
local download_url=http://download.virtualbox.org/virtualbox/${VB_VERSION}/VBoxGuestAdditions_${VB_VERSION}.iso
curl -C - -O $download_url
sudo mkdir /mnt/iso
sudo mount -o loop VBoxGuestAdditions_${VB_VERSION}.iso /mnt/iso
sudo yum install -y kernel-devel-`uname -r` gcc make perl bzip2
pushd /mnt/iso
sudo ./VBoxLinuxAdditions.run
popd
sudo umount /mnt/iso
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment