Followers

Vagrant - Add or Create a Ubuntu 18.04 VM

 Create a VM using Vagrant. Prerequisites  Vagrant is to be installed Virtual Box is to be installed Step 1: Goto  Vagrant website and Clic...

 Create a VM using Vagrant.

Prerequisites 

Vagrant is to be installed

Virtual Box is to be installed

Step 1: Goto Vagrant website and Click on Find Boxes Button.

Step 2: In Search Box search ubuntu word and hit enter key.

Step 3: At the bottom, you will find generic/ubuntu1804 and select it.

Step 4: Click on New Tab.

Step 5: Create a folder on your hard drive (C:\VMS\Ubuntu01)

Step 6: Goto command prompt and change directory to C:\VMS\Ubuntu01( cd C:\VMS\Ubuntu01).

Step 7: On the command prompt run the below commands

vagrant init generic/ubuntu1804
vagrant up

Connect to the ubuntu 18.04 vm.

There are multiple ways to connect with vm.

Connect VM using command prompt or command terminal (for mac os)

Step 1: Change the directory where vm is created  C:\VMS\Ubuntu01

Step 2: Run below command to connect with vm on command prompt.

            vagrant ssh

Let's find out the port forwarding for your VM in the virtual box.

  • Select ubuntu vm in virtualbox
  • Click on settings
  • Click on Network
  • Click on Advance
  • Click on Port forwarding button
  • Note down the Host Port number (In my case it is 2222)


Connect VM using Putty.


Step 1: On HostName provide vagrant@127.0.0.1

Step 2: In Port enter 2222 ( check the port forwarding steps as mentioned above).

Step 3: Click on open and Accept the connection request.

Step 4: Enter the password as vagrant and hit enter key.


Connect VM using MobaXterm.

Step 1: Download and Install MobaXterm

Step 2: Open Mobaxterm and Click on Session-->SSH

Step 3: Remote Host name: 127.0.0.1

            specify username: vagrant

             port number 2222

             Click ok button









COMMENTS

Name

Ansible,6,AWS,1,Azure DevOps,1,Containerization with docker,2,DevOps,2,Docker Quiz,1,Docker Swarm,1,DockerCompose,1,ELK,2,git,2,git quiz,1,Git Worksheet,1,ITIL,1,ITSM,1,Jira,3,Kubernetes,1,Kubernetes Quiz,5,SAST DAST Security Testing,1,SDLC Quiz,5,SonarQube,3,Splunk,2,vagrant kubernetes,1,YAML Basics,1,
ltr
item
DevOpsWorld: Vagrant - Add or Create a Ubuntu 18.04 VM
Vagrant - Add or Create a Ubuntu 18.04 VM
DevOpsWorld
https://www.devopsworld.co.in/2022/04/vagrant-add-or-create-ubuntu-vm.html
https://www.devopsworld.co.in/
https://www.devopsworld.co.in/
https://www.devopsworld.co.in/2022/04/vagrant-add-or-create-ubuntu-vm.html
true
5997357714110665304
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content