Automated : Ubuntu VM Setup on Virtual Box using Vagrant Cloud

Automated : Ubuntu VM Setup on Virtual Box using Vagrant Cloud

Table of contents

No heading

No headings in the article.

Prerequisites:

  1. Oracle VM Box Installed on the System

  2. Git Bash terminal Installed on the System

In this article, we will see how to set up an Ubuntu VM on Virtual Box Using Vagrant Cloud.

Create a specific directory for vagrant VM in a specific location.

mkdir VagrantVMs
cd VagrantVMs

I have created a directory in my Desktop Folder named VagrantVMS

change the directory to VagrantVMs

Create one more directory named Ubuntu18 in the VagrantVMs directory

Change the directory to the ubuntu18

mkdir ubuntu18
cd ubuntu18

Now open the search browser and navigate to the Vagrant Cloud Web using the following link: https://app.vagrantup.com/boxes/search

You will land on the web like this

Now in Search put the name ubuntu and you will get many ubuntu boxes.

You can check the version and other details for the article's purpose I will be using ubuntu/bionic64 Vagrant box if you want to use the same you can get it using the following link

https://app.vagrantup.com/ubuntu/boxes/bionic64

Open the Link and you will see a vagrant file

Now copy the "ubuntu/bionic64" and navigate back to the Gitbash terminal.

Now give the following command in the terminal and press enter.

vagrant init ubuntu/bionic64

Now if you do the ls command in the directory you will see the Vagrantfile

Now it's the time to Run our VM

So use the following command to start the VM

vagrant up

After this command vagrant will configure everything and your VM will be running which you check using the following command

vagrant status

Now it's time to Login into the VM using the command

vagrant ssh

Now you have logged in to the Ubuntu VM and you can use any Linux command to check and verify.

I will be using the following command to check the VM

  • whoami

  • pwd

  • ifconfig

  • Great! Now your VM is up and running and you can use the VM.

Conclusion: Automatic configuration of OS on a virtual Machine gives the flexibility to learn and experiment with the system.

It's extremely helpful while learning Linux and Implementing the tasks.

Your valuable feedback or suggestions is highly appreciated.

Thanks!

Did you find this article valuable?

Support Know Cloud Community by becoming a sponsor. Any amount is appreciated!