Skip to content

Instantly share code, notes, and snippets.

@crazycode
Forked from fernandoaleman/gist:5083680
Last active August 29, 2015 14:04
Show Gist options
  • Save crazycode/5f19c1c20f678630f2ce to your computer and use it in GitHub Desktop.
Save crazycode/5f19c1c20f678630f2ce to your computer and use it in GitHub Desktop.
# Start the old vagrant
$ vagrant init centos-6.4
$ 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.1.18
# VirtualBox Version: 4.3.14
$ vagrant ssh
vagrantup:~$ sudo yum -y update
vagrantup:~$ cd /opt
vagrantup:~$ sudo wget -c http://download.virtualbox.org/virtualbox/4.3.14/VBoxGuestAdditions_4.3.14.iso \
-O VBoxGuestAdditions.iso
vagrantup:~$ sudo mount VBoxGuestAdditions.iso -o loop /mnt
vagrantup:~$ cd /mnt
vagrantup:~$ sudo sh VBoxLinuxAdditions.run --nox11
vagrantup:~$ cd /opt
vagrantup:~$ sudo rm *.iso
vagrantup:~$ sudo /etc/init.d/vboxadd setup
vagrantup:~$ sudo chkconfig --add vboxadd
vagrantup:~$ sudo chkconfig vboxadd on
vagrantup:~$ exit
# Now check that the Guest Additions work
$ vagrant halt
$ vagrant up
# Package the new VM
$ vagrant halt
$ vagrant package
$ mv package.box centos-6.4.box
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment