VirtualBox (Ubuntu/Debian) on FreeNAS almost a brilliant feature; but

Status
Not open for further replies.

Simon Lock

Dabbler
Joined
Aug 12, 2015
Messages
11
Build: FreeNAS-9.3-STABLE-201511040813
Platform: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
Memory: 24447MB

VirtualBox on FreeNAS is almost a brilliant feature; but I'm assuming its not quite there yet. I'm saying this beacuse no matter what I try I cannot get the VirtualBox Guest Additions to install and then function correctly. I have been trying for weeks now to unlock the features offered by installing the Guest Additions addons within my running guest systems. I have running both Ubuntu and Debian 64bit guest installs on my 64bit FreeNAS. They install and update fine but Guest Additions is a definite no go.

I am aware of all the howto's online explaining the methods of installing the Guest Additions and I've tried all of these but non of them work with my system. When installing using these online methods I either recieve complaints that the headers for the current kernel were not found or a bad return status for module build on the Kernel. Is this a known Virtualbox on FreeNAS problem?

I've tried installing the folowing versions of Guest Additions:
VBoxGuestAdditions_4.3.12.iso
VBoxGuestAdditions_5.0.0_RC3.iso

with the following versions of Ubuntu:
ubuntu-14.04.3-desktop-amd64.iso
ubuntu-15.10-desktop-amd64.iso

And also the following versions of Debian:
debian-7.8.0-amd64-netinst.iso
debian-8.1.0-amd64-netinst.iso
debian-8.2.0-amd64-netinst.iso

I've used the following methods:

Method 1

sudo apt-get update
sudo apt-get upgrade (even tried apt-get dist-upgrade)
sudo apt-get install build-essential module-assistant
sudo m-a prepare

then

for example using VBoxGuestAdditions_4.3.12.iso (VBoxGuestAdditions_4.3.12_93733)

cd /media/USERNAME/VBoxGuestAdditions_4.3.12_93733#
./media/cdrom/VBoxLinuxAdditions.run

I get the following complaints reported and then Guest Additions fails to start:

"The headers for the current Kernel were not found. If the following module compilation fails then this could be the reason.

Building the main Guest Additions module ...done.
Building the shared folder support module ...fail!
.
.
.
Warning: unknown version of the X Window System installed. Not installing X Window system drivers. ...done"


Method 2

sudo apt-get instal virtualbox-guest-addition-iso

Error! Bad return status for module build on kernel: 3:19.0-25-generic (x86_64)
Consult /var/lib/dkms/virtualbox/4.3.10/build/make.log for more information.
* Stopping VirtualBox Kernel modules
* Starting VirtualBox Kernel modules
* No suitable module for running kernel found [Fail]

The results are practically the same with Ubuntu and Debian.


I would be so grateful if someone could help point me in the right direction towards getting either of these installs working correctly with Guest Essentials.

I'm sure someone must have one of these very popular linux distributions running properly with Guest Additions?

Many thanks in advance.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
This is a guest OS issue. Install the kernel headers package, then you can install the guest additions package that matches the installed VirtualBox version (I.e., 4.3.12).
 

Simon Lock

Dabbler
Joined
Aug 12, 2015
Messages
11
Hi danb35

Thanks for your reply. Your reply gives me some hope that it should at least be possible to install Guest Additions within FreeNAS.

I forgot to mention that I've also tried installing the headers using both:

sudo apt-get install linux-headers-$(uname -r)

and also, for Unbuntu 14, by the following method for DESKTOP/TRUSTY:

sudo apt-get install --install-recommends linux-generic-lts-vivid xserver-xorg-core-lts-vivid xserver-xorg-lts-vivid xserver-xorg-video-all-lts-vivid xserver-xorg-input-all-lts-vivid libwayland-egl1-mesa-lts-vivid

as listed here: https://wiki.ubuntu.com/Kernel/LTSEnablementStack

both seem to successfully install the headers but the installation of guest additions still fails.

The following is reported:

"The headers for the current Kernel were not found. If the following module compilation fails then this could be the reason.

Building the shared folder support module ...fail!"

Am I doing something fundamentally wrong?

Thanks again.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
It is absolutely possible to install the guest additions on a guest machine under VirtualBox in FreeNAS--I've done it, under CentOS, Ubuntu, and Windows. Though I'll again point out that this isn't a FreeNAS issue--it's between VirtualBox and the guest OS.

Unfortunately, though I've done it, it's been long enough ago that I can't say for sure what I did, though I don't recall it being terribly involved, and I'm quite sure I didn't install any X.org components. Looking at one of my Ubuntu installations, I see two linux-headers packages for the running kernel version (linux-headers-3.13.0-48, and linux-headers-3.13.0-48-generic), as well as a separate linux-headers-generic package.
 

Simon Lock

Dabbler
Joined
Aug 12, 2015
Messages
11
Thanks again for your reply. I'm not however convinced that this is not a FreeNAS problem; maybe it's a FreeNAS problem simply because the VirtualBox templates used are so far out of date? I say this because I've just installed VirtualBox on my Windows 10 PC albeit Version 5.0.10. and both Ubuntu and Virtualbox Guest Additions installed seamlessly.

I still received the following comment during installation:

"The headers for the current Kernel were not found. If the following module compilation fails then this could be the reason."

However everything installed and functioned correctly.

Hopefully someone who might have installed Ubuntu in a FreeNas VirtualBox Jail more recently will correct me on this assumption. Until then I'm hoping FreeNas 10 will be the ultimate answer to this.

Many thanks.
 

maglin

Patron
Joined
Jun 20, 2015
Messages
299
Simon it is the guest OS issue. If you read what OS is supported by the version of virtual box your eyes will be opened. Also if I remember correctly you have to use 32 bit OS as well. For instance I have Debian 8 installed and working but it not supported so no guest additions. But Debian 7 is supported and the guest additions installed and indeed work as intended.


Sent from my iPhone using Tapatalk
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
OK, I just tried this on a fresh VM. I did a clean install of Ubuntu Server 14.04.1 64-bit, selecting only the SSH server for installation. After booting into the install and installing all the available updates (~165 of them), I did apt-get install build-essential linux-headers-generic. I then installed the VirtualBox Guest Additions 4.3.12:
Code:
dan@ubuntu-test:/media/cdrom$ sudo ./VBoxLinuxAdditions.run 
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.12 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.3.12 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module ...done.
Building the shared folder support module ...done.
Building the OpenGL support module ...done.
Doing non-kernel setup of the Guest Additions ...done.
Starting the VirtualBox Guest Additions ...done.
Installing the Window System drivers
Could not find the X.Org or XFree86 Window System, skipping.
dan@ubuntu-test:/media/cdrom$ 
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
...and because I was bored, I downloaded debian-7.8.0-amd64-netinst.iso, installed it on a new VM, did apt-get install build-essential (didn't need to install the kernel headers; they were installed by default), and installed the guest additions (again, 4.3.12). The only issue was that the installer said I appeared to have a version of the guest additions already installed--apparently that's done as part of the Debian net installation. When I told it to proceed anyway, it completed without errors (other than the lack of X.org, which was because I don't have a graphical environment installed on this VM). I think by now I've shown pretty conclusively that there isn't an issue with VirtualBox on FreeNAS which prevents installing the guest additions.

There's one thing I forgot to mention earlier, but it would have been causing different issues--under the storage settings, for the SAT controller (i.e., what your virtual disk files are attached to), make sure to check the box for "use host i/o cache". Without that setting, I've found VMs to be completely unstable no matter what OS they're running.
 

Simon Lock

Dabbler
Joined
Aug 12, 2015
Messages
11
Thanks Maglin for your suggestions. Also a very big thank you to danb35 for again installing both Ubuntu and Debian into FreeNAS VirtualBoxes in order to demonstrate that FreeNAS is not to blame for my continuing inability to install Guest Additions into these operating systems when hosted by FreeNAS.


dan35: Taking your Ubuntu Server installation as an example I decided to attempt to replicate your actions to see if I too could achieve a working Ubuntu guest, with Guest Additions installed, under FreeNAS. As you will see below I could not.


I actually wanted a fully graphical Ubuntu Desktop installation, where Guest Additions would obviously prove to be very useful. However, as a first step I decided to see if I could get at least the basic terminal only version of Ubuntu Server 14.04.3 to work:

Below are the steps I followed and highlights of the results I encountered.

I downloaded and installed Ubuntu Server 14.04.3 LTS using (ubuntu-14.04.3-server-amd64.iso) and during the installation I too only selected the options to install the openssh server option and also the automatic security updates.

Once installed I signed in and as root and issued the following commands:

1) mount /dev/cdrom /media/cdrom

Because this time the Guest Additions ISO was not automatically mounted.

2) ./media/cdrom/VBoxLinuxAdditions.run

The following is reported:

"The make utility was not found. If the following module completion fails then this could be the reason and you should try installing it.


The gcc utility was not found. If the following module completion fails then this could be the reason and you should try installing it.


Building the main Guest Additions module ...fail!"

No attempt is made to start VirtualBox Guest Additions thereafter.


3) apt-get update

4) apt-get upgrade

5) ./media/cdrom/VBoxLinuxAdditions.run


Makes no difference to what has been reported above in 1)


6) apt-get install build-essential


This installs the missing "make" and "gcc" as reported above in 1)


7) ./media/cdrom/VBoxLinuxAdditions.run


The following is now reported:


Building the main Guest Additions module ...done.

Building the shared folder support module fail!


No attempt is made to start VirtualBox Guest Additions thereafter.


So dan35 as you can see from the above we are both getting very different results when attempting to install the very same installation files. I still have not managed to install Guest Additions into Ubuntu or Debian operating systems when hosted by FreeNAS.
 

Simon Lock

Dabbler
Joined
Aug 12, 2015
Messages
11
I don't see that you installed linux-headers-generic.

I was actually trying to follow your steps for installing Ubuntu server. It was not shown that you had to install Linux-headers-generic?

However, following on from above I attempted each of the following individually:

8) apt-get install dkms
9) apt-get install build-essential
10) apt-get install linux-headers-generic
11) apt-get install linux-headers-$(uname –r)

With the following prompts received:
"Building the main Guest Additions module ...done.
Building the shared folder support module fail!"

No attempt is made to start VirtualBox Guest Additions thereafter.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I did a clean install of Ubuntu Server 14.04.1 64-bit, selecting only the SSH server for installation. After booting into the install and installing all the available updates (~165 of them), I did apt-get install build-essential linux-headers-generic.
Though I didn't spell it out, "installing all the available updates" meant "apt-get update && apt-get upgrade".

Otherwise, I'm stumped. You are installing version 4.3.12 of the guest additions, right? The only other difference I see is that I did cd /media/cdrom, while you ran the command from outside that directory, but I can't see why that would make any difference.
 

DJ9

Contributor
Joined
Sep 20, 2013
Messages
183
You'll need to install the dkms package also. Otherwise when the kernel gets updated for Linux, your guest additions will break. (think curl might be required also.. forgets)
 

qwerion

Dabbler
Joined
Jan 30, 2014
Messages
19
A few weeks late to this party, but the simple solution here is to NOT use the 4.3.12 version of the guest additions. Use whatever the latest version in the 4.3.xx chain is. Apparently it doesn't need to match the underlying VirtualBox version.

No idea how/why GA 4.3.12 won't install successfully for some of us - I never was able to get a successful install of on a linux install with a GUI, but IIRC I was able to get it to install on Ubuntu sever...but then I fubared that up trying to install a GUI onto it. But I have a Ubuntu 14.04 and a Mint 17.2 running perfectly well with a later version of GA on two different FreeNAS boxes.

PS: And I only needed sudo apt-get dkms
 

Simon Lock

Dabbler
Joined
Aug 12, 2015
Messages
11
Thank you qwerion for your suggestion to use the latest 4.3.xx version of Guest Additions. I installed the VBoxGuestAdditions_4.3.34.iso after first installing dkms:


sudo apt-get install dkms


and then the install finally completed without reporting errors.


Now it's installed I can view my Ubuntu 14.04 install full screen using VNC Viewer from my Windows 10 PC.


Do I need to now also install the Extension Pack on my windows 10 PC (or within the VirtualBox Jail itself) in order to use other Guest Additions features such as to share my Windows 10 clipboard with the running Ubuntu Guest and to access shared network drives from the guest etc?


Thanks again and thanks to all who have offered advice. Much appreciated.
 

Doc Chacha

Dabbler
Joined
Sep 18, 2016
Messages
28
the simple solution here is to NOT use the 4.3.12 version of the guest additions.
Thanks for that. After hours of googling and various tries, YOU saved my day !
I used 4.3.38 and it worked flawlessly... (For some reason, I wasn't able to use 4.3.40, as the MD5 checksum was always faulty...)
 
Status
Not open for further replies.
Top