VirtualBox in unRAID


Recommended Posts

Memory problem ??

 

I have been getting the attached memory allocations errors recently (also under unraid v4.7 and v5.0).

They appear every couple of minutes.

 

Can someone assist?

 

Are you switching back & forth between 4.7 & 5rc6 on the same box?

 

I have not come across the errors on my box, but scanned google to see what others have. It would not hurt to run a memory test to check that your ram is ok, but seems like it could be some other things as well.

 

When you get errors like this, what VMs are you running?

 

Is it VMs you just created or are you importing old ones? Guests created prior to version 4 can be imported, but several things have to be done.

 

Are you running multiple VMs at once when this starts occurring (how heavy a load is it on your system).

 

What does free -m & vmstat look like before & after you start VirtualBox?

 

You previously stated you had VirtualBox set to start before the go file is run by placing it in the extras directory.  To troubleshoot, try having it not start automatically, run some commands to see how the system's memory is doing... then run the commands again when starting VirtualBox & each VM to see if you can determine if the problem is due to not enough memory.

Link to comment
  • Replies 528
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Looks like VirtualBox is now available as version 4.1.20. 

 

I should have some time this weekend to compile the new version. I will do it for the same versions of unRAID that I currently have up... unless I see any requests for different versions.

 

Will update this thread once I have completed it.

Link to comment

 

Also a difference in your go file is the line "VBoxManage setproperty websrvauthlibrary null". TBoomer2 used this command & was having an authentication issue. I have not had to use this command. I would recommend trying to start VirtualBox with just the 3 commands above. If you run into issues with authenticating, then can try changing this later. I am not sure it is necessary.

 

The first line of errors you listed is saying a file cannot be found. I suspect that is due to not running installpkg. Let me know what you find with the above information & if you get it working for you. Good luck.

 

Just to clarify - I was getting this error before changing the authentication to null.  Null seemed to permit access into phpVirtualbox and I had no issues spawning the Headless services after that. 

Link to comment

Just to clarify - I was getting this error before changing the authentication to null.  Null seemed to permit access into phpVirtualbox and I had no issues spawning the Headless services after that.

 

Ah, I misunderstood... I never had to make that change & it seemed like that was something you tried after you ran into the problem. Thank you for clarifying.

 

Did you try running VirtualBox as another user aside from root? I recently changed several of my addons to use nobody, but have not tried changing VirtualBox yet.

Link to comment

Hi lainie,

this is my config:

unraid 5.0rc5

using these commands in my go script

installpkg /mnt/cache/install/VirtualBox-4.1.8-unRAID.tgz

vboxwebsrv -b -H 127.0.0.1 --logfile /dev/null >/dev/null

VBoxManage extpack install /boot/packages/Oracle_VM_VirtualBox_Extension_Pack-4.1.18-78361.vbox-extpack

 

Thanks for all the work.  i am having issues with phpvirtualbox.  i installed simplefeatures and the web server.  all that is running good.  everything installs correctly.  i have the web server pointing to my cache drive where i have the www files.  i even eddited the config file to add my username and password because when i would go to the site it would tell me that there was no config file.  so i added that and still cant get into it.  i am using admin admin.  i need your guidance.  getting so fristrated with this thing. 

 

Link to comment

Hi lainie,

this is my config:

unraid 5.0rc5

using these commands in my go script

installpkg /mnt/cache/install/VirtualBox-4.1.8-unRAID.tgz

vboxwebsrv -b -H 127.0.0.1 --logfile /dev/null >/dev/null

VBoxManage extpack install /boot/packages/Oracle_VM_VirtualBox_Extension_Pack-4.1.18-78361.vbox-extpack

 

Thanks for all the work.  i am having issues with phpvirtualbox.  i installed simplefeatures and the web server.  all that is running good.  everything installs correctly.  i have the web server pointing to my cache drive where i have the www files.  i even eddited the config file to add my username and password because when i would go to the site it would tell me that there was no config file.  so i added that and still cant get into it.  i am using admin admin.  i need your guidance.  getting so fristrated with this thing.

 

I have also had problems accessing phpvirtualbox (see above a few posts).

try changing the following:

 

set the authentication to off "var $noAuth = true;" in the config.php file (under phpvirtualbox folder).

 

Hope it help, it did for me  :)

 

also please check if you have a folder in your flash drive "/custom/vbox"

Link to comment

Theone,

Thanks for your fast response.  i had done that to take away the username and password but still no luck.  now it says

"An error occurred communicating with your vboxwebsrv. No more requests will be sent by phpVirtualBox until the error is corrected and this page is refreshed. The details of this connection error should be displayed in a subsequent dialog box."  i created that folder on the flash and still nothing. 

Link to comment

vboxwebsrv -b -H 127.0.0.1 --logfile /dev/null >/dev/null

I'm going to show my ignorance here, in that I am going to tell you to change something and I don't actually know why the change worked for me. Change the loopback address of 127.0.0.1 to your servers actual IP address and see if it starts working. You don't have to reboot the machine, just issue that command at the console, i.e.

vboxwebsrv -b -H [actual ip here] --logfile /dev/null >/dev/null

and try reloading the phpvirtualbox page.

Link to comment

I have the compiled versions for the newest 4.1.20 version of VirtualBox up on my SkyDrive.

 

I have created a directory called "archived" on my SkyDrive share. I moved all the VirtualBox 4.1.18 files into archived.

 

Will rewrite my instructions for version 4.1.20 later this weekend.

 

If you have VirtualBox 4.1.18 running the way you like it, there may be no reason to upgrade. Seems like the problems being posted are coming from configuring phpvirtualbox. The version of phpvirtualbox to use did not change (I am still using phpvirtualbox-4.1-8 ~ VirtualBox 4.1.x Compatible).

 

Actually that may be something to check if you are having problems with phpvirtualbox... just double check yourself to make sure you downloaded phpvirtualbox-4.1-8.zip ~ VirtualBox 4.1.x Compatible as opposed to phpvirtualbox-4.0-7.zip ~ VirtualBox 4.0.x Compatible.

 

From the VirtualBox website, this is what changed between version 4.1.18 to version 4.1.20:

 

VirtualBox 4.1.20 (released 2012-08-20)

 

This is a maintenance release. The following items were fixed and/or added:

 

    VMM: fixed a crash under rare circumstances for VMs running without hardware virtualization

    VMM: fixed a code analysis bug for certain displacement instructions for VMs running without hardware virtualization

    VMM: fixed an interpretion bug for TPR read instructions under rare conditions (AMD-V only)

    Snapshots: fixed a crash when restoring an old snapshot when powering off a VM (bugs #9604, #10491)

    VBoxSVC: be more tolerant against environment variables with strange encodings (bug #8780)

    VGA: fixed wrong access check which might cause a crash under certain conditions

    NAT: final fix for crashes under rare conditions (bug #10513)

    Virtio-net: fixed the problem with receiving of GSO packets in Windows XP guests causing packet loss in host-to-VM transfers

    HPET: several fixes (bugs #10170, #10306)

    Clipboard: disable the clipboard by default for new VMs

    BIOS: the PCI BIOS was not properly detected with the chipset type set to ICH9 (bugs #9301, #10327)

    Mac OS X hosts: adaptions to Mountain Lion

    Linux Installer: fixes for Gentoo Linux (bug #10642)

    Linux guests: fixed mouse integration on Fedora 17 guests (bug #2306)

    Linux Additions: compile fixes for RHEL/CentOS 6.3 (bug #10756)

    Linux Additions: compile fixes for Linux 3.5-rc1 and Linux 3.6-rc1 (bug #10709)

    Solaris host: fixed a guru meditation while allocating large pages (bug #10600)

    Solaris host: fixed possible kernel panics while freeing memory

    Solaris Installer: fixed missing icon for menu and desktop shortcuts

Link to comment

could it be the version of PHP installed?  i originally had unraid-web installed through unmenu.  i removed that and disabled php from installing automatically through unmenu, however, it still says php is installed but newer then the one available.  but i know that simple-features web server comes with php so im guessing thats why. 

i did change the ip address of

vboxwebsrv -b -H [actual ip here] --logfile /dev/null >/dev/null

to my own settings.  but still nothing. 

Link to comment

This is the error i get when logging into phpvirtualbox

 

Exception Object

(

    [message:protected] => Error logging in to vboxwebsrv.

    [string:Exception:private] =>

    [code:protected] => 64

    [file:protected] => /mnt/cache/www/lib/vboxconnector.php

    [line:protected] => 187

    [trace:Exception:private] => Array

        (

            [0] => Array

                (

                    [file] => /mnt/cache/www/lib/vboxconnector.php

                    [line] => 209

                    [function] => connect

                    [class] => vboxconnector

                    [type] => ->

                    [args] => Array

                        (

                        )

 

                )

 

            [1] => Array

                (

                    [file] => /mnt/cache/www/lib/ajax.php

                    [line] => 93

                    [function] => getVersion

                    [class] => vboxconnector

                    [type] => ->

                    [args] => Array

                        (

                        )

 

                )

 

        )

 

    [previous:Exception:private] =>

)

 

 

Location:http://127.0.0.1:18083/

Link to comment

this is the first few lines from config.php from phpvirtualbox

 

<?php

/**

* phpVirtualBox example configuration.

* @version $Id: config.php-example 380 2012-04-17 17:58:57Z [email protected] $

*

* rename to config.php and edit as needed.

*

*/

class phpVBoxConfig {

 

/* Username / Password for system user that runs VirtualBox */

var $username = 'root';

var $password = 'winter';

 

/* SOAP URL of vboxwebsrv (not phpVirtualBox's URL) */

var $location = 'http://127.0.0.1:18083/';

 

/* Default language. See languages folder for more language options.

* Can also be changed in File -> Preferences -> Language in

* phpVirtualBox.

*/

var $language = 'en';

 

/* Set the standard VRDE Port Number / Range, e.g. 1010-1020 or 1027 */

var $vrdeports = '9000-9010';

 

/* Set this to true, to tell phpvirtualbox you are using Windows instead of Linux */

var $oswindows = false;

 

/*

*

* Not-so-common options / tweaking

*

*/

 

// Multiple servers example config. Uncomment (remove /* and */) to use.

// Add ALL the servers you want to use. Even if you have the server set

// above. The default server will be the first one in the list.

/*

var $servers = array(

        array(

                'name' => 'London',

                'username' => 'user',

                'password' => 'pass',

                'location' => 'http://192.168.1.1:18083/',

                'authMaster' => true // Use this server for authentication

        ),

        array(

                'name' => 'New York',

                'username' => 'user2',

                'password' => 'pass2',

                'location' => 'http://192.168.1.2:18083/'

        ),

);

*/

 

// Disable authentication

var $noAuth = true;

 

// Host / ip to use for console connections

#var $consoleHost = '192.168.1.40';

 

// Disable "preview" box

#var $noPreview = true;

 

// Default preview box update interval in seconds

#var $previewUpdateInterval = 30;

 

// Preview box pixel width

#var $previewWidth = 180;

 

// Change default preview aspect ratio to 1.

// http://www.wikipedia.org/wiki/Aspect_ratio_%28image%29#Previous_and_presently_used_aspect_ratios

#var $previewAspectRatio = 1.6;

 

// Enable custom VM icons

#var $enableCustomIcons = true;

 

Link to comment

I recently (within the past week) uncommented the line for "var $noAuth = true;" in my config.php file so I am no longer prompted to login with the admin / admin when bringing up http://lament:8084/phpvb/

 

The default user / pass lines, I left alone. I do not have an unRAID user named vbox.

 

Except for uncommenting the noAuth line, I believe this file was left exactly how I downloaded it.  Could that be the problem? You changed the 2 lines containing the user / pass to a user on your unRAID when it should have been left default?  Or did you try changing these lines after you experienced issues getting phpvirtualbox to come up?

 

This is my full config.php file:

<?php
/**
* phpVirtualBox example configuration. 
* @version $Id: config.php-example 366 2011-12-01 19:56:57Z [email protected] $
*
* rename to config.php and edit as needed.
*
*/
class phpVBoxConfig {

/* Username / Password for system user that runs VirtualBox */
var $username = 'vbox';
var $password = 'pass';

/* SOAP URL of vboxwebsrv (not phpVirtualBox's URL) */
var $location = 'http://127.0.0.1:18083/';

/* Default language. See languages folder for more language options.
* Can also be changed in File -> Preferences -> Language in
* phpVirtualBox.
*/
var $language = 'en';

/*
*
* Not-so-common options / tweaking
*
*/

// Multiple servers example config. Uncomment (remove /* and */) to use.
// Add ALL the servers you want to use. Even if you have the server set
// above. The default server will be the first one in the list.
/*
var $servers = array(
        array(
                'name' => 'London',
                'username' => 'user',
                'password' => 'pass',
                'location' => 'http://192.168.1.1:18083/',
                'authMaster' => true // Use this server for authentication
        ),
        array(
                'name' => 'New York',
                'username' => 'user2',
                'password' => 'pass2',
                'location' => 'http://192.168.1.2:18083/'
        ),
);
*/

// Disable authentication
var $noAuth = true;

// Host / ip to use for console connections
#var $consoleHost = '192.168.1.40';

// Disable "preview" box
#var $noPreview = true;

// Default preview box update interval in seconds
#var $previewUpdateInterval = 30;

// Preview box pixel width
#var $previewWidth = 180;

// Change default preview aspect ratio to 1. 
// http://www.wikipedia.org/wiki/Aspect_ratio_%28image%29#Previous_and_presently_used_aspect_ratios
#var $previewAspectRatio = 1.6;

// Enable custom VM icons
#var $enableCustomIcons = true;

/* Enable HardDisk IgnoreFlush configuration. This controls the "ExtraData" setting
* in "VBoxInternal/Devices/[controller type]/0/LUN#[x]/Config/IgnoreFlush". See
* Responding to guest IDE/SATA flush requests at:
* http://www.virtualbox.org/manual/ch12.html#idp12757424
*
*/
#var $enableHDFlushConfig = true;

/*
Allow to prompt deletion hard disk files on removal from Virtual Media Manager.
If this is not set, files are always kept. If this is set, you will be PROMPTED
to decide whether or not you would like to delete the hard disk file(s) when you
remove a hard disk from virtual media manager. You may still choose not to delete
the file when prompted.
*/
var $deleteOnRemove = true;

/*
* File / Folder browser settings
*/

// Restrict file types
var $browserRestrictFiles = array('.iso','.vdi','.vmdk','.img','.bin','.vhd','.hdd','.ovf','.ova','.xml','.vbox','.cdr','.dmg','.ima','.dsk','.vfd');

// Restrict locations / folders
#var $browserRestrictFolders = array('D:\\','C:\\Users\\Ian'); // Or something like array('/home/vbox','/var/ISOs')

// Force use of local, web server based file browser instead of going through vboxwebsrv
#var $browserLocal = true;

// Disable file / folder browser.
#var $browserDisable = true;

// Disable Windows drive detection
#var $noWindowsDriveList = true;

// Just list all drives from C:\ - Z:\ without checking if they exist or not.
// This may be required on older Windows systems with more than one drive.
#var $forceWindowsAllDriveList = true;

/*
* Misc
*/

/*
* Auto-refresh interval in seconds for VirtualBox host memory usage information.
* Any value below 3 will be ignored.
*/
var $hostMemInfoRefreshInterval = 5;

/* Show % of free host memory instead of % used */
#var $hostMemInfoShowFreePct = true;

/*
* VM Memory warnings.
* 
* If $vmMemoryStartLimitWarn is enabled, each time a VM is started through
* phpVirtualBox, it will check that the available host memory is greater than
* the base and video memory of the VM + 50MB (a little bit of overhead). If it
* is not, a confirmation dialog will be presented to confirm that you want to
* start the VM.
*
* If $vmMemoryOffset is set (and $vmMemoryStartLimitWarn), $vmMemoryOffset
* megabytes is subtracted from the available host memory before the check is
* performed by $vmMemoryStartLimitWarn logic. For instance it may be a good
* idea to always have VM memory requirements + 100MB free. 100 is the default.
*/
#var $vmMemoryStartLimitWarn = true;
#var $vmMemoryOffset = 100;


/*
* Display guest additions version of a running VM on its Details tab
*/
#var $enableGuestAdditionsVersionDisplay = true;

/*
* Display a "minimal" VM list. This will shrink the size of VMs in the VM list
* and exclude some information so that they take up less space.
*/
#var $vmListMinimal = true;

/* Enable Firefox's "App Tab" notification support by changing the browser's title
* when something in phpVirtualBox's VM list changes or an alert is triggered.
*/
#var $enableAppTabSupport = true;

/* Disable any of phpVirtualBox's main tabs */
#var $disableTabVMSnapshots = true; // Snapshots tab
#var $disableTabVMConsole = true; // Console tab

/* Screen resolutions for console tab */
var $consoleResolutions = array('640x480','800x600','1024x768','1280x720','1440x900');

/* Console tab keyboard layout. Currently Oracle's RDP client only supports EN and DE. */
var $consoleKeyboardLayout = 'EN';

/* Max number of network cards per VM. Do not set above VirtualBox's limit (typically  or below 1 */
var $nicMax = 4;

/* Enable advanced configuration items (normally hidden in the VirtualBox GUI)
* Note that some of these items may not be translated to languages other than English. 
*/
#var $enableAdvancedConfig = true;

/* Enable startup / shutdown configuration.
* This only works in linux and you must add the vboxinit file to
* your startup scripts list.
*/
#var $startStopConfig = true;

/* 
Sorting VM List options

var $vmListSort = 'name'; // Default. Sort VM list by VM name
var $vmListSort = 'running'; // Place running VMs at the top of the list
var $vmListSort = 'gui'; // Use drag-and-drop / manual vm ordering
var $vmListSort = 'stateChange'; // Order by VMs' last state change
var $vmListSort = 'os'; // Sort by OS type
var $vmListSort = 'function(..){...}' // uses custom javascript function. Example follows:

// This places running VMs at the top of the list, then orders by
// the last VM state change, then by name. 
var $vmListSort = 'function(a,b) {
	if(a.state == "Running" && b.state != "Running") return -1;
	if(b.state == "Running" && a.state != "Running") return 1;
	if(a.lastStateChange < b.lastStateChange) return 1;
	if(b.lastStateChange < a.lastStateChange) return -1;
	return strnatcasecmp(a.name,b.name);
}';

NOTE: In a multi-user situation, 'gui' is probably a bad idea.

*/
#var $vmListSort = 'name';

// Authentication library.
var $authLib = 'Builtin';

// VM ownership
#var $enforceVMOwnership = true;

// Per-user VM quota
#var $vmQuotaPerUser = 2;


// Allow VDE network configuration. This must be supported by the underlying VirtualBox installation!
// If you do not know what VDE networking is - you do not need it, it is probably not supported by your
// VirtualBox installation and will cause errors if enabled.
#var $enableVDE = true; 

// Disable setting SATA controllers port count to the max port number found when saving VMs.
#var $disableSataPortCount = true;

/* Enable Parallel Port configuration - EXPERIMENTAL
LPT support may or may not work for you. 
!!! VirtualBox LPT support only works in Linux. !!!
*/
#var $enableLPTConfig = true;

/* Enable HardDisk IgnoreFlush configuration. This controls the "ExtraData" setting
* in "VBoxInternal/Devices/[controller type]/0/LUN#[x]/Config/IgnoreFlush". See
* Responding to guest IDE/SATA flush requests at:
* http://www.virtualbox.org/manual/ch12.html#idp12757424
*/
#var $enableHDFlushConfig = true;


/*
* Cache tweaking.
*
*/
// Refresh VM cache when VM Settings window is loaded. Default is true. Set to false to disable.
var $vmConfigRefresh = true;

// Path
#var $cachePath = '/tmp';

/* END SETTINGS  */


}

 

Another thought. It has been awhile since I managed a web server for others in my job. When I use a web server, I create subdirectories for anything I download. Like in this case, my web directory contains a directory named phpvb. Inside phpvb, I have all the phpvirtualbox files. When I access phpvirtualbox, I use http://lament:8084/phpvb/ instead of having it installed in the root directory using just http://lament:8084/.

 

I mention this because I vaguely remember the default settings of some web servers that I managed in the past not displaying some php pages correctly. We tried & tried to use the root directory, but something prevented it from working (& I can't remember what it was). Ever since I have just used subdirectories if I am using files created by someone else. I will usually create my own basic html file that provides hyperlinks to the subdirectories & my html files worked.

 

Like I said this is just something I vaguely remember happening... but if the above changes do not work, well it is something else to try.

Link to comment

Thanks for all the replies.  i have copied everything that you posted into my php config file and saved it and im still getting the same error. 

 

is there a way for me to confirm that the web interface portion of VB is running for virtualbox?  i know that the web portion of simplefeatures are working. 

 

im at a loss of what to try next.  i am not sure i didnt screw something up with trying to install virtualbox the original way earlier in the post by trying to build the headers and linux.  but i have rebooted since then and everything else is working as it should. 

Link to comment

when i try to run installpkg on the file, this is what happens

 

 

root@Tower:/boot/extra# installpkg vbox-4.1.18-unRAID-3.0.35.tgz       

Verifying package vbox-4.1.18-unRAID-3.0.35.tgz.

Installing package vbox-4.1.18-unRAID-3.0.35.tgz:

PACKAGE DESCRIPTION:

Executing install script for vbox-4.1.18-unRAID-3.0.35.tgz.

insmod: error inserting '/lib/modules/3.0.35-unRAID/misc/vboxdrv.ko': -1 File exists

insmod: error inserting '/lib/modules/3.0.35-unRAID/misc/vboxnetadp.ko': -1 File exists

insmod: error inserting '/lib/modules/3.0.35-unRAID/misc/vboxnetflt.ko': -1 File exists

ln: creating symbolic link `/root/.VirtualBox/vbox': Operation not permitted

Package vbox-4.1.18-unRAID-3.0.35.tgz installed.

 

is the problem the symbolic link?

Link to comment

This is what happens when i type vboxwebsrv

 

root@Tower:~# vboxwebsrv --

Oracle VM VirtualBox web service version 4.1.18

© 2005-2012 Oracle Corporation

All rights reserved.

VirtualBox web service 4.1.18 r78361 linux.x86 (Jun 20 2012 12:01:23) release log

00:00:00.000 main    Log opened 2012-08-24T21:58:10.982868000Z

00:00:00.000 main    OS Product: Linux

00:00:00.000 main    OS Release: 3.0.35-unRAID

00:00:00.000 main    OS Version: #2 SMP Thu Jun 21 16:20:26 MDT 2012

00:00:00.000 main    OS Service Pack: #2 SMP Thu Jun 21 16:20:26 MDT 2012

00:00:00.000 main    Executable: /opt/VirtualBox/vboxwebsrv

00:00:00.000 main    Process ID: 14811

00:00:00.000 main    Package type: LINUX_32BITS_GENERIC

00:00:00.015 SQPmp    #### SOAP FAULT: Address already in use [sOAP-ENV:Server]

 

Link to comment

Please post your output for:

ps -ef | grep ox

 

Looks like you may already have some of it running.

 

When you reboot, the headers you have built go away. I don't think that will be the problem.

 

Here is my output for the above command:


root     15643     1  0 12:55 ?        00:00:00 /opt/VirtualBox/vboxwebsrv -b -H 127.0.0.1 --logfile /dev/null
root     15647     1  0 12:55 ?        00:00:03 /opt/VirtualBox/VBoxXPCOMIPCD
root     15655     1  0 12:55 ?        00:00:09 /opt/VirtualBox/VBoxSVC --auto-shutdown
root     16781 15655  2 12:57 ?        00:17:57 /opt/VirtualBox/VBoxHeadless --comment pytivo --startvm e6ad048b-e066-4a69-9d3b-27eea4bca278 --vrde config
root     19876 13211  0 23:45 pts/0    00:00:00 grep ox

 

I am running an older version of unRAID. Copying my flash drive would cause other problems for you.

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.