Hello Community.
I have set up a lab for test purposes.
I have successfully installed Virtualbox7 and sucessfully installed Hashicorp Vagrant. I wanted to learn how to provision an Ubuntu 22.04 server on virtualbox using vagrant. I run the vagrant init command and edited the Vagrantfile with the following parameters.
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/bionic64"
config.vm.network "public_network"
However, when i issue the vagrant up command, i get the error below:
$ vagrant up
Bringing machine 'default' up with 'libvirt' provider...
Error while connecting to Libvirt: Error making a connection to libvirt URI qemu:///system:
Call to virConnectOpen failed: Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory
Issuing an additional command:
$ vboxmanage showvminfo
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (5.14.0-362.24.1.el9_3.x86_64) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.
Usage - Show configuration information or log file contents for a virtual machine:
I receive the error above.
How do i resolve this error:
WARNING: The vboxdrv kernel module is not loaded.
I checked if virtualization is enabled:
$ lscpu | grep Virtualization
Virtualization: VT-x
I tried to build the kernel modules:
$ sudo /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: You must sign these kernel modules before using VirtualBox:
vboxdrv vboxnetflt vboxnetadp
See the documentation for your Linux distribution..
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: Signing VirtualBox kernel modules.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
Restarting the process did not help.
Kindly help me.