Installing Virtualbox from Terminal Command-line (19.3)

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
greentea
Level 1
Level 1
Posts: 9
Joined: Sat Dec 14, 2019 10:14 pm

Installing Virtualbox from Terminal Command-line (19.3)

Post by greentea »

=
I'm preparing to install Virtualbox and want to know if this is still the best method and correct syntax.
I made one change on the last line. Is this correct?
viewtopic.php?f=90&t=300723&p=1678327#p1678327

Code: Select all

echo "deb http://download.virtualbox.org/virtualbox/debian bionic contrib" | sudo tee -a /etc/apt/sources.list 
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 - 
apt update 
apt install virtualbox-6.1
Already ran apt purge virtualbox. There were no previous installations.

The upgrade to 19.3 was smooth and successful.
Mint 19.3 Cinnamon 64-bit; home built Core i5-8600K and Intel integrated graphics; ASRock H370 mATX; 8 GB mem; NVMe & SATA SSD; 1TB HDD
gm10
Level 20
Level 20
Posts: 10999
Joined: Thu Jun 21, 2018 5:11 pm

Re: Installing Virtualbox from Terminal Command-line (19.3)

Post by gm10 »

Slightly modified:

Code: Select all

echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib" | sudo tee -a /etc/apt/sources.list 
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - 
apt update 
apt install virtualbox-6.1
And the first line only like that because it's bugged on Mint. Users of my PPA can just do the following, but this will fail on official Mint on several levels:

Code: Select all

apt add-repository deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib
greentea
Level 1
Level 1
Posts: 9
Joined: Sat Dec 14, 2019 10:14 pm

Re: Installing Virtualbox (and Extensions) from Terminal Command-line (19.3)

Post by greentea »

Thanks gm10
Much appreciated. Installation seems good.

I modified the thread title to include Extensions. Hope that's OK.

I was advised to add Guest Extensions
AZgl1500 wrote:
Sun Dec 15, 2019 12:47 am
I suspect you will have to install VirtualBox, and then install some version of windows there.
and then run the executable within the Windows program inside VirtualBox.
Make sure you install Guest Extensions.
I followed the instructions in the included Help section Installing Oracle VM VirtualBox and Extension Packs
Downloaded from https://www.virtualbox.org/wiki/Downloads

Install looks good.
Mint 19.3 Cinnamon 64-bit; home built Core i5-8600K and Intel integrated graphics; ASRock H370 mATX; 8 GB mem; NVMe & SATA SSD; 1TB HDD
gm10
Level 20
Level 20
Posts: 10999
Joined: Thu Jun 21, 2018 5:11 pm

Re: Installing Virtualbox (and Extensions) from Terminal Command-line (19.3)

Post by gm10 »

greentea wrote:
Fri Dec 20, 2019 2:54 pm
I was advised to add Guest Extensions
AZgl1500 wrote:
Sun Dec 15, 2019 12:47 am
I suspect you will have to install VirtualBox, and then install some version of windows there.
and then run the executable within the Windows program inside VirtualBox.
Make sure you install Guest Extensions.
I followed the instructions in the included Help section Installing Oracle VM VirtualBox and Extension Packs
Downloaded from https://www.virtualbox.org/wiki/Downloads
Guest Additions (that's their actual name) are included with the virtualbox-6.1 package. You install them from the running virtual machine's devices menu, there's an option at the bottom to insert the guest additions image.

What you downloaded is the optional extension pack for when you want to use your host system's webcam or USB2/3 devices in the virtual machine, otherwise there is no reason to install it.
User avatar
muffybean
Level 5
Level 5
Posts: 556
Joined: Thu Oct 17, 2019 8:22 am
Location: Pembrokeshire-Wales

Re: Installing Virtualbox from Terminal Command-line (19.3)

Post by muffybean »

gm10 wrote:
Thu Dec 19, 2019 6:11 pm
Slightly modified:

Code: Select all

echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib" | sudo tee -a /etc/apt/sources.list 
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - 
apt update 
apt install virtualbox-6.1
And the first line only like that because it's bugged on Mint.
Did this ok GM and it installed fine. However, when I clicked on the /mnt/Sandisk/Windows 10 VM/Windows 10 VM.vbox that my Windows 10 install is on (SSD) I got the following error.
error-VM..png
I assume it is still pointing to the old VB 6.0 which I do not think is completely eradicated from my system. Any idea how to circumvent this?
Running Linux Mint MATE on 2 desktops + Linux Mint Xfce on Netbook + Cinnamon VM on 3rd Desktop
gm10
Level 20
Level 20
Posts: 10999
Joined: Thu Jun 21, 2018 5:11 pm

Re: Installing Virtualbox from Terminal Command-line (19.3)

Post by gm10 »

It told you, run

Code: Select all

sudo /sbin/vboxconfig
User avatar
muffybean
Level 5
Level 5
Posts: 556
Joined: Thu Oct 17, 2019 8:22 am
Location: Pembrokeshire-Wales

Re: Installing Virtualbox from Terminal Command-line (19.3)

Post by muffybean »

Code: Select all

muffy@muffy:~$ sudo /sbin/vboxconfig
[sudo] password for muffy:               
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
muffy@muffy:~$ 
Did this OK but still getting the same error when I select the vbox on my SSD.
Vbox-Error..png
This is the error

Code: Select all

Failed to open a session for the virtual machine Windows 10 VM.

The virtual machine 'Windows 10 VM' has terminated unexpectedly during startup with exit code 1 (0x1).

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: MachineWrap
Interface: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df}
Last edited by karlchen on Sat Feb 01, 2020 12:47 pm, edited 1 time in total.
Reason: replaced [quote] tags by [code] tags
Running Linux Mint MATE on 2 desktops + Linux Mint Xfce on Netbook + Cinnamon VM on 3rd Desktop
gm10
Level 20
Level 20
Posts: 10999
Joined: Thu Jun 21, 2018 5:11 pm

Re: Installing Virtualbox from Terminal Command-line (19.3)

Post by gm10 »

Hmm, I'd say remove everything vbox you've got installed:

Code: Select all

apt purge --autoremove "virtualbox*"
and then reinstall it

Code: Select all

apt install virtualbox-6.1
Last edited by gm10 on Sat Feb 01, 2020 11:54 am, edited 1 time in total.
User avatar
muffybean
Level 5
Level 5
Posts: 556
Joined: Thu Oct 17, 2019 8:22 am
Location: Pembrokeshire-Wales

Re: Installing Virtualbox from Terminal Command-line (19.3)

Post by muffybean »

gm10 wrote:
Sat Feb 01, 2020 6:12 am
Hmm, I'd say remove everything vbox you've got installed:

Code: Select all

apt purge --autoremove virtualbox*"
and then reinstall it

Code: Select all

apt install virtualbox-6.1
Morning GM, I noted that " mark at the end of the first command and left that out as I assumed it a typo. Anyway it worked and then ran the second command and all seemed to go well. However, when I selected the vbox I have now got a second error.

Code: Select all

Failed to open a session for the virtual machine Windows 10 VM.

Implementation of the USB 2.0 controller not found!

Because the USB 2.0 controller state is part of the saved VM state, the VM cannot be started. To fix this problem, either install the 'Oracle VM VirtualBox Extension Pack' or disable USB 2.0 support in the VM settings.

Note! This error could also mean that an incompatible version of the 'Oracle VM VirtualBox Extension Pack' is installed (VERR_NOT_FOUND).

Result Code: NS_ERROR_FAILURE (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

I had previously installed that so assummed that the first command had removed it and re-installed the extension pack and this time it vbox booted fine. I did try to do this first of all by terminal using this command

Code: Select all

apt install Oracle VM VirtualBox Extension Pack
but that did not work; tried leaving the Oracle and then the VM bit off but neither of them worked. Out of interest what would have been the proper terminal command for that. I Finished up doing through VM Virtualbox.
Running Linux Mint MATE on 2 desktops + Linux Mint Xfce on Netbook + Cinnamon VM on 3rd Desktop
gm10
Level 20
Level 20
Posts: 10999
Joined: Thu Jun 21, 2018 5:11 pm

Re: Installing Virtualbox from Terminal Command-line (19.3)

Post by gm10 »

There was no typo in the command I gave.
User avatar
muffybean
Level 5
Level 5
Posts: 556
Joined: Thu Oct 17, 2019 8:22 am
Location: Pembrokeshire-Wales

Re: Installing Virtualbox from Terminal Command-line (19.3)

Post by muffybean »

gm10 wrote:
Sat Feb 01, 2020 8:34 am
There was no typo in the command I gave.
when I copied and pasted the command

Code: Select all

apt purge --autoremove virtualbox*"
nothing happened so I tried it without the " at the end and it worked. Have I done something wrong?
Running Linux Mint MATE on 2 desktops + Linux Mint Xfce on Netbook + Cinnamon VM on 3rd Desktop
gm10
Level 20
Level 20
Posts: 10999
Joined: Thu Jun 21, 2018 5:11 pm

Re: Installing Virtualbox from Terminal Command-line (19.3)

Post by gm10 »

oh lol, I'll be, my bad, there was indeed a typo, but it was that I forgot the initial ". All good though, you don't need to redo it.

I believe the extension pack is not available from the repository, you need to download it from https://www.virtualbox.org/wiki/Downloads.
User avatar
muffybean
Level 5
Level 5
Posts: 556
Joined: Thu Oct 17, 2019 8:22 am
Location: Pembrokeshire-Wales

Re: Installing Virtualbox from Terminal Command-line (19.3)

Post by muffybean »

Yep that is where I got it from and when I right clicked on it, the top line said "Open with Oracle VM VirtualBox" and that did the trick. Many thanks for your help. I would have put SOLVED but as I was not the instigator of this thread did not not think that was correct. So have noted it on my thread here viewtopic.php?p=1746370#p1746370
Running Linux Mint MATE on 2 desktops + Linux Mint Xfce on Netbook + Cinnamon VM on 3rd Desktop
nerozero
Level 1
Level 1
Posts: 7
Joined: Sat Jun 03, 2017 1:36 am

Re: Installing Virtualbox from Terminal Command-line (19.3)

Post by nerozero »

Guys, Thank you so much!
Netherprovinc3
Level 4
Level 4
Posts: 353
Joined: Mon Feb 04, 2019 9:29 pm

Re: Installing Virtualbox from Terminal Command-line (19.3)

Post by Netherprovinc3 »

gm10 wrote:
Thu Dec 19, 2019 6:11 pm
Slightly modified:

Code: Select all

echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian bionic contrib" | sudo tee -a /etc/apt/sources.list 
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - 
apt update 
apt install virtualbox-6.1
And the first line only like that because it's bugged on Mint.
When I installed VirtualBox 6.0 on Linux Mint 19.1 Cinnamon (around August 2019), I didn't have this part of your code in there:

Code: Select all

[arch=amd64] 
(which you have towards the beginning of the 1st line).

You give some explanation as to why we need that in there but I don't follow what you are saying. (A bug with Linux Mint?)

I just updated to 6.1.

Everything seems to be fine so far.

Should I just add that extra part to the code for if I ever had to install again (Maybe onto Linux Mint 20)?
Linux Mint 19.1 Cinnamon unless otherwise noted.
Post Reply

Return to “Software & Applications”