Skip to content

Instantly share code, notes, and snippets.

@tsabat
Created December 21, 2011 07:06
Show Gist options
  • Save tsabat/1505022 to your computer and use it in GitHub Desktop.
Save tsabat/1505022 to your computer and use it in GitHub Desktop.
upgrade_guest_additions.rb
version = `vboxmanage -v`.split('_')[0]
bash "install guest additions" do
code <<-HERE
sudo apt-get install build-essential module-assistant linux-headers-$(uname -r)
wget -c http://download.virtualbox.org/virtualbox/#{version}/VBoxGuestAdditions_#{version}.iso -O VBoxGuestAdditions_#{version}.iso
sudo mount VBoxGuestAdditions_#{version}.iso -o loop /mnt
sudo sh /mnt/VBoxLinuxAdditions.run --nox11
rm -rf *.iso
HERE
cwd "/tmp"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment