-
-
Save clivewalkden/b4df0074fc3a84f5bc0a39dc4b344c57 to your computer and use it in GitHub Desktop.
How to add VirtualBox Guest Additions for vagrant into minimal install of Cent OS 7.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start the old vagrant | |
$ vagrant init centos-7 | |
$ vagrant up | |
# You should see a message like: | |
# Installing Virtualbox Guest Additions 5.0.20 - guest version is unknown | |
$ vagrant ssh | |
vagrantup:~$ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm | |
vagrantup:~$ sudo yum -y update | |
vagrantup:~$ sudo yum -y install wget nano | |
vagrantup:~$ cd /opt | |
vagrantup:~$ sudo wget -c http://download.virtualbox.org/virtualbox/5.0.20/VBoxGuestAdditions_5.0.20.iso \ | |
-O VBoxGuestAdditions_5.0.20.iso | |
vagrantup:~$ sudo mount VBoxGuestAdditions_5.0.20.iso -o loop /mnt | |
vagrantup:~$ cd /mnt | |
vagrantup:~$ sudo sh VBoxLinuxAdditions.run --nox11 | |
vagrantup:~$ cd /opt | |
vagrantup:~$ sudo rm *.iso | |
vagrantup:~$ cat /dev/null > ~/.bash_history | |
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-7.box |
thanks both of you for you support .
i am new to dev ops and i struggled more than 5 hours for taking up vagrant boxes.
finally i got it.
thanks once again
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Made a slight improvement - one you actually can run.
https://gist.github.com/jonasschultzmblox/f15fe3c10769d5f269635a54394c84d4
But all the credits to you!