Install Vagrant in Ubuntu 18/Mint 19

Windows Articles

Learn about the Ramnit threat and how to remove it from Windows 10.

Hello! There are computer security threats that can appear spontaneously. But, then they may not last long. On the other hand, malware...

How to get the Nextcloud desktop client on Linux?

Hello friends. We already know how to install a Nextcloud server but now the client is missing. So in this post, you...

How to Backup your call and SMS history in Android

Many times we find ourselves in the situation of having to change our phone, for different reasons, and one of the questions...

Install and configure Apache Guacamole on Debian 10

Hello, friends in this post, you will learn how to install and configure Apache Guacamole in Debian 10. It will be a...

Ubuntu 20.10 available

The new version of Ubuntu is now available, under the code name "groovy gorilla". Ubuntu 20.10 focuses on improving and refining the...
Mel Khamlichi
Mel Khamlichihttp://www.osradar.com
Founder of Osradar, from Amsterdam Netherlands

Vagrant is an very strong open source command line tool for building and managing virtual machine environments. Vagrant can provision machines on top of VirtualBox, Hyper-V and Docker. Vagrna propose paid plugin solution for Libvirt (KVM), VMware and AWS. i wish to  show  in this tutorial how to use Vagrant with Virtualbox.

1- Install  Virtualbox in Ubuntu 18 of Mint 19

there is an easy way to install virtualbox without adding new PPA repos of adding new sources to source.lis file

just do

apt install virtualbox

For GUI  interface to manage the guests do

apt install virtualbox-qt

 

You can reboot and check if everything is Ok.

2-Install   Vagrant

2-1-Check Vagrant installed version

root@osradar-mint:~# vagrant --version
Vagrant 2.0.2
root@osradar-mint:~#

3-Lets  Start with Vagrant .

We can create an separated directory for projects like /home/projects

mkdir /home/projects
cd  /home/projects

Here is the link to discover all  Vagrant Boxes

4-Vagrant  options

To see  all about Vagrant  options. just type vagrant comand.

For CentOS
# vagrant init centos/7
For Ubuntu
# vagrant init ubuntu/bionic64
For Archlinux
#vagrant init archlinux/archlinux

5-Let’s try archlinux 

 

create project under /home/projects/archlnux 
mkdir /home/projects/archlinux; cd /home/projects/archlinux
root@osradar-mint:/home/projects/archlinux# vagrant init archlinux/archlinux
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
root@osradar-mint:/home/projects/archlinux#

this will download the condif  file to  /home/projects/archlinux called  Vagrantfile . you can edit the file for a specific  settings   . else  just   start  the with standard configuration

root@osradar-mint:/home/projects# vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'archlinux/archlinux' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'archlinux/archlinux'
default: URL: https://vagrantcloud.com/archlinux/archlinux
==> default: Adding box 'archlinux/archlinux' (v2018.12.05) for provider: virtualbox
default: Downloading: https://vagrantcloud.com/archlinux/boxes/archlinux/versions/2018.12.05/providers/virtualbox.box
==> default: Successfully added box 'archlinux/archlinux' (v2018.12.05) for 'virtualbox'!
==> default: Importing base box 'archlinux/archlinux'...
Progress: 20%

Connect to Vagrant Virtual Machine

because of the  ssh generated  keys, you can login to the vagrant box  without password, just do :

#vagrant ssh

To Stop the virtual machine

#vagrant halt

Destro the Virtual machine  with vagrant destroy

root@osradar-mint:/home/projects/archlinux# vagrant destroy
default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Destroying VM and associated drives...
root@osradar-mint:/home/projects/archlinux#

Please   Share

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

Learn about the Ramnit threat and how to remove it from Windows 10.

Hello! There are computer security threats that can appear spontaneously. But, then they may not last long. On the other hand, malware...

How to get the Nextcloud desktop client on Linux?

Hello friends. We already know how to install a Nextcloud server but now the client is missing. So in this post, you...

How to Backup your call and SMS history in Android

Many times we find ourselves in the situation of having to change our phone, for different reasons, and one of the questions...

Install and configure Apache Guacamole on Debian 10

Hello, friends in this post, you will learn how to install and configure Apache Guacamole in Debian 10. It will be a...

Ubuntu 20.10 available

The new version of Ubuntu is now available, under the code name "groovy gorilla". Ubuntu 20.10 focuses on improving and refining the...
x