Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Based on https://gist.github.com/fernandoaleman/5083680
# Start the old vagrant
$ vagrant init ubuntu_saucy
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
#
# Guest Additions Version: 4.2.16
# VirtualBox Version: 4.3.4
$ vagrant ssh
vagrantup:~$ sudo wget -c http://download.virtualbox.org/virtualbox/4.3.4/VBoxGuestAdditions_4.3.4.iso \
-O VBoxGuestAdditions_4.3.4.iso
vagrantup:~$ sudo mount VBoxGuestAdditions_4.3.4.iso -o loop /mnt
vagrantup:~$ cd /mnt
vagrantup:~$ sudo sh VBoxLinuxAdditions.run --nox11
vagrantup:~$ cd
vagrantup:~$ sudo rm *.iso
vagrantup:~$ sudo /etc/init.d/vboxadd setup
vagrantup:~$ sudo update-rc.d vboxadd defaults
vagrantup:~$ sudo update-rc.d vboxadd enable
vagrantup:~$ exit
# Now check that the Guest Additions work
$ vagrant halt
$ vagrant up
# Package the new VM
$ vagrant halt
$ vagrant package --output ubuntu_saucy_4.3.4.box
@zigomir

This comment has been minimized.

Copy link

commented Dec 10, 2013

Tnx. I also needed to run sudo apt-get install linux-headers-$(uname -r) build-essential before.

@AlphaLiu

This comment has been minimized.

Copy link

commented Dec 20, 2013

vagrantup:$ sudo /etc/init.d/vboxadd setup
vagrantup:
$ sudo update-rc.d vboxadd defaults
vagrantup:~$ sudo update-rc.d vboxadd enable

maybe same as what vagrantup:~$ sudo sh VBoxLinuxAdditions.run --nox11 done

@ariefdfaltah

This comment has been minimized.

Copy link

commented Jan 19, 2016

Thank You Very Much!!

@tonin

This comment has been minimized.

Copy link

commented May 6, 2019

Even easier is to use the vagrant-vbguest plugin and let it do its magic.

vagrant halt
vagrant plugin install vagrant-vbguest
vagrant up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.