Forked from jonasschultzmblox/prepcentosvboxguestadds.sh
Created
June 6, 2018 13:48
-
-
Save gorvin/76f80f4cf6fdf7712b1cad78297715f3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
#Heavily inspired by clivewalkden/centos-7-package.sh | |
# ( https://gist.github.com/clivewalkden/b4df0074fc3a84f5bc0a39dc4b344c57 ) | |
#However, this one was tested... 2017-JAN-09 | |
vagrant init centos/7 | |
vagrant up | |
vagrant ssh -c "sudo yum -y update" | |
vagrant ssh -c "sudo yum -y install wget nano kernel-devel gcc" | |
vagrant ssh -c "sudo cd /opt && sudo wget http://download.virtualbox.org/virtualbox/5.1.12/VBoxGuestAdditions_5.1.12.iso -O /opt/VBGAdd.iso" | |
vagrant ssh -c "sudo mount /opt/VBGAdd.iso -o loop /mnt" | |
vagrant ssh -c "sudo sh /mnt/VBoxLinuxAdditions.run --nox11" | |
vagrant ssh -c "sudo umount /mnt" | |
vagrant ssh -c "sudo rm /opt/VBGAdd.iso" | |
#Check that we can halt and boot | |
vagrant halt | |
vagrant up | |
#Halt again and package | |
vagrant halt | |
vagrant package | |
#And finally, clean up | |
mv package.box centos7vb.box | |
rm Vagrantfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment