Installing VirtualBox
VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use
- Make sure your if your machine allows virtualization. Check your host OS is supported for Virtualbox
- Download VirtualBox from the here. Install the VirtualBox. Check the installation by running below command.
Installing Vagrant
Vagrant manages virtual machines hosted in Oracle VirtualBox. A virtual machine is a software implementation of a computer, running a complete operating system stack on a virtualizer.
Setup CentOS VM
Once you are done with vagrant, now you are ready to setup your CentOS VM.
Run below command, which will create "vagrantfile" under the current working directory. The vagrantfile can be used to configure and provision the VM.
Once you see above message you can run "vagrant up" command, which will pull the CentOS image and create a VM under virtual box, as shown in below image.
Connecting to VM
Once the CentOS is up successfully, you can check in the VirtualBox its setting as well as you can change those.
If CentOS is running then you can connect VM via ssh using below command.
Now your CentOS VM is ready to use.
You can take a snapshot of VM before use, so it can be discarded anytime and clean VM will be ready to use. You can also delete the VM using Virtualbox as well.
No comments:
Post a Comment