Virtualbox jail not running after virtualbox-ose-kmod updated

Status
Not open for further replies.

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
Thanks, i have logged in, imported my machine, but i see this error:

SUP_IOCTL_COOKIE: Version mismatch. Requested: 0x280000 Min: 0x280000 Current: 0x260000
 

JWTech

Dabbler
Joined
Sep 25, 2015
Messages
25
Hi all,
as part of Feature #18630 Update to 2016Q4 Ports Tree is updated virtualbox-ose-kmod from 4.3.34 to 5.1.6:

current night build FreeNAS-9.10-MASTER-201612100422 (4d7d293)
[root@freenas3] ~# pkg info | grep -i virtualbox
virtualbox-ose-kmod-5.1.6 VirtualBox kernel module for FreeBSD

last stable FreeNAS-9.10.1-U4 (ec9a7d3)
[root@freenas] ~# pkg info |grep virtualbox
virtualbox-ose-kmod-4.3.34 VirtualBox kernel module for FreeBSD

Because of this update startup of Virtualbox VM in virtualbox jail fails and in "dmesg" output is error:
SUP_IOCTL_COOKIE: Version mismatch. Requested: 0x1a0007 Min: 0x1a0005 Current: 0x260000

Will you create new virtualbox jail template with 5.1.6 vbox version?

With 9.10 are many users using virtualbox jail and freenas 10 is not yet out.

If not, here are steps how to create new virtualbox jail yourself, for those, who want to still use virtualbox with current 9.10 version after update of virtualbox-ose-kmod to 5.1.6.

Before that, backup your machines in original virtualbox jail, so that you can move them to new jail after creation.

Steps to create new virtualbox jail
===================================
Jails -> Add Jail -> "virtualbox"
- this will create standart freebsd jail, do not choose old vbox template

jexec virtualbox

vi /usr/local/etc/pkg/repos/FreeBSD.conf
- url: "pkg+http://pkg.FreeBSD.org/freebsd:10:x86:64/latest",
+ url: "pkg+http://pkg.FreeBSD.org/freebsd:10:x86:64/quarterly",

pkg upgrade
pkg install virtualbox-ose phpvirtualbox apache24 mod_php56

adduser

Username: vbox
Full name: vbox
Uid (Leave empty for default): 1001
Login group [vbox]:
Login group is vbox. Invite vbox into other groups? []: vboxusers
Login class [default]:
Shell (sh csh tcsh git-shell nologin) [sh]:
Home directory [/home/vbox]:
Home directory permissions (Leave empty for default):
Use password-based authentication? [yes]:
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]:
Enter password:VBox123
Enter password again:VBox123
Lock out the account after creation? [no]:
Username : vbox
Password : *****
Full Name : vbox
Uid : 1001
Class :
Groups : vbox vboxusers
Home : /home/vbox
Home Mode :
Shell : /bin/sh
Locked : no
OK? (yes/no): y
adduser: INFO: Successfully added (vbox) to the user database.
Add another user? (yes/no): no
Goodbye!

vi /etc/rc.conf
+ apache24_enable="YES"
+ vboxwebsrv_user="vbox"
+ vboxwebsrv_enable="YES"

service vboxwebsrv start

vi /usr/local/www/phpvirtualbox/config.php
- var $password = 'pass';
+ var $password = 'VBox123';

vi /usr/local/etc/apache24/httpd.conf
- DocumentRoot "/usr/local/www/apache24/data"
+ DocumentRoot "/usr/local/www/phpvirtualbox"
- <Directory "/usr/local/www/apache24/data">
+ <Directory "/usr/local/www/phpvirtualbox">

# In section <IfModule mime_module>, add after x-gzip type for php module:
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
#
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php-sources .phps
#

# workaround for older phpvirtualbox-5.0.5
vi /usr/local/www/phpvirtualbox/endpoints/api.php
- $response['data']['responseData']['phpvboxver'] = @constant('PHPVBOX_VER');
+ $response['data']['responseData']['phpvboxver'] = "5.1-0";

service apache24 start

ifconfig -a|grep inet

http://x.x.x.x
admin/admin

Enjoy!

I would create also template from this, but do now know how..
Kam

Edit: Didn't realize quarterly had just updated, causing this not to work any longer

You may want to make this into a proper how-to guide sometime, seeing as there won't likely be a fix for the old template, and I'm sure many would appreciate it.

Also, the 'vi' edits might be better switched (or added as an alternative) with replace/append commands, to speed things up, and simplify the process.
You could also use the 'ee' command for editing, as it's native to FreeBSD and considerably easier to work with than 'vi', or you could even add 'nano' to the packages installed on the jail, then continue editing with that due to ease-of-use.


sed -i '' 's/latest/quarterly/g' /usr/local/etc/pkg/repos/FreeBSD.conf

vi /etc/rc.conf
+ apache24_enable="YES"
+ vboxwebsrv_user="vbox"
+ vboxwebsrv_enable="YES"

printf 'apache24_enable="YES"%s\nvboxwebsrv_user="vbox"%s\nvboxwebsrv_enable="YES"' >> /etc/rc.conf

vi /usr/local/www/phpvirtualbox/config.php
- var $password = 'pass';
+ var $password = 'VBox123';

sed -i '' "s/password = 'pass'/password = 'VBox123'/g" /usr/local/www/phpvirtualbox/config.php

vi /usr/local/etc/apache24/httpd.conf
- DocumentRoot "/usr/local/www/apache24/data"
+ DocumentRoot "/usr/local/www/phpvirtualbox"
- <Directory "/usr/local/www/apache24/data">
+ <Directory "/usr/local/www/phpvirtualbox">

sed -i '' 's@DocumentRoot "/usr/local/www/apache24/data"@DocumentRoot "/usr/local/www/phpvirtualbox"@g' /usr/local/etc/apache24/httpd.conf sed -i '' 's@Directory "/usr/local/www/apache24/data"@Directory "/usr/local/www/phpvirtualbox"@g' /usr/local/etc/apache24/httpd.conf

...

and so on.

You should also be able to one-line the entire 'adduser' step as well.
 
Last edited:

scatolino

Cadet
Joined
Jan 18, 2017
Messages
1
I thought I did too, but I double checked and I didn't miss that part. From what I can see, it looks like the package was updated on the 3rd to 5.1.12. Currently I'm trying to downgrade to 5.1.6 so that it matches up. I also looked into updated the kernel module, but that'd have to be done outside the Jail, and I don't want to mess with that.

Same here. I can't find a way to downgrade to 5.1.6... I'm stuck. The how-to is not working anymore.
 

jidckii

Cadet
Joined
Nov 22, 2015
Messages
5
Hi.
It seems the problem for more than a year.
There is still no Virtualbox 5.1.6 template?
There is a bug on this issue on the tracker?
 

Kam

Dabbler
Joined
Mar 28, 2016
Messages
39
There were more bugs filled where developers explained that official virtualbox template is dessuported and this issue will not be fixed.
We can only create new virtualbox jail ourself, if we have correct virtualbox version, which matches modules in host.
 

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
Do you have a correct version. I am searching for it

Gesendet von meinem LG-H850 mit Tapatalk
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
Thanks, i have logged in, imported my machine, but i see this error:

SUP_IOCTL_COOKIE: Version mismatch. Requested: 0x280000 Min: 0x280000 Current: 0x260000

Is there anything that can be done about this? Right now, my VM is bricked and there is no way I can find to allow me access to the VM.
I've reinstalled as per post 1, but my existing VMs cannot be restarted.

Looks like reinstalling/configuring the VM'ed OS'es seems to be the only way, but really... bricking the user's VMs is just not a nice thing for the devs to do, is it?

What's the point of maintaining VM snapshots etc if the devs are just going to brick the system anyway, and from what i can see, without notice. If i'd known that the last update would render the system useless, i'd not have bothered updating. This is now the 2nd time in a year that a Freenas update has <censored> up the system.
 

jidckii

Cadet
Joined
Nov 22, 2015
Messages
5
I understand in freenas 10 will default bhyve.
Therefore, in support of virtualbox does not make sense.

a manual on the current I faced here with a problem:
1485935231174.png


what's wrong ?

here there are instructions on how to create a template:
http://doc.freenas.org/9.10/jails.html#managing-jail-templates
can someone share a working version ?

Code:
# pkg info | grep -i virtualbox 
virtualbox-ose-kmod-5.1.6  VirtualBox kernel module for FreeBSD
 
Last edited:

noobnas

Dabbler
Joined
Aug 18, 2014
Messages
20
I found that I have older virtualbox package still in a cache on one machine
root@virtualbox:/var/cache/pkg # ls -la /var/cache/pkg/virtualbox-ose-5.1.6_1-b81cf4010c.txz
-rw-r--r-- 1 root wheel 42999872 Dec 15 07:53 /var/cache/pkg/virtualbox-ose-5.1.6_1-b81cf4010c.txz
is it possible to copy it to jail on other machine and install it from file? with which "pkg" command?

EDIT: thanks for example with ports, I will try it.
Can you please post the txz file somewhere for us to download?
 

noobnas

Dabbler
Joined
Aug 18, 2014
Messages
20

j0achim

Dabbler
Joined
Nov 22, 2016
Messages
11
After a ton of searching I have manged to find both virtualbox-ose 5.1.6 and virtualbox-ose-kmod 5.1.6, now however it appears that libvncserver0 is also an issue.

Does anyone have a copy of libvncserver-0.9.10.txz ?

Code:
root@virtualbox:/usr/lib # pkg info | grep virtualbox
phpvirtualbox-5.0.5            AJAX Web Interface for VirtualBox
virtualbox-ose-5.1.6_1         General-purpose full virtualizer for x86 hardware
virtualbox-ose-kmod-5.1.6      VirtualBox kernel module for FreeBSD


Now when starting a VM i get the message "Could not find the VirtualBox Remote Desktop Extension library".

Code:
VirtualBox VM 5.1.6 r110634 freebsd.amd64 (Dec 15 2016 06:00:01) release log
00:00:00.029511 Log opened 2017-02-09T18:01:52.350198000Z
00:00:00.029512 Build Type: release
00:00:00.029521 OS Product: FreeBSD
00:00:00.029523 OS Release: 10.3-RELEASE
00:00:00.029526 OS Version: FreeBSD 10.3-STABLE #0 r295946+1805185(9.10.2-STABLE): Wed Jan 11 17:12:42 UTC 2017     root@gauntlet:/freenas-9.10-releng/_BE/objs/freenas-9.10-releng/_BE/os/sys/FreeNAS.amd64
00:00:00.029542 Host RAM: 32679MB total, 2898MB available
00:00:00.029544 Executable: /usr/local/lib/virtualbox/VBoxHeadless
00:00:00.029544 Process ID: 83251
00:00:00.029545 Package type: BSD_64BITS_GENERIC (OSE)
00:00:00.040273 Installed Extension Packs:
00:00:00.040288   Oracle VM VirtualBox Extension Pack (Version: 5.1.6 r110634; VRDE Module: VBoxVRDP unusable because of 'Failed to locate the main module ('VBoxPuelMain')')
00:00:00.040296   VNC (Version: 5.1.6 r110634; VRDE Module: VBoxVNC)
00:00:00.040728 Console: Machine state changed to 'Starting'
00:00:00.041246 rtldrNativeLoad: dlopen('/usr/local/lib/virtualbox/ExtensionPacks/VNC/freebsd.amd64/VBoxVNC.so', RTLD_NOW | RTLD_LOCAL) failed: Shared object "libvncserver.so.0" not found, required by "VBoxVNC.so"
00:00:00.041265 VRDE: Error loading the library '/usr/local/lib/virtualbox/ExtensionPacks/VNC/freebsd.amd64/VBoxVNC.so': Shared object "libvncserver.so.0" not found, required by "VBoxVNC.so" (VERR_FILE_NOT_FOUND)
00:00:00.041277 VRDE: Failed: (VERR_FILE_NOT_FOUND): Could not find the VirtualBox Remote Desktop Extension library
00:00:00.041299 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={872da645-4a9b-1727-bee2-5585105b9eed} aComponent={ConsoleWrap} aText={Could not find the VirtualBox Remote Desktop Extension library}, preserve=false aResultDetail=0
00:00:00.041709 Console: Machine state changed to 'PoweredOff'
00:00:00.062018 Power up failed (vrc=VERR_FILE_NOT_FOUND, rc=NS_ERROR_FAILURE (0X80004005))


Code:
root@virtualbox:/usr/lib # pkg info | grep vnc
libvncserver-0.9.11            Provide an easy API to a custom vnc server



And finally.

Code:
root@virtualbox:/usr/lib # vboxmanage list extpacks
Extension Packs: 2
Pack no. 0:   Oracle VM VirtualBox Extension Pack
Version:      5.1.6
Revision:     110634
Edition:
Description:  USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption.
VRDE Module:  VBoxVRDP
Usable:       false
Why unusable: Failed to locate the main module ('VBoxPuelMain')

Pack no. 1:   VNC
Version:      5.1.6
Revision:     110634
Edition:
Description:  VNC plugin module
VRDE Module:  VBoxVNC
Usable:       true
Why unusable:

 
Last edited:

j0achim

Dabbler
Joined
Nov 22, 2016
Messages
11
Installed libvncserver 0.9.9 and now I have VirtualBox running on FreeNAS-9.10.2-U1 (86c7ef5)

Code:
root@virtualbox:/home/vbox # pkg info | grep vnc
libvncserver-0.9.9_11          Provide an easy API to a custom vnc server

root@virtualbox:/home/vbox # pkg info | grep virtualbox
phpvirtualbox-5.0.5            AJAX Web Interface for VirtualBox
virtualbox-ose-5.1.6_1         General-purpose full virtualizer for x86 hardware
virtualbox-ose-kmod-5.1.6      VirtualBox kernel module for FreeBSD


 

ArgaWoW

Patron
Joined
Jul 4, 2015
Messages
444
Hi,
can you do a "step by step how to" for the installation. Me really a noob on these things :/

Thanks in advance for your time

Gesendet von meinem LG-H850 mit Tapatalk
 

stallione

Dabbler
Joined
Jan 8, 2014
Messages
15
After a ton of searching I have manged to find both virtualbox-ose 5.1.6 and virtualbox-ose-kmod 5.1.6, now however it appears that libvncserver0 is also an issue.

Does anyone have a copy of libvncserver-0.9.10.txz ?

[/code]

Hello j0achim,
Could you please upload virtualbox-ose-kmod 5.1.6 and libvncserver-0.9.10.txz somewhere? I can provide an ftp site if you have the files or email me the files to rajeshchacko1-at-gmail;
Thanks!
 

j0achim

Dabbler
Joined
Nov 22, 2016
Messages
11
Hi guys, sure.

Firts off I started going through the guide as it tells you.

Remove virtualbox-ose, virtualbox-ose-kmod and libvncserver. (pkg remove ....)


I then start by installing libvncserver-0.9.9 (this wants to install openssl you can either accept this or force the installation, we wont actually need it)
  • pkg add libvncserver-0.9.9_5.txz

Next I installed virtualbox-ose and virtualbox-ose-kmod one of which have to be installed before another, it will tell you so you can't mistakely do wrong.

  • pkg add virtualbox-ose-5.1.6_1-b81cf4010c.txz
  • pkg add virtualbox-ose-kmod-5.1.6.txz

Copy of virtualbox-ose, virtualbox-ose-kmod and libvncserver here.


Done and enjoy!
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
Word of warning to all, only install this 'mod' if you are comfortable in the knowledge that the software may have been modified in some way (not that I am saying it is).

@j0achim, I recommend you link to the source code and provide instructions on how to compile it, instead of providing unverified links.

VirtualBox is unsupported as of 9.10.2-U1. Bhyve is available and is the hypervisor of choice within FreeNAS.
 
Status
Not open for further replies.
Top