The other day I tried to install CentOS 8 in VirtualBox on Ubuntu 18.04 LTS desktop. The installed Virtualbox version in my Ubuntu desktop is 5.2 and unfortunately CentOS 8 VM doesn't work in VirtualBox 5.2. When I try to install CentOS 8, the installation ended in mid-way with a strange colorful ASCII characters like below.
All I can do is either reset or forcibly shutdown the CentOS 8 guest. I deleted the CentOS 8 VM, recreated it with higher memory and disk space and tried to install it again, but the installation ended as usual with corrupted graphics. I did this couple times, but no luck. After searching through CentOS forums, I came to know that someone had the same problem and he/she fixed it by upgrading to the latest Virtualbox version, which is 6.1.
Install Oracle Virtualbox 6.1 on Ubuntu 18.04
Even though Virtualbox 6.1 has been released two weeks ago, it is not yet included in the official repositories of Ubuntu 18.04. The default repositories still has virtualbox 5.2 version. So I installed VirtualBox 6.1.2 version in Ubuntu 18.04 LTS like below.
First, add virtualbox official repository. To do so, edit /etc/apt/sources.list file:
$ sudo vi /etc/apt/sources.list
Add the following line:
deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib
If you're using other Debian or Ubuntu version, replace bionic with your distribution's codename, for example 'eoan', 'xenial', 'buster', 'stretch', 'jessie' etc.
Save and exit the file.
Next, add virtualbox GPG key:
$ 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 -
Finally, install Virtualbox 6.1 using command:
$ sudo apt-get install virtualbox-6.1
While installing virtualbox 6.1 version, the old version (i.e. 5.2 in my case) will be automatically removed. Here comes another problem. All VMs which are created with Virtualbox 5.2 didn't start under virtualbox 6.1. It asked me to install Virtualbox extension pack for Virtualbox 6.1 version. I downloaded the virtualbox extensions for version 6.1 from here and installed it using commands:
$ wget https://download.virtualbox.org/virtualbox/6.1.2/Oracle_VM_VirtualBox_Extension_Pack-6.1.2.vbox-extpack
$ sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.1.2.vbox-extpack
Check if the extension pack has been installed or not using command:
$ vboxmanage list extpacks
Extension Packs: 1 Pack no. 0: Oracle VM VirtualBox Extension Pack Version: 6.1.2 Revision: 135662 Edition: Description: Oracle Cloud Infrastructure integration, USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption, NVMe. VRDE Module: VBoxVRDP Usable: true Why unusable:
Great! Virtualbox extension pack is installed.
Now everything works just fine. I can be able to install CentOS 8 and other guest OSes.
Hope this helps.