-
-
Save vagnernogueira/96897cf6abfbc679a58325678e58aaef 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 | |
# corrigir erro de yum | |
# https://techglimpse.com/failed-metadata-repo-appstream-centos-8/ | |
vagrantup:~$ sudo yum install epel-release | |
vagrantup:~$ sudo yum -y update | |
vagrantup:~$ sudo yum -y install wget vim mlocate net-tools | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment