[Linux AlmaLinux OS] Vagrant up AlmaLinux OS 8 on VirtualBox

Vagrant up AlmaLinux OS 8

This article is about to run AlmaLinux OS 8 on VirtualBox with Vagrant.

Prerequisites

Vagrant

Vagrant is a tool for building and managing virtual machine environments in a single workflow. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases production parity, and makes the “works on my machine” excuse a relic of the past.

Vagrant by HashiCorp - https://www.vagrantup.com/

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# macOS
$ brew install vagrant

# CentOS
$ sudo yum install -y yum-utils

$ sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo

$ sudo yum -y install vagrant

# Ubuntu
$ curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -

$ sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"

$ sudo apt-get update && sudo apt-get install vagrant

See Downloads | Vagrant by HashiCorp - https://www.vagrantup.com/downloads to learn more.

VirtualBox

VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL) version 2. See “About VirtualBox” for an introduction.

Oracle VM VirtualBox - https://www.virtualbox.org/

While Vagrant ships out of the box with support for VirtualBox, Hyper-V, and Docker, Vagrant has the ability to manage other types of machines as well.

In these tutorials, your project was backed with VirtualBox. But Vagrant can work with a wide variety of backend providers, such as VMware, Hyper-V, and more.

1
2
# macOS
$ brew install vagrant

See Downloads – Oracle VM VirtualBox - https://www.virtualbox.org/wiki/Downloads to learn more.

AlmaLinux OS

AlmaLinux OS is an open-source, community-driven Linux operating system that fills the gap left by the discontinuation of the CentOS Linux stable release. AlmaLinux OS is a 1:1 binary compatible fork of RHEL® guided and built by the community.

AlmaLinux OS Blog - https://almalinux.org/blog/

Usages

Vagrant Init

1
2
3
4
5
6
7
8
9
$ mkdir -p col-almalinux8

$ cd col-almalinux8

$ vagrant init almaLinux/8
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.

Vagrant Up

1
2
3
4
5
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'almaLinux/8'...
...
==> default: Rsyncing folder: /Users/cloudolife/col-almalinux8/ => /vagrant

Vagrant SSH

1
2
3
4
5
6
7
8
$ vagrant ssh
Last login: Tue Sep 25 06:50:13 2021 from 10.0.2.2

[vagrant@localhost ~]$ uname -a
Linux localhost.localdomain 4.18.0-305.19.1.el8_4.x86_64 #1 SMP Wed Sep 15 11:28:53 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux

[vagrant@localhost ~]$ cat /etc/redhat-release
AlmaLinux release 8.4 (Electric Cheetah)

References

[1] Vagrant by HashiCorp - https://www.vagrantup.com/

[2] almalinux - Vagrant Cloud - https://app.vagrantup.com/almalinux

[3] AlmaLinux OS Blog - https://almalinux.org/blog/

[4] Oracle VM VirtualBox - https://www.virtualbox.org/