Unable to Install Guest Additions

Questions about virtualization software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
MattC3
Level 2
Level 2
Posts: 55
Joined: Sat Jul 07, 2018 1:35 am

Unable to Install Guest Additions

Post by MattC3 »

Hi,

I have a Win10 Machine running VirtualBox, on which I'm running LM21. However, I cannot seem to install Guest Additions.

I've tried double clicking on the 'VBoxLinuxAdditions.run' file and one website claimed. I've tried going through a series of terminal commands as another one suggested.

The first did nothing except bring up a text editor box. The second seemed to work - in that it seemed to install things - but then on reboot, after the LM logo, the screen was black and remained that way.

Here's the terminal lines entered [and additional actions]:

Code: Select all

[open Xfce Terminal]
$ sudo apt update
$ sudo apt install build-essential dkms linux-headers-$(uname -r)
['insert' Guest Additions CD]
$ sudo mkdir -p /mnt/cdrom
$ sudo mount /dev/cdrom /mnt/cdrom
$ cd /mnt/cdrom
$ sudo ./VBoxLinuxAdditions.run
['eject' CD]
$ reboot
This caused the system to start to reopen but then hang on a black screen. The only way to escape was power off the machine and revert to a previous snapshot.
Note: before installation of GA is attempted, LM21 seems to work absolutely fine.
VB version is 6.1.16 r140961
I'm running it with 4GB mem; 2 processors; 60GB HDD. Specs might seem a little low, but it's only for trial, and the laptop I'm intending to put it on eventually will have little more than this.

Matt
Last edited by LockBot on Sun Apr 02, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
AndyMH
Level 21
Level 21
Posts: 13696
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Unable to Install Guest Additions

Post by AndyMH »

With the guest additions CD inserted in VB, in mint open a terminal and

Code: Select all

cd /media/sr0
sudo ./VBoxLinuxAdditions.run
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
ajgreeny
Level 7
Level 7
Posts: 1652
Joined: Mon Nov 19, 2007 3:27 pm

Re: Unable to Install Guest Additions

Post by ajgreeny »

Using your Mint VM navigate in terminal to the virtual GA CD, then run command

Code: Select all

sudo bash ./VBoxLinuxAdditions.run
which should then run the script and install the GA for you.
You will have to reboot the VM for any of this to take effect.

EDIT:
Just seen the post above as we were posting at the same moment,but basically we are saying the same thing.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Unable to Install Guest Additions

Post by Cosmo. »

The most easy and free of risks for user mistakes way is to call the guest additions from inside of the running VM from the tools menu, then accept to execute them in the upcoming dialog and the installation will (after entering the password) start.
MattC3
Level 2
Level 2
Posts: 55
Joined: Sat Jul 07, 2018 1:35 am

Re: Unable to Install Guest Additions

Post by MattC3 »

Thanks. Seems to have worked.

However, for other with the same issue, it might be worth me mentioning a few things.

1. For me, the cd line in AndyMH's code was

Code: Select all

cd /media/[user]/VBox_GAs_6.1.16
The was no sr0.

2. It did reboot, although it did take several minutes to run up - presumably installing the GA. The length of time could be mistaken as hanging (although at least one of my previous attempts was over half an hour - this time it was only about three or four minutes).

3. When I first tried to set the clipboard to 'Bidirectional', I couldn't get the keyboard to work. It would work on 'Disabled', but not on others. Only after I ran up Notepad on the host and typed something in there would the 'Bidirectional' setting work. Not sure if this is a glitch in GA or just something peculiar to my set up.

However, it seems to be working now. Thanks to all.

Incidentally, why does double clicking on VBoxLinuxAdditions.run in the file manager not do the same thing? When I right click, the context menu suggests that the default setting is 'Open with "Text Editor" '. As with Windows, 'Open with...' brings up all the apps, but as I'm unfamiliar with Linux, I was uncertain about some of them, and didn't know if one of them would do the job anyway or if the terminal was needed.

Matt
User avatar
AndyMH
Level 21
Level 21
Posts: 13696
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Unable to Install Guest Additions

Post by AndyMH »

MattC3 wrote: Sun Oct 02, 2022 11:14 am 3. When I first tried to set the clipboard to 'Bidirectional', I couldn't get the keyboard to work. It would work on 'Disabled', but not on others. Only after I ran up Notepad on the host and typed something in there would the 'Bidirectional' setting work. Not sure if this is a glitch in GA or just something peculiar to my set up.
Can't comment on mint (it's my main OS, so why run it in a VM?), but setting up an antix VM (this was for a friend, personally I think it is crude compared to mint) I had to add:

Code: Select all

#setup copy/paste to mint
VBoxClient --clipboard
into antix's equivalent of startup applications to get the bi-directional clipboard working properly. I found this out by googling.
Incidentally, why does double clicking on VBoxLinuxAdditions.run in the file manager not do the same thing?
Cos it needs admin privileges to run (sudo) and no way of mint to tell you that or get your password when you just double click. Had you opened the relevant folder as root it would probably have worked. You find these things out by trial and error :( . All part of the learning experience, but worth it.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Reddog1
Level 7
Level 7
Posts: 1932
Joined: Wed Jun 01, 2011 2:12 pm

Re: Unable to Install Guest Additions

Post by Reddog1 »

I may have missed it, but nobody pointed out, when giving instructions, that the 'click and run' doesn't work with Xfce, and that is why you must insert the GuestAdditions.iso (Devices>insert Guest Additions) and after doing so you need to navigate to where it is mounted by the system. Once you've cd'd to the mountpoint, the installation has to be run manually. Just something to keep in mind when running Xfce as a VM.
MattC3
Level 2
Level 2
Posts: 55
Joined: Sat Jul 07, 2018 1:35 am

Re: Unable to Install Guest Additions

Post by MattC3 »

MattC3 wrote: Sun Oct 02, 2022 11:14 am 2. It did reboot, although it did take several minutes to run up - presumably installing the GA. The length of time could be mistaken as hanging (although at least one of my previous attempts was over half an hour - this time it was only about three or four minutes).
Having wrote this, the VM locked up again and I had to reset. There's definitely something amiss with installing GA on my VM.
Reddog1
Level 7
Level 7
Posts: 1932
Joined: Wed Jun 01, 2011 2:12 pm

Re: Unable to Install Guest Additions

Post by Reddog1 »

O.K. Try this. Go to the Oracle VirtualBox download site and download the latest VB directly from the source (ver 6.1.38). The out of date version will uninstall when you install the latest version, or should. I don't use Windows as a host, but there will likely be some sort of dialog about uninstalling the old version. After updating VB, try the GA install again, and be sure the GA version matches the installed version of VB. It certainly cannot hurt to update VBox.

I'm not certain your crashes are actually related to GA. Yes, there appears to have been a problem with GA, but maybe try a different setting for your Display in the VB Manager. Use all of the video memory for the Display that you can use. The default display manager (VMSVGA) may be causing some of this. You can try with the default and Enable 3d Acceleration 'off' first. If that doesn't work, try VBoxSVGA. I'm just saying what I would do.
Locked

Return to “Virtual Machines”