How to Install Virtualbox 3.1.6 on NexentaStor 3.0.4

Get: VirtualBox-3.1.6-59338-SunOS.tar.gz
Get: VBoz.zip

Unzip and RENAME python-lib-3.1.8.tar.bz2 TO python-lib.tar.bz2

Put everything in the same dir.

VirtualBox-3.1.6-59338-SunOS.tar.gz
solaris-lib.tar.bz2
sunwvbox-1.0-20100217.diff.gz
python-lib.tar.bz2

And now:
[bash]
# add required packages
aptitude install alien g11n-minimal-uiu8 lib64gcc1 lib64stdc++6 lib64z1 libfontconfig1 libfreetype6 libgcc1 libice6 libpng12-0 libsm6 libstdc++6 libxau6 libxdmcp6 libxmuu1 libxrender1 python python-dev sunwcsl sunwcslr sunwlibm zlib1g

# untar & prepare VirtualBox
tar -xzf VirtualBox-3.1.6-59338-SunOS.tar.gz
alien -d -s -c –reloc_root=/ VirtualBox-3.1.6-SunOS-r59338.pkg

# patch it
gzip -d -c sunwvbox-1.0-20100217.diff.gz | patch -p0

# build it
cd sunwvbox-1.0
./debian/rules binary

# install the .deb package
cd ..
dpkg -i sunwvbox_1.0-1_solaris-i386.deb
[/bash]

That’s it! Many thanks to Ernst Gill!

SOURCES:
http://www.nexenta.org/boards/1/topics/142

VirtualBox useful commands (VBoxManage/VBoxHeadless)

[bash gutter=”false”]
# change VirtualBox disk and machine default location
VBoxManage setproperty hdfolder /volumes/data/vbox
VBoxManage setproperty machinefolder /volumes/data/vbox

# create a VM
VBoxManage createvm –name "U10.4-base" –ostype Ubuntu –register
# add some ram, network card, DVD-ROM
VBoxManage modifyvm "U10.4-base" –memory 128 –acpi on –boot1 dvd –nic1 bridged
# create a HDD
VBoxManage createhd –filename U10.4-base.vdi –size 10000 –register

# attach storage controllers to it
VBoxManage storagectl "U10.4-base" –name "IDE Controller" –add ide
VBoxManage storageattach "U10.4-base" –storagectl "IDE Controller" –port 1 –device 0 –type dvddrive –medium none

# remove .iso
VBoxManage closemedium dvd /volumes/data/exchange/mini-ubuntu-10.04-server-i386.iso

# start VM
VBoxHeadless –startvm "U10.4-base"

# stop VM (requires package acpid)
VBoxManage controlvm "U10.4-base" acpipowerbutton

# view VM information
VBoxManage showvminfo "U10.4-base"
[/bash]