Hello guys. Today we'll look at How to install centos 7 box with vagrant on virtualbox. Below are the steps to follow
1) First download the Centos 7 vagrant box from the link http://www.vagrantbox.es/. Direct Link to download the CentOS 7 box
Once the download is complete, create a vagrant folder on your home directory
3) You should have the vagrant already installed, if not installed download vagrant and install it.
For my case, i am using vagrant 1.7.4 and Virtualbox 5.0. Have a look at How to install Virtualbox Latest on Ubuntu and Kali Linux
Now open the terminal as standard user and cd to directory containing vagrant centos7 box
4) Add the centos7 box by typing the following command
If the Virtual machine was created on Virtualbox,You'll should see the message, " The box successfully added to Virtualbox"
5) Now create Vagrantfile needed to start the vm by typing"
6) Edit the Vagrantfile and replace the name of box inside the file with the name you specified in the --name option while creating the vm from the box file.For my case the name is centos7. Use any editor you like, make changes and save them to the file.
7) Now it's time to start the added box. Use the command
9) Next time you want to ssh in to the Centos 7 box added, just cd to the directory you created and do
1) First download the Centos 7 vagrant box from the link http://www.vagrantbox.es/. Direct Link to download the CentOS 7 box
Once the download is complete, create a vagrant folder on your home directory
mkdir -p ~/vagrant/centos7
cd ~/vagrant/centos72)Now copy the downloaded centos7 vagrant box and put it in the directory you just created.
3) You should have the vagrant already installed, if not installed download vagrant and install it.
For my case, i am using vagrant 1.7.4 and Virtualbox 5.0. Have a look at How to install Virtualbox Latest on Ubuntu and Kali Linux
Now open the terminal as standard user and cd to directory containing vagrant centos7 box
4) Add the centos7 box by typing the following command
vagrant box add centos-7.0-x86_64.box --name centos7Replace centos7 by the name you want the box to have and centos-7.0-x86_64.box by the name of the box you downloaded.
If the Virtual machine was created on Virtualbox,You'll should see the message, " The box successfully added to Virtualbox"
5) Now create Vagrantfile needed to start the vm by typing"
vagrant init
6) Edit the Vagrantfile and replace the name of box inside the file with the name you specified in the --name option while creating the vm from the box file.For my case the name is centos7. Use any editor you like, make changes and save them to the file.
vi Vagrantfile
7) Now it's time to start the added box. Use the command
vagrant up8) Login to the CentOS 7 Virtual Machine with the command
vagrant sshYou can see that i have successfully login to the Centos 7 box on Virtualbox from the Screen-shot below. You can do system update and upgrade.
9) Next time you want to ssh in to the Centos 7 box added, just cd to the directory you created and do
vagrant sshWatch the Video Below for More details and Clarification.