Step 2 > Setting up the Zone and installing VirtualBox in the Zone

First off – we’ll create a Solaris Zone
Later we’ll install VirtualBox in the Solaris Zone

Login to your Solaris PC / Global Zone as root

Discover the name of your ip interface :

ipadm show-if
Your output will look similar to this :
ipadm show-if
in this example, the name of the interface is rge0

Create A New Solaris Zone

The zone will be called myzone2 and will have the ip address and will be saved in /zones/myzone2

zonecfg -z myzone2
   myzone2: No such zone configured
   Use ‘create’ to begin configuring a new zone.

zonecfg:myzone2> create -b
zonecfg:myzone2> set ip-type=shared
zonecfg:myzone2> set autoboot=true
zonecfg:myzone2> set scheduling-class=FSS
zonecfg:myzone2> set zonepath=/zones/zone2

zonecfg:myzone2> add net
zonecfg:myzone2:net> set physical=rge0
zonecfg:myzone2:net> set address=
zonecfg:myzone2:net> set defrouter=
zonecfg:myzone2:net> end

zonecfg:myzone2> set limitpriv=default,sys_smb
zonecfg:myzone2> add capped-memory
zonecfg:myzone2:capped-memory> set physical=256m
zonecfg:myzone2:capped-memory> set swap=512m
zonecfg:myzone2:capped-memory> set locked=128m
zonecfg:myzone2:capped-memory> end

zonecfg:myzone2> verify
zonecfg:myzone2> commit
zonecfg:myzone2> exit

Install Solaris OS into the myzone2 Solaris Zone

zoneadm -z myzone2 install

Once the Solaris OS is installed into the myzone2 Solaris Zone

zonecfg -z myzone2 "add device; set match=/dev/vboxdrv; end"
zonecfg -z myzone2 "add device; set match=/dev/vboxusbmon; end"

Boot the myzone2 Solaris Zone

zoneadm -z myzone2 boot

Login to the myzone2 Solaris Zone

There may be a delay of 20 seconds before the Configuration Screen appears

If nothing happens after 20 seconds, press the F2 key!

zlogin -C myzone2

Once you’ve completed the Configuration Screen :

Login as root with the password you setup during the Configuration just a moment ago.

- Install Apache, PHP, MySQL :

pkg install pkg:/group/feature/amp

Activate and Run Apache Web Server

svcadm -v enable /network/http:apache22

Download and Install VirtualBox 4.2.18

gunzip -cd VirtualBox-4.2.18-88780-SunOS.tar.gz | tar xvf -
pkgadd -G -d VirtualBox-4.2.18-SunOS-r88780.pkg
(answer Y to all install prompts)
VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.2.18-88780.vbox-extpack

Check everything is fine

VBoxManage list hostinfo | less
VBoxManage list extpacks | less
VBoxManage list systemproperties | less

Setup vboxwebsrv

svccfg -s svc:/application/virtualbox/webservice:default setprop config/host=localhost
svccfg -s svc:/application/virtualbox/webservice:default setprop config/port=18083
svccfg -s svc:/application/virtualbox/webservice:default setprop config/user=root
svcadm refresh svc:/application/virtualbox/webservice:default

Download and Setup PHPVirtualBox 4.2.18

cd /var/apache2/2.2/htdocs
mkdir phpvirtualbox
cd phpvirtualbox
unzip ../
cp config.php-example config.php

Make the following changes to config.php

PHPVirtualBox config.php update

Remove VirtualBox Web Authentication

VBoxManage setproperty websrvauthlibrary null
svcadm enable svc:/application/virtualbox/webservice
svcadm restart svc:/application/virtualbox/webservice

Setup VirtualBox (that’s installed in zone2)

From a web browser, goto

user: admin

pass: admin

PHPVirtualBox Browser Window

When creating a Virtual Machine – DON’T FORGET :

* Ensure Networking is set to NAT

* In Advanced> ensure you Disable NetBIOS over TCP/IPbefore you setup Port Forwarding in VirtualBox :

Disable NetBIOS over TCP/IP

* During Installing Windows as a VirtualBox guest the mouse may be a bit ‘out of step’ – so don’t forget to install VirtualBox Guest Additions once Windows is installed – to make your mouse and screen 100% perfect !

* In Advanced> ensure Port Forwarding is setup as :

VirtualBox Solaris Zone NAT Windows Shares

Proceed to Step 3 > Making your VirtualBox Machine autoboot in the Zone


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Anti-Spam by WP-SpamShield