Virtualization

Install Vagrant and VirtualBox on Fedora 43/42/41/40

Vagrant focuses on automation, lowering development environment setup time and increasing production parity. This guide will cover installation of Vagrant and VirtualBox on Fedora.

Original content from computingforgeeks.com - post 4703

For KVM users, check: How to Use Vagrant with Libvirt on Linux

Vagrant depends on existing hypervisor to run and deploy Virtual Machines, this can be VirtualBox, KVM, or VMware. This guide covers the installation of VirtualBox before Vagrant on Fedora.

Check CPU Intel VT or AMD-V extensions

The first step is to confirm that your CPU has either Intel VT or AMD-V Virtualization extensions. In some systems, this is disabled on BIOS and you may need to enable it.

cat /proc/cpuinfo | egrep "vmx|svm"

Add VirtualBox RPM repository

Add VirtualBox RPM repository to your Fedora using the following commands:

sudo dnf -y install wget
wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
sudo mv virtualbox.repo /etc/yum.repos.d/virtualbox.repo

After adding the repository, install VirtualBox

sudo dnf install -y gcc binutils make glibc-devel patch libgomp glibc-headers  kernel-headers kernel-devel-`uname -r` dkms
sudo dnf install VirtualBox-7.1

Add your user account to the vboxusersgroup.

sudo usermod -a -G vboxusers ${USER}

Configure VirtualBox Drivers

$ sudo /usr/lib/virtualbox/vboxdrv.sh setup
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.

Download Extension Pack:

cd ~/
VER=$(curl -s https://download.virtualbox.org/virtualbox/LATEST.TXT)
wget https://download.virtualbox.org/virtualbox/$VER/Oracle_VM_VirtualBox_Extension_Pack-$VER.vbox-extpack

You can also download it manually  https://www.virtualbox.org/wiki/Downloads. Once the file is downloaded, install the extension pack by clicking on the Downloaded file.

install virtualbox 6.0 ubuntu 18.04 16.04 debian 9 04

Install Vagrant on Fedora

Vagrant is available on Fedora repositories, install it by running the following command on your terminal:

sudo dnf -y install vagrant

Test Vagrant and Virtualbox Setup Fedora

The best way to perform a test is by installing a VM on the new VirtualBox. Follow any of our guides below to get started.

Related Articles

Debian Creating Ubuntu and Debian OS Template on Proxmox VE Databases Install and Use Mysql Workbench on Fedora 43/42/41/40 Automation How To Configure GitLab FreeIPA LDAP Authentication Debian Set Default Vagrant Provider to VirtualBox or Libvirt

6 thoughts on “Install Vagrant and VirtualBox on Fedora 43/42/41/40”

  1. thank you for putting this together! it’s super useful and it got my machine going with Vagrant. The only thing I had to do different was the guest additions, since I’m running a headless server, I did it via command line as well with:

    sudo VBoxManage extpack install

    Reply
  2. On “Step 3: Install Vagrant on Fedora”, it has 2 sudo (sudo sudo dnf -y install vagrant). Congrats for you work! 😉

    Reply

Leave a Comment

Press ESC to close