Hello people, today I am going to teach you how to install VirtualBox in Deepin 20 without breaking the system. Some took us by surprise that when installing VirtualBox in Deepin 20 beta, with the official site installerAfter restarting the system it did not start, Deepin was broken and did not load the graphical environment.
After the following explanation, it becomes clear that the reason is obvious. The detail is in the kernel version currently used (October 2020) by Debian and Deepin 20.
|Deepin 20 beta||→||core 5.3|
|Deepin 20||→||core 5.4|
|Debian 10||→||kernel 4.19|
As Deepin 20 is based on Debian 10 buster, the tendency is to choose the VirtualBox installer for Debian 10, consequently this installer modifies and reconfigures Deepin 20 for kernel 4.19, but Deepin does not have this one and that is what broke the system .
Already We left Deepin 20 beta behind several weeks ago, but we still recommend being cautious and using the Deepin repository installer, which is already adapted for its 5.4 kernel. This situation will probably continue as long as Deepin and Debian do not share the same kernel version, which has been outdated for Deepin to better support recent hardware.
If we prove that the most recent versions of VirtualBox are safe for Deepin 20, we will upload them to the Deepines Repository and Deepines Store.
Without further ado, I present this simple procedure.
The first thing we are going to do is list the available versions of VirtuaBox and then choose one.
apt list | grep virtualbox
An example of the result is the following.
[email protected]:~$ apt list | grep virtualbox WARNING: apt does not have a stable CLI interface. Use with caution in scripts. boinc-virtualbox/desconocido 7.14.2+dfsg-3 amd64 virtualbox-6.0/desconocido 6.0.10-132072~Ubuntu~bionic amd64 virtualbox-6.1/desconocido,now 6.1.12-139181~Uos-eagle amd64 virtualbox-guest-additions-iso/desconocido,desconocido 6.0.4-1 all [email protected]:~$
In this case the available versions are:
We choose version 6.1 and install with the following command.
sudo apt install virtualbox-6.1
The next step is to install the Extension Pack, this allows better integration of virtualized systems with the guest system, for example to share the clipboard and improve performance.
Execute the following command to download the VirtualBox Extension Pack, it downloads the version corresponding to the VirtualBox that we just installed. Copy it whole, it's a single line.
VB_VERSION=$(virtualbox --help | sed 1q | cut -d " " -f 6 | sed 's/v//'); wget https://download.virtualbox.org/virtualbox/$VB_VERSION/Oracle_VM_VirtualBox_Extension_Pack-$VB_VERSION.vbox-extpack
Next we install the Extension Pack, to do this, execute the following.
sudo VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-$VB_VERSION.vbox-extpack
During installation it asks if you accept the license agreement as shown below.
Do you agree to these license terms and conditions (y/n)?
Write a "y" and press Enter to accept.
Since you no longer need the Extension Pack installer, you can delete it with the following command.
ADD OUR USER TO THE VBOXUSERS GROUP
To add permissions to use the USB ports and to be able to connect USB keys and other devices, add your user to the vboxusers group with this command.
sudo adduser $(whoami) vboxusers
The last step is to restart the computer so that VirtualBox applies the permissions.
That's it and, in my opinion, installing VirtualBox in Deepin 20, using only the terminal, is much simpler and faster than the "graphical method". How much easier is it to copy and paste a few commands than to serve a "bunch" of windows and click next over and over again?
If you want a tutorial on how to create and configure virtual machines let me know in the comments.