VirtualBox in unRAID


Recommended Posts

  • Replies 528
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Yes, there is one ( http://lime-technology.com/wiki/index.php?title=Installing_VirtualBox_in_unRAID ) and judging from the previous posts it's a very good one, but unfortunatelly it misses on some details and background info that is probably obvious for someone who knows his/her way around linux better than I do.

 

Never mind. I'm creating Slackware 12.2 VM on my workstation PC now and we will see later if I have any luck with compiling :-)

Link to comment
  • 1 month later...
  • 2 weeks later...
  • 3 weeks later...

Right now my VM configurations are being stored in ram, and I lose the setting on a reboot, therefore having to recreate the vms.  What do I need to change?

 

If you mean VBox's configurations/preferences, check if you did this line or not when making the VBox package

 

# Link the configuration dir
ln -sf /boot/custom/vbox /root/.VirtualBox

 

If you follow the wiki's instructions completely, you should already have this line in the doinst.sh

and it should be packaged and installed automatically everytime you install VBox in you go script (or manually)

 

 

If you mean the individual VM configurations, e.g. 'winxp.vbox'.

Then you should change your default machine folder to a disk, it can be inside the array or a special disk outside of the array. In phpvirtualbox, click File-Preferences, and then in the General tab, change the 'Default Machine Folder' (mine set to : /mnt/vmdisk/VM)

 

Or alternatively, you can set it with this command line : VBoxManage setproperty machinefolder <dir>

Confirm if it's set properly with :  VBoxManage list systemproperties | grep "Default machine folder"

 

I'm running VBox 4.1.6 with phpvirtualbox 4.1.2 (newer were buggy when I installed) on unRAID 4.7, and except for the host-guest network performance, it has been flawless so far.

 

Hope that helps.

Link to comment
  • 3 weeks later...
  • 2 weeks later...

I have a few years of experience with Linux but I'm far from an expert. I spent about 20 hours finding out these things that I wish someone had told me up front about getting VirtualBox running on unRAID.

 

Really though, it should be less than a couple hours work getting this going if you have enough info up front. Huge credit of course goes to the wiki page author for getting the less-experienced of us 95% there at:

 

http://lime-technology.com/wiki/index.php?title=Installing_VirtualBox_in_unRAID

 

This is on unRAID 5.0 b14.

 

Installation tips

 

Don't run the installation scripts on your flash! I did it on my cache drive in some folders that begin with a period so they won't get moved.

 

If the script screws up, any changes to the virtual filesystem will be removed when you reboot and you'll be back to normal. The only change left over after the reboot should be the symlink from /root/.VirtualBox. If something fails, reboot, fix, and try again.

 

Don't break up the installation scripts. I was nervous about running so many commands at once, but my attempts to do things incrementally failed hard. As the wiki says, first double-check the links, then I suggest you run the scripts as is. The only link that didn't work was the kernel download. I had to change the version from 2.6 to 3.0.

 

Don't forget to do the manual steps between the first and second scripts. After building the headers, you have to create the symlink I mentioned above and install VirtualBox. These two steps are in the manual part of the wiki. I still had to point the installer to a temp folder with 4 GB ram:

 

mkdir -p /boot/custom/vbox && ln -sf /boot/custom/vbox /root/.VirtualBox

export TMPDIR=/mnt/cache/.tmp && sh VirtualBox-4.1.8-75467-Linux_x86.run

 

When creating the VirtualBox package after installing VirtualBox, accept the option to remove symlinks (press y). And say no to changing all the permissions.

 

phpvirtualbox tips

 

Run this command once to allow phpvirtualbox to talk to virtualbox:

 

VBoxManage setproperty websrvauthlibrary null

 

To install phpvirtualbox, just copy it somewhere and copy config.php.example to config.php. You don't have to make any changes.

 

The PHP version that unRAID 5 uses doesn't work with phpvirtualbox. I got a SOAP not enabled error.

 

I couldn't get the PHP or lighttpd versions that you can install from unMenu to work with phpvirtualbox. At all. It was cake with bubba's versions:

 

http://lime-technology.com/forum/index.php?topic=7274.0

http://lime-technology.com/forum/index.php?topic=7267.0

 

Install his PHP package, which auto-reinstalled for me. I have to rerun his httpd package each boot.

 

For httpd configuration, go to the main unRAID Utils page and you'll see the lighttpd user application. Change the directory to wherever you installed phpvirtualbox. Make sure you start lightttpd. Hit it on port 89 and the main phpvirtualbox page should load.

 

The default phpvirtualbox authentication is admin and admin. You can disable authentication in config.php.

 

VirtualBox tips

 

VirtualBox supports VM remote desktop (this even works through VM post and boot). But you have to install the VirtualBox extension pack each boot to use this:

 

VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.1.8-75467.vbox-extpack

 

After installing the extension pack and before installing a VM from scratch, enable remote desktop for your new VM in phpvirtualbox under Display > Remote Display. You can turn this on even after a VM boots. Your default remote desktop port is 3389 on your unRAID box, not the VM IP address. This port increments for each VM you have running. And use the standard Windows Remote Desktop app to access it. VNC doesn't work.

 

I use these lines to install VirtualBox and phpvirtualbox after unRAID boots:

 

installpkg VirtualBox-4.1.8-unRAID.tgz

installpkg lighttpd+unraid-0.2.01-i386-bubba.tgz

vboxwebsrv -H 0.0.0.0 >/dev/null 2>&1 &

VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.1.8-75467.vbox-extpack

 

Hope this helps someone.

Link to comment

I got everythign install but having problems with phpvirtualbox, I am running 5.0b14, when i install the files you have when I goto the page for phpvirtualbox all i get is a directory listing, the config.php won't start

 

Are the results any different when you add index.html to the phpvirtualbox path in your URL? Just confirming that you aren't trying to load config.php directly.

Link to comment

do you have mouse issues? my mouse pointer won't line up properly

You need to install the guest additions in your guest operating system. Normally on a local host install you can just press the Host Hotkey + D to install guest additions, but since we are running things a bit differently, you need to download the guest additions iso from the virtualbox site, mount and install it just like you would any other cd you wanted to set up on the guest system. Go here http://download.virtualbox.org/virtualbox/ and navigate to the version of virtualbox host that you are using, and download the guest additions iso.

Link to comment

I think I read in the VirtualBox docs that to get 64-bit working you've got to enable IO APIC (under System > Motherboard in phpvirtualbox). Glad you got phpvirtualbox working though. On my motherboard I couldn't assign more than 1 core to a VM, even though my processor supposedly supports it. So some of that stuff is hit or miss.

Link to comment

do you have mouse issues? my mouse pointer won't line up properly

 

I had alignment problems with the VirtualBox remote desktop too. I made do with the  VirtualBox remote desktop just long enough to enable real remote desktop in my Windows install. Once I switched to direct remote desktop, the alignment problems went away.

Link to comment

I have a Windows 7 virtual machine running using Virtualbox under unRAID as described in this thread.

 

I am using this for starting up the VM (in my GO script):

nohup VBoxHeadless --startvm "Windows 7 Enterprise" --vrde=off >/dev/null 2>&1 &

 

I have tested this for shutting it down (save state = suspend):

nohup VBoxManage controlvm "Windows 7 Enterprise" savestate >/dev/null 2>&1 &

 

???

Is there a way that the unRAID shutdown script can run the savestate command or ACPI shutdown command to turn off this Windows VM?

I would also like having unRAID waiting for the VM to completely shutdown before shutting down power?

 

Link to comment
  • 2 weeks later...

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.