Playground - install virtualbox on Ubuntu

Hi everyone,

I tried to install virtualbox on Ubuntu and I have an issue :
I tried with two methods :

  • by installing the differents packages (virtualbox virtualbox-qt virtualbox-dkms) in according to the official ubuntu documentation
  • by installing keys and repository in according with the official page of virtualbox.

I met an issue with vboxdrv : I have an error message :
The character device /dev/vboxdrv does not exist.

It seems that the reason can be either dkms packages and/or UEFI Secure Boot

Do you have any idea.
Thank you for your help

Have a good day

Hinin

Hello Hinin,

Can you try


sudo apt-get update
sudo apt-get install virtualbox-dkms
sudo apt install  linux-headers-amd64
sudo dpkg-reconfigure virtualbox-dkms 
sudo dpkg-reconfigure virtualbox

Thanks,
KodeKloud Support

HI Ayman,

Thank you for your answer.
But it doesn’t work.
For example, your command sudo apt install linux-headers-amd6 doesn’t work
I tried both playground Ubuntu 20.4 and Centos8 : same results.
I cannot test virtualbox/vagrant … :frowning:
Do you have any other hint ?

Thank you.
Best Regards,

hinin

Hi @hinin , in my case, I always install the Oracle latest version, following those instructions:

You can check all steps here! :slight_smile:

Regards,
Vitor Jr.
KodeKloud Support

Hello Vitor.

Thanks for your answer. But after the setting in the playground (ubuntu 20.4), I have the follow issue :

thank you,

best regards

@hinin try to purge completely this virtualbox installation and then install again. Follow this link for a complete uninstall how-to.
And follow this for a new install.

Regards,
Vitor Jr.
KodeKloud Support

Hi Vitor,

Please, try yourself step by step in the playground (centos8 or Ubuntu) : it doesn’t work.
I lost much time in playground just to pratice your lesson on DevOps rPre-Requisite - chapter vagrant / virtual box.
Thank you for your help
hinin

Hi, @hinin, are you trying to install Virtualbox in a playground Linux box? Since the playground is executed in cloud boxes, and cloud boxes are already virtualised, you won’t be able to install Virtualbox on it. That would require a concept called “Nested Virtualization”. You can check more information here:

The previous instructions for Virtualbox installation are still valid for your laptop, desktop or server, provided that they have virtualisation capabilities.

Regards,
Vitor Jr.
KodeKloud Support

1 Like