Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

Install Virtualbox 5.2/6.1 on Ubuntu 16 headless mode

Rumi, May 21, 2021

Install Prerequisites

Before installing VirtualBox 5.2/6.1, please install these packages below if your systems don’t already have them installed….

sudo apt update
sudo apt-get install gcc make linux-headers-$(uname -r) dkms

Add VirtualBox Repository

If you want to always get the latest versions of VirtualBox when they become available, you’ll want to add its software repository to Ubuntu…

Run the commands below to add the repository key to your system…

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

After adding the repository key above, run the commands below to add VirtualBox package repository.

sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"

After that, run the commands below to update Ubuntu repositories.

Installing VirtualBox

At this point, the Ubuntu system should be ready to install the latest version of VirtualBox. First you may want to remove the previous 6.0 version if you’re still running it… to do that, run the commands below:

sudo apt remove virtualbox virtualbox-6.1

Finally, run the commands below to install the latest 6.1 (major) version of the software.

Instal 6.1

sudo apt update
sudo apt-get install virtualbox-6.1

Download and install extpack of 6.1

wget https://download.virtualbox.org/virtualbox/6.1.22/Oracle_VM_VirtualBox_Extension_Pack-6.1.22.vbox-extpack
VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.1.22.vbox-extpack

*Use VBoxManage command as root user.

Install 5.2

You may wish to deploy a backward edition for certain compatibility issue-

sudo apt update
sudo apt-get install virtualbox-5.2

Download and install extpack of 5.2

wget https://download.virtualbox.org/virtualbox/5.2.44/Oracle_VM_VirtualBox_Extension_Pack-5.2.44.vbox-extpack
VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-5.2.44.vbox-extpack

*Use VBoxManage command as root user.

Installing phpvirtualbox First create a system user called vbox and add it to the vboxusers group:

useradd -m vbox -G vboxusers

Create a password for the vbox user:

passwd vbox

Create the file /etc/default/virtualbox and put the line

VBOXWEB_USER=vbox

Now, run the following command to check if virtualbox kernel modules are loaded or not.

sudo systemctl status vboxdrv

Or

sudo /etc/init.d/vboxdrv status

Sample output:

vboxdrv.service - VirtualBox Linux kernel module
Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; enabled; vendor preset: enabled)
Active: active (exited) since Thu 2015-11-26 16:38:30 IST; 42s ago

Nov 26 16:38:29 server systemd[1]: Starting VirtualBox Linux kernel module...
Nov 26 16:38:30 server systemd[1]: Started VirtualBox Linux kernel module.
Nov 26 16:38:30 server vboxdrv.sh[15008]: Starting VirtualBox kernel modules....
Hint: Some lines were ellipsized, use -l to show in full.

If it, not loaded, run the following command to load them:

sudo /etc/init.d/vboxdrv setup

For Ubuntu 16 use the following packs:

apt-get install php libapache2-mod-php php-mcrypt php-mysql  php-xml php-soap unzip

Install PHPVirtualBox for 5.2 (as of this content writing there was no updated edition available after 5.2)

wget https://github.com/phpvirtualbox/phpvirtualbox/archive/refs/tags/5.2-1.zip
unzip 5.2-1.zip

use mv command to /var/www/html/<virtualbox_folder>

cd /var/www/html/<virtualbox_folder>
cp config.php-sample config.php
nano config.php

Now edit the following 2 lines-

var $password = 'your_vbox_user_password';
var $vrdeaddress = 'your_virtualbox_IP';

Now login to web browser-

http://<your_virtualbox_ip>/<virtualbox_folder>

Ref:

VBoxHeadless Running Virtual Machines With VirtualBox On A Headless Debian/ubuntu Server


https://websiteforstudents.com/virtualbox-major-update-6-1-released-install-upgrade-on-ubuntu-18-04/

Administrations Configurations (Linux) PhpvirtualboxUbuntuUbuntu 16virtualbox

Post navigation

Previous post
Next post

Comment

  1. Pingback: Install VirtualBox legacy version 5.x on CentOS 7 | Bots!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker endian icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx pfsense php Postfix powerdns Proxmox RDP squid SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin XCP-NG zimbra

Topics

Recent Posts

  • Install Jitsi on Ubuntu 22.04 / 22.10 April 30, 2025
  • Key Lessons in life April 26, 2025
  • Create Proxmox Backup Server (PBS) on Debian 12 April 19, 2025
  • Add Physical Drive in Proxmox VM Guest April 19, 2025
  • Mount a drive permanently with fstab in Linux April 16, 2025
  • Proxmox 1:1 NAT routing March 30, 2025
  • Installation steps of WSL – Windows Subsystem for Linux March 8, 2025
  • Enabling Nested Virtualization In Proxmox March 8, 2025
  • How to Modify/Change console/SSH login banner for Proxmox Virtual Environment (Proxmox VE / PVE) March 3, 2025
  • Install Proxmox Backup Server on Debian 12 February 12, 2025

Archives

Top Posts & Pages

  • Install Jitsi on Ubuntu 22.04 / 22.10
©2025 Bots! | WordPress Theme by SuperbThemes