Thursday Feb 12, 2009

OpenSolaris Zones Clusters VideoBlog

Here's a very interesting video talking about virtual clustering using Solaris Zones by Ellard Roush.

Enjoy It!

For more information on how to set up zones and Glassfish refer to:

[Read More]

Wednesday Feb 04, 2009

Glassfish over a Zone over OpenSolaris

Hi all!

Today I'll try to show you guys how to create a zone in OpenSolaris and install a glassfish application server on the top of it.

First of all, you need a native installation of Solaris10/OpenSololaris or a virtual machine with one of these installed. Here you can find how to set up a vm with OpenSolaris.

You can refer to the Zones Administration Guide too.

To see the zones on the system:

# zoneadm list -vi
0   global   running   /      native   shared

Let's configure one more called glasszone for us:

zonecfg -z glasszone
glasszone: No such zone configuredUse 'create' to begin configuring a new zone.
zonecfg:glasszone> create
zonecfg:glasszone> set zonepath=/export/home/glasszone
zonecfg:glasszone> set autoboot=true

Zonepath is the place that solaris will create the filesystem for the new zone. If you don't want your zone to start running automatically at the boot time, you can set autoboot=false or just leave it.

Now, let's add a virtual network interface, commit the zone, install it on the system, boot and login( -C option is used in the first time you start the zone to configure the hostname, dns server, root password and some other stuff).

zonecfg:glasszone> add net
zonecfg:glasszone:net> set address=
zonecfg:glasszone:net> set physical=e1000g0
zonecfg:glasszone:net> set defrouter=
zonecfg:glasszone:net> end
zonecfg:glasszone> commit
zonecfg:glasszone> exit
# zoneadm -z glasszone install
# zoneadm -z glasszone boot
# zlogin -C glasszone

The address is the ip of your subnet that the zone will use, and 24 is the number of 1's of the bitmask of the subnet mask that you have. More info on this here.

Remember that the interface will be shared, and the glasszone will be visible to the outsiders. This means that the glasszone and the globalzone will need different ip addresses of the net, and your interface will act like a router.

INFO: Zones doesn't support dhcp yet.

In my case, I'm using VirtualBox to virtualize the OpenSolaris system. It created a subnet for the system with the default router and the default dns server .

Physical is the interface that glasszone will share (must be a configured, plumbed, working interface).

You can see the interfaces information through the ifconfig command in the globalzone.

# ifconfig -a
e1000g0: flags=201004843 mtu 1500 index 2 inet netmask ffffff00 broadcast ether 8:0:27:31:8b:21
e1000g0:1: flags=201000843 mtu 1500 index 2 zone glasszone inet netmask ffffff00 broadcast

Now the zone should be up and running:

# zoneadm list -vi
   ID    NAME    STATUS       PATH                BRAND    IP
   0    global    running       /                native    shared
   1    global    running       /export/home/glasszone    ipkg    shared

Login to it. We're going to install the glassfish app. Since a zone is an instance of the OpenSolaris operational system, if the fs is not mounted anywhere, the only way to communicate with it is though the network interface (remember that it is a virtual interface, so if you are communicating between zones, minimum delay is expected).

Basically you need two things: The jdk and the glassfish app.

My tip: Download both at once:

Of course you can install it separately, but you will have to set some environment variables such as JAVA_HOME and the PATH. It isn't so hard, but it isn't so fast too, so I'll keep my advise.

You can download it logged to globalzone and then move it to the glasszone space. You can use wget to download it directly into your zone too.

TIP: Use -console option to install, because you have just a console in the zone.

You may have to set the execution permission for the downloaded file.

chmod +xxx runnable.bin

Now that you have installed it, you should be able to start a sample domain:

# asadmin start-domain domain1

Once it started, you should be able to see it on the hole subnet by typing in your browser:

TIP: Probably you will have add the glasszone entry in the /etc/hosts in the globalzone.

#echo “ glasszone” >> /etc/hosts
#cat /etc/hosts
[…] localhost glasszone

Now you have a "ready to use" web application server enviroment inside a zone inside the OpenSolaris OS.


Please post a comment or send me a email if you have any doubts, suggestions or if you find something here that isn't that right. We're a community and your help is very welcome a encouraged. =)

References and related links:
⁞[Read More]

Saturday Dec 13, 2008

OpenSolaris 2008.11

"OpenSolaris is the state of the art, cutting edge operating system that provides a rich, coherent platform for building and running applications.

OpenSolaris offers free, built-in features that help you build, debug and deploy new applications faster. It's is an operating system (OS), an open source project licensed under CDDL, and a community.

The project's goals are innovation, collaboration, and the extension of OpenSolaris technology." (

They just released the 2008.11 version, with some new cool tools like TimeSlider and much more hardware compatibility.

You can download it here:

You can see a walk-through the installation here:

You can see videos and talks about the release and the new stuff here:

You can get in touch with the community here:

You can see the hardware compatibility list here:

Download it! Try it! Enjoy it!


Hi, my name is Marcelo Arbore, I study electrical engineering at University of Sao Paulo, Brazil, and I work for Sun Microsystems. I also like to surf, I love the sea and I will live in California some day.


« June 2016