User:Espinosa cz/Installing VirtualBox 6 Guest Additions

Jump to: navigation, search

My personal notes from 2019-09-23:

According to the official documentation at https://en.opensuse.org/VirtualBox ..as of openSUSE 11.4 the packaged Guest Additions version is slightly old, and may not allow use of Shared Folders. They are taking about openSuse's official packages virtualbox-guest-kmp-default, virtualbox-guest-tools, virtualbox-guest-x11. I would also add Auto-resize Guest Display as an immensely useful feature which is also missing in the official openSuse package.

To put it shortly: this packages contain outdated crap, they are not installed by default for a reason. Do NOT install. AVOID. If installed, remove.

The official documentation is outdated and in a serious need of update, the GUI menu is not there anymore, the path is different, different package is needed to be installed - ahhhhh.

The installation of Guest Additions should be easy and transparent, smooth and GUI driven. It's NOT. It's currently broken in fact. Tested today.
The official user friendly way is to simply VBox GUI -> Devices -> Insert Guest CD Image. This starts automatic download of the relevant Additions ISO version and should mount and possibly also install it for you.
But it fails on the fist step, on the simplest step, on the download. It always fails at 86% of the download for me. Grrrr.
It always fails with this error message:

  The network operation failed with the following error:
  During network request: Unknown reason.

You have to download manually from: https://download.virtualbox.org/virtualbox/6.0.12/VBoxGuestAdditions_6.0.12.iso
Needles to say that there is nothing wrong with the download, it works perfectly if downloaded by Firefox/Chrome/curl/wget.

It's a known issue, it was reported, and it's not specific to openSuse, see here:
https://www.virtualbox.org/ticket/18653
https://bugs.archlinux.org/task/61586

Oracle's stance to this issue is: WONTFIX; it's because they don't care about patched distribution versions, no, you should be using their own builds from the Oracle own repos. Except, they don't currently support openSuse 15.1.
Someone has to report it with openSuse.

Manual installation of VBox Guest Additions

So here is the way which works. Or at least which worked today for me.

1) Download appropriate VBoxGuestAdditions_X.X.X.iso file. Version must match version of the installed Virtual Box; check in Yast what version you have.
Example of URL is: https://download.virtualbox.org/virtualbox/6.0.12/VBoxGuestAdditions_6.0.12.iso

2) In VirtualBox GUI -> Devices -> Optical Drives -> Choose disk image. It opens file picker dialog. Locate the VBoxGuestAdditions_X.X.X.iso you have just downloaded and select it.

Inside VM (guest system), check that ISO was mounted. You can see it for example in Dolphin, in the left panel, under "Removable devices" should be an item like: VBox_GAs_6.0.12. You can click on it and explore the virtual CD. You should see there file VBoxLinuxAdditions.run (Linux installer) and VBoxLinuxAdditions-amd64.exe (Windows installer) and many more.

3) Using Yast or Zypper, in the VM (guest system), install only virtualbox-guest-source. It adds all necessary dependencies like gcc, kernel-devel and make which all will be needed later.

4) Optional: Check that virtualbox-guest-kmp-default, virtualbox-guest-tools, virtualbox-guest-x11 are NOT installed. Installation script complains if they are present.

5) Inside VM (guest system), run the Oracle's installation script in command line (Konsole/xterm):

$ cd /run/media/test/VBox_GAs_6.0.12/
$ su root
Password: 
$ sh ./VboxLinuxAdditions.run

6) reboot your Guest System

7) after reboot Auto-resize Guest Display is available and so Sharing folders


As an alternative may be installing VirtualBox from Oracle repo

See https://www.virtualbox.org/wiki/Linux_Downloads.
The repo definition is here: https://download.virtualbox.org/virtualbox/rpm/opensuse/virtualbox.repo.
But currently it's broken (welcome to Linux baby, expect most of things to be broken and YOU are here to fix them).
The problem is that the repo definition is trying to be very "clever" and uses "flexible" URL definition using variables: http://download.virtualbox.org/virtualbox/rpm/opensuse/$releasever/$basearch
Which is translated as URL: http://download.virtualbox.org/virtualbox/rpm/opensuse/15.1/x86_64
But there is no such URL, there is no "15.1" repo yet :(
So if you've already upgraded to 15.1, I would give this a miss until Oracle upgrades too. I would see explicit download and manual install as the safer option.

Other distributions

Other distributions seems to provide additions more conveniently
ArchLinux provides community/virtualbox-guest-iso package.
See: https://bugs.archlinux.org/task/61586
Ubuntu provides virtualbox-guest-additions-iso package.
See: https://askubuntu.com/questions/103831/virtual-box-guest-addition-missing-and-cant-be-downloaded
I am not sure how much these packages are up-to-date with Oracle's downloadable.

I would like to share my screenshots here but - you guessed it - it's broken!!!

All my attempts to upload any screenshot here failed with this server side error: Unknown error: "{"error":{"code":"internal_api_error_BadMethodCallException","info":"[a53e5b0281e5339bf816b03b] Exception Caught: MediaWiki\\Session\\SessionProvider::preventSessionsForUser must be implmented when canChangeUser() is false"}}".

Also this wiki does not allow rendering of external images, so I cannot load them to, say, Imgur, where uploads work, and share them here; same way as it works with StackOverflow, and it works there.