Setting Up Virtual box, Vagrant for Linux on your Windows Machine(Beginner's guide)

Setting Up Virtual box, Vagrant for Linux on your Windows Machine(Beginner's guide)

Table of contents

No heading

No headings in the article.

* Click on Oracle VM VirtualBox. Download
* Click on the platform packages that best suites you. I am using a Windows platform, soi will be clicking on Windows host (https://download.virtualbox.org/virtualbox/7.0.6/VirtualBox-7.0.6-155176-Win.exe)
* Download the supported packages https://download.virtualbox.org/virtualbox/7.0.6/Oracle_VM_VirtualBox_Extension_Pack-7.0.6a-155176.vbox-extpack do not forget to install

Vagrant

  • Click on Vagrant by HashiCorp (vagrantup.com)

  • Click on Download Open Source

  • Click on Linux - Click on the Binary Download that goes with your machine Operating System (I am using AMD64) do not forget to install after downloading

  • Go to whatever terminal and run these commands to create boxes where you are going to initialize the Ubuntu OS

  • Go to Vagrant Cloud to search for the Operating system you are about to initialize. Discover Vagrant Boxes - Vagrant Cloud (vagrantup.com)

  • Search for Ubuntu/focal64 as that is the version of ubuntu I will be making use of.

  •               vagrant init ubuntu/focal64
    

    * We nano into the Vagrantfile to give it a Dynamic Host Configuration Protocol

  • Make changes to the Vagrant file.

You can now Vagrant up, but If you get this error like I did.

you can solve it by:

-- Going to the Virtual box, Shutdown any machines running, Go to the file on the upper right side click on tools, click on Network manager, go to host only managers and remove the adapters there.

---Then vagrant up again

If you get an error as I did

-- You will need to enable Virtualization on BIOS

i) Restart ur computer and press the esc key continuously before it comes up.
ii) It will bring you to a different interface
iii) Then press the f10 key which will take you to BIOS
iv) On BIOS click System Configuration ->Device Configuration -> Enable Virtualization Technology-> Save
v) Restart the system and run.

vagrant up

  • The machine is ready to ssh

    Then run

  •       vagrant ssh.
    
Β