1. Introduction
I will show how I installed CentOS7 on VirtualBox by Vagrant. Vagrant is a software which help us to easy install os on virtualbox. For install of VirtualBox, refer to [1]. This blog is based on [2].
2. Preliminalies
My host os is CentOS7.
3. Proceure
3.1 Install Vagrant
(1) Download a installer.
wget https://releases.hashicorp.com/vagrant/2.2.18/vagrant_2.2.18_x86_64.rpm
(2) Install from the above installer.
sudo yum localinstall ./vagrant_2.2.18_x86_64.rpm
(3) Check whether install succeed or not
vagrant --version
3.2 Install CentOS7 on VirtualBox
(1) Create a directory in which a configuration file is.
mkdir ~/vagrant-centos-7
cd ~/vagrant-centos-7
(2) Create a box of CentOS7. Box looks like template of a virtual machine.
vagrant box add centos/7
(3) Create a vagrantfile. Vagrantfile is a configuration file of virtual machine.
vagrant init centos/7
(4) Run a virtual machine.
vagrant up
3.3 Useful commands
(1) Connect to virtual machine.
vagrant ssh
(2) Stop virtual machine.
vagrant halt
(3) Delete box.
vagrant destroy
4. References
[1] Installing VirtualBox on CentOS7
[2] Vagrant, Getting Started
https://learn.hashicorp.com/collections/vagrant/getting-started