mercredi mai 27, 2009

Flying LDoms with fldom tool

In case of hardware Failure it is good to have a very simple way to manually restart LDoms in few seconds in one other server. The Warm and Cold Migration is a very good way for moving LDoms from a primary physical platform to a secondary physical platform. But in case of crash of primary platform the Migration could be hard to use.  Also if we wish to have a simple way to easily move at any time a several LDoms to a pool of several physical servers it could be hard to  maintain all vdisks configurations in all physical servers for all LDoms.
One simple solution is to create all vdisks in a share file system (NFS - PXFS) or failover file system (ZFS - metaset) and export the LDom and all associated vdisks and vswitches configurations in that File System. Then we can used this exported informations on the secondary platform to restart the LDom. Before restart the LDom on secondary platform we must check the availability of resources (CPU/MAU/Memory), services (vdiskservers/vswitches) and all backend files needed to restart the LDom. Then we can recreate all vdiskserverdevices on the right backends with right options for the specific LDom.
The fldom (Flying LDom) tool can be used to easily manage Flying Ldoms. This tools allow us to export LDom configuration in share or failover file system. Export option example:

The fldom tool allow us to detach the LDom from one server (remove it and delete all vdsdev), and attach the LDom  to a new server (check needed services and resources, recreate all needed vdsdev, create and bind the LDom). Attach and detach options example:

So it is very easy to quickly restart the LDom in any server in case of primary platform failure with fldom attach option and exported informations. For example primary T5xx0 Failure scenario:

If using ZFS as failover file system for Flying LDoms without SunCluster we have to be careful of ZFS import with force option as there is no yet the support of Multi-import protection in ZFS.
The fldom tool is available here for download as simple Solaris package. Don't forget to call SunPS to successfully help you to  implement this Flying LDoms solution with fldom tool. The next step will be HA-LDom to allow automatic LDom  failover with SunCluster, I hope coming soon. Have fun with LDoms.

vendredi mai 15, 2009

Using Solaris Package Companion v0.9 to minimize Solaris 10 with zones

Last month I have worked for a French bank using 28 whole root zones on one M9000 Solaris 10 domain. At the first installation the size needed to store all zonepath was very big. The time needed to apply patches or upgrade Solaris with LU was too long. So the customer ask us to reduce the size of Solaris by removing all not needed packages.

When we reduce or minimize Solaris Operating System (Solaris OS), it is not permissible to remove any software packages that are found in the smallest Sun-provided installation cluster (SUNWcmreq metacluster). It is also not permit to remove packages if there exist any dependencies on the software package being removed, those dependencies must be addressed and satisfied prior to the removal of the package.

Solaris 10 has now 2164 packages grouped in 188 Clusters and 7 metaclusters. When we want to remove packages or clusters from Solaris we have to know the dependencies and reverse dependencies between packages or clusters. We may also need to know the package list of one given cluster or Metacluster or need to know in which cluster is one given package or... This informations are available in solaris metadata packages files but are not very easy to read.

Glenn Brunette has developed great tool call Solaris Package Companion available at opensolaris used to answer every questions we need to minimize Solaris. With this tools we where able to securely remove this cluster list and this packages list and the size of Solaris 10 (SUNWCuser) was no more than 1.2 Gbytes on M9000 server.

mercredi mars 25, 2009

Adobe released Reader 9.1 now available for OpenSolaris

Adobe released Reader 9.1 now available for OpenSolaris

For example I have installed the Frensh release on my opensolaris desktop:
# chmod +x AdbeRdr9.1.0-1_i486solaris_fra.bin
# pfexec AdbeRdr9.1.0-1_i486solaris_fra.bin

Select the directory to install Adobe Reader 9.1.0 [/opt]

Then clik on any PDF file to read it with acroread.

Have fun with opensolaris.

mardi mars 17, 2009

Crossbow & NAT to share DHCP WiFi interface between zones.

Before crossbow it was not very easy to used zone with network if we only have one DHCP network interface available in the global zone. Now with opensolaris snv105 and later it is very easy. We only have to create one virtual switch between zones and global zone and then use Solaris NAT (Network address Translation) to Translate all private network addresses in zones to the global zones DHCP IP address.
In this simple example we use crossbow and NAT to share one WiFi DHCP network interface between two zones and the global zone.

With ifconfig(1m) we can see that DHCP WiFi network interface use the network in the global zone. We have to use another private network defined in RFC 1918 to create a private network between zones and the global zones. For example
# ifconfig iwi0
iwi0: flags=201104843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,ROUTER,IPv4,CoS> mtu 1500 index 3
inet netmask ffffff00 broadcast

Create a new virtual switch and create virtual network interfaces (vnic) in the new switch:
# dladm create-etherstub etherstub0
# dladm show-etherstub
# dladm create-vnic -l etherstub0 vnic0
# dladm create-vnic -l etherstub0 vnic1
# dladm create-vnic -l etherstub0 vnic2
# dladm show-vnic
LINK         OVER         SPEED  MACADDRESS           MACADDRTYPE         VID
vnic0        etherstub0   0      2:8:20:45:d9:df      random              0
vnic1        etherstub0   0      2:8:20:c8:45:8a      random              0
vnic2        etherstub0   0      2:8:20:39:8e:47      random              0

Configure the virtual network interface vnic0 in the global Zone. Used static address for vnic0
# echo "     opsbox" >> /etc/hosts
# ifconfig vnic0 plumb
# ifconfig vnic0 opsbox netmask + broadcast + up
# ifconfig vnic0
vnic0: flags=201100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4,CoS> mtu 9000 index 2
        inet netmask ffffff00 broadcast
        ether 2:8:20:45:d9:df

Configure the virtual network interface for zones. For example zone1 use vnic1, setup zone ip-type exclusive, used static address for vnic1 (, and set defaultrouter to  the ip address of the global zone in the private network (          
# zonecfg -z zone1
zonecfg:zone1> set ip-type=exclusive
zonecfg:zone1> add net
zonecfg:zone1:net> set physical=vnic1
zonecfg:zone1:net> end
zonecfg:zone1> commit
# zoneadm -z zone1 reboot
# zlogin zone1
root@zone1 # echo "     zone1" >> /etc/hosts
root@zone1 # echo "   opsbox" >> /etc/hosts       
root@zone1 # echo zone1 > /etc/hostname.vnic1
root@zone1 # echo opsbox > /etc/defaultrouter
root@zone1 # reboot

Copy the global zone DNS configuration in all zones. Example for zone1:
# cp /etc/nsswitch.conf /zones/zone1/root/etc
# cp /etc/resolv.conf /zones/zone1/root/etc

Finally setup NAT in global zone. Any TCP/UDP packets that arrive from private network must have their IP addresses translated to the address of the global zone before exiting the system. To do this:
Enable ipv4 forwarding in the global zone:
#  routeadm -u -e ipv4-forwarding
Create ipnat.conf file in the global zone:
# vi /etc/ipf/ipnat.conf
map iwi0 -> portmap tcp/udp auto
map iwi0 ->

Start ipfilter in global zone and show the list of current NAT table:
# svcadm enable network/ipfilter
# ipnat -l
List of active MAP/Redirect filters:
map iwi0 -> portmap tcp/udp auto
map iwi0 ->

Test a simple ping in all zones, example in zone1: 
root@zone1: # ping -s
PING 56 data bytes
64 bytes from icmp_seq=0. time=50.864 ms
64 bytes from icmp_seq=1. time=50.184 ms

lundi janv. 19, 2009

pconsole in OpenSolaris in a Gnome Terminal

The pconsole is a very useful open source tool. It's like SunCluster cconsole and it's allow us to open parallel ssh connections. pconsole is available for installation from with IPS. Before to install pconsole you must have upgraded OpenSolaris to release 103 or later with this procedure. To Install pconsole run the followings commands as a super user:

# pkg search -r pconsole
INDEX      ACTION    VALUE                     PACKAGE
description set       pconsole                  pkg:/SUNWpconsole-AT-1.0-0-DOT-105
basename   file      usr/bin/pconsole          pkg:/SUNWpconsole-AT-1.0-0-DOT-105

# pkg install SUNWpconsole
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                    1/1         4/4     0.02/0.02
PHASE                                        ACTIONS
Install Phase                                  15/15
PHASE                                          ITEMS
Reading Existing Index                           9/9
Indexing Packages                                1/1

The pconsole script has been designed to run pconsole in xterm. If you wish to run pconsole in a gnome terminal instead you can use pconsole-gnome script available for download here.

Download pconsole-gnome, copy it in /usr/bin/pconsole-gnome and allow to execute (chmod +x /usr/bin/pconsole-gnome) . In the following example I use pconsole-gnome to open 4 parallel ssh connections from my labtop to a 4 different opensolaris nodes. Then in the Gray gnome terminal I only run as a super user (with pexec) the script pconsole-gnome  to open 4 parallels gnome terminal with ssh connections:

The pconsole-gnome syntax is :
pconsole-gnome -h
usage: pconsole-gnome  '[user@]<hostname>[:port] [...]'
 -h             => help
 -d             => Debug
 -t             => Run pconsole in the current terminal

jeudi janv. 15, 2009

Upgrade form OpenSolaris 2008.11 to OpenSolaris 2008.11 release 105

OpenSolaris 2008.11 release 105 is available for upgrade with IPS from I have successfully upgrade my labtop with the following procedure:

# pfexec pkg set-authority -O
# pfexec pkg set-authority -P
# pfexec pkg authority
AUTHORITY                           URL
sunfreeware                (preferred)           
# pfexec pkg refresh
# pfexec pkg image-update

Then reboot your OpenSolaris. If you are using OpenSolaris on a Labtop run the frkit again and reboot because svc:/site/powernow:default will failed to start.

mardi déc. 09, 2008

Microsoft Remote Desktop and vncviewer for OpenSolaris

Microsoft Remote Desktop with rdesktop and VNC client with vncviewer are available for OpenSolaris installation with IPS. In this funny example the first connection is a VNC connection from my OpenSolaris desktop to another OpenSolaris ESX Virtual Machine, and the second connection is a Microsoft Remote Destkop Connection from the OpenSolaris ESX Virtual Machine to a Second Microsoft XP ESX Virtual Machine.

To Install VNC client and rdesktop Client with IPS under OpenSolaris
# pkg install SUNWvncviewer
# pkg install SUNWrdesktop

To Run VNC client
# vncviewer <hostname_or_IP_address>

To Run Microsoft Remote Desktop Client
# rdesktop <hostname_or_IP_address>

To Allow Remote Desktop From Windows XP Use This Procedure from Microsoft, and To Allow VNC connection From OpenSolaris use Gnome Menu System Preference Share Desktop or you can use Xvnc which is bundled with OpenSolaris (To enable Xvnc).

Have Fun with OpenSolaris...

lundi déc. 08, 2008

Xine for OpenSolaris - IPS

The very good free Xine multiplayer is available for installation from  blastwave with IPS.

To Install Xine you only need to set the URL prefix for blastwave packaging repository
and install it with pkg install.

Add blastwave and Sunfreeware packaging repository:
# pkg set-authority -O blastwave
# pkg set-authority -O sunfreeware
# pkg authority -H
sunfreeware                (preferred)

Search for xine
# pkg search -r xine
INDEX      ACTION    VALUE                     PACKAGE
basename   dir       opt/csw/share/xine        pkg:/IPSlibxine-AT-0.5.11-2-DOT-6
basename   file      opt/csw/bin/xine          pkg:/IPSxineui-AT-0.5.11-2-DOT-6

And Install Xine
# pkg install IPSlibxine
# pkg install IPSxineui

Then to run Xine:
# /opt/csw/bin/xine

vendredi nov. 07, 2008

Wine 1.1.7 and TeamQuest View on OpenSolaris

The only last reason why I did not definitely remove the Windows Partition on my Toshiba Labtop was TeamQuest GUI need for my job which is not available for OpenSolaris.

Now with the last Wine on OpenSolaris TeamQuest GUI for Windows known as tqview works perfectly Under OpenSolaris 2008.05. Drag and Drop between Windows tqview and soffice on OpenSolaris works fine.

To install Wine 1.1.7 for OpenSolaris 2008.05 download the file here, and install it with following commands with the user root:
# bunzip2 Wine-1.1.7-solaris-5.11-i86pc.pkg.bz2
# pkgadd -d ./Wine-1.1.7-solaris-5.11-i86pc.pkg

Thanks wine.

mercredi nov. 05, 2008

Upgrade OpenSolaris from snv_99 to snv_100

Today I have successfully upgrade my OpenSolaris desktop to snv_100. The first image-update attempt has failed and I was unable to reboot on the last OpenSolaris release. The pkg image-update has return "A system error [Errno 12] Not enough space was caught executing for bootadm", but the zfs list command show more than 8Go of free space in rpool ! So I used this procedure to upgrade it to snv_100:

# pfexec pkg refresh
# BUILD=`uname -v | sed s/snv_//`  
# pfexec pkg install SUNWipkg-AT-0.5-DOT-11-0.${BUILD}
# pfexec pkg install entire-AT-0.5-DOT-11-0.${BUILD}
# pfexec pkg image-update
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                641/641 11879/11879 322.04/322.04
PHASE                                        ACTIONS
Removal Phase                              5124/5124
Install Phase                              8309/8309
Update Phase                             13859/13859
PHASE                                          ITEMS
Reading Existing Index                           9/9
Indexing Packages                            641/641
pkg: A system error [Errno 12] Not enough space was caught executing /sbin/bootadm update-archive
-R /tmp/tmp01Fuv- A clone of opensolaris-5 exists and has been updated and activated. On next boot
the Boot Environment opensolaris-6 will be mounted on '/'. Reboot when ready to switch to this
updated BE.

Just Re-run bootadm

# beadm list
BE            Active Mountpoint Space  Policy Created         
--            ------ ---------- -----  ------ -------         
opensolaris-3 -      -          38.22M static 2008-09-22 14:45
opensolaris-4 -      -          14.08M static 2008-10-24 17:37
opensolaris-5 N      /          20.45M static 2008-10-31 14:05
opensolaris-6 R      -          11.84G static 2008-11-05 15:54
# beadm mount opensolaris-6 /a
# bootadm update-archive -f -R /a
Creating boot_archive for /a
updating /a/platform/i86pc/boot_archive
updating /a/platform/i86pc/amd64/boot_archive
# beadm unmount opensolaris-6

Then Reboot to last opensolaris release.

# uname -a
SunOS opensolaris 5.11 snv_100 i86pc i386 i86pc Solaris
# beadm list
BE            Active Mountpoint Space  Policy Created          
--            ------ ---------- -----  ------ -------          
opensolaris-3 -      -          98.04M static 2008-09-22 14:45
opensolaris-4 -      -          14.08M static 2008-10-24 17:37
opensolaris-5 -      -          97.79M static 2008-10-31 14:05
opensolaris-6 NR     /          12.20G static 2008-11-05 15:54

samedi nov. 01, 2008

How to Install Last SysKonnect Gigabit Marvell Ethernet driver on OpenSolaris Indiana

The  yukonx ( device drivers used on my Tecra Toshiba Labtop hangs under my OpenSolaris 2008.05 (snv99) . To resolved this I have installed the last skge ( device drivers

The last skge Marvell Driver (  for Solaris 10 x86 is available here: Download But failed to install in OpenSolaris. The reason is because skge postinstall script does not use the right device_driver aliases for OpenSolaris 2008.05. So to make it works use the following procedure:

vendredi sept. 12, 2008

Colors in OpenSolaris's Terminals (GNU ls and vim)

It's so better to have colors in a Unix Terminal under OpenSolaris. For that I used GNU ls and vim.

I have just re-build GNU ls and make it available from  To Install GNU ls download the File here and: 
# bunzip2 GNUls-6.9-solaris-5.11-i86pc.pkg.bz2
# pkgadd -d ./GNUls-6.9-solaris-5.11-i86pc.pkg
# /usr/bin/gls --version
ls (GNU coreutils) 6.9
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <>.
There is NO WARRANTY, to the extent permitted by law.
Written by Richard Stallman and David MacKenzie.

Then create the following alias in your .bashrc file
$ vi ~/.bashrc
ls  () { gls --color $\* ; }

Set TERM to xterm-color in your .bashrc file
$ vi ~/.bashrc

export TERM

Vim is already bundled with OpenSolaris 2008.05, So you just need to
had the following lines in your file ~/.vimr to get colors when open
files with vi.
if &t_Co > 1
   syntax on

jeudi sept. 11, 2008

How to Run SunCluster cconsole Tool In OpenSolaris Indiana

The cconsole tool allow us to have multiple parallel connections (ssh, telnet or rlogin) to many UNIX servers. Unfortunately this tool is not able to run with OpenSolaris (Nevada or Indiana) because of missing libs. As I always need to work with cconsole, I use the following workaround to run it on OpenSolaris  20008.05.

Download package file from  and install it with with pkgadd (must be install in default location /opt/SUNWcluster):
# bunzip2 libcconsole-solaris-5.11-i86pc.pkg.bz2
# pkgadd -d ./libcconsole-solaris-5.11-i86pc.pkg

Now you can Install cconsole package (SUNWccon)  from your Solaris Cluster Express 6/08 x86 media available from
# cd <media_dir>/Solaris_x86/Product/sun_cluster/Solaris_10/Packages
# pkgadd -d ./ SUNWccon

Add Followings lines in /etc/hosts
# echo "    l1 l2 l3 l4 l5 l6 l7 l8" >> /etc/hosts

Create your cconsole configuration file
# cat > /etc/clusters << EOF
> n2 l1 l2
> n3 l1 l2 l3
> n4 l1 l3 l3 l4
> n5 l1 l2 l3 l4 l5
> n6 l1 l2 l3 l4 l5 l6
> n7 l1 l2 l3 l4 l5 l6 l7
> n8 l1 l2 l3 l4 l5 l6 l7 l8

If you Want to use ctelnet Allow Telnet in you OpenSolaris desktop
# svcadm enable svc:/network/telnet:default

And for example if you need to have six parallel terminals with cssh just run the mcssh script instead:
# /opt/SUNWcluster/bin/mcssh n6

mardi sept. 09, 2008

How To Build Your Own Wine Release for OpenSolaris Indiana

The last Wine Release source code 1.1.4 is available for download at Before to build your own Wine Solaris Package Form OpenSolaris Indiana You first need to add some packages which are not installed by default.

Check if is available
# host has address
# ping is alive

Add the following packages
# pkg install SUNWGlib
# pkg install SUNWgcc
# pkg install gcc-dev
# pkg install SUNWxorg-headers
# pkg install SUNWgnome-common-devel
# pkg install SUNWxwinc
# pkg install SUNWaudh

Build Wine (The make take more than 1 hour on my Tecra LabTop):
# bzcat wine-1.1.4.tar.bz2 |tar xvf -
# ./configure --prefix=/usr/local/wine
# make
# make install

Make a Solaris package file (Wine-1.1.4-solaris-5.11-i86pc.pkg) :
# cd /usr/local/wine
# find ./ -print -depth | cpio -dump /tmp/wine
# cd /tmp/Wine
# echo "i pkginfo=./pkginfo" > prototype
# echo "i postinstall=./postinstall" >> prototype
# find . -print | pkgproto >> prototype
# cat > ./pkginfo << EOF
VENDOR=The Wine Project
DESC=Run Windows Application on Solaris
# cat > ./postinstall << EOF
exit 0
# pkgmk -d /var/spool/pkg -r /tmp/Wine
# cd /var/spool/pkg
# pkgtrans -s . /tmp/Wine-1.1.4-solaris-5.11-i86pc.pkg Wine
# bzip2 /tmp/Wine-1.1.4-solaris-5.11-i86pc.pkg.bz2

Wine 1.1.4 package /tmp/Wine-1.1.4-solaris-5.11-i86pc.pkg.bz2 file  is ready to install.

samedi août 16, 2008

Wine 1.1.2 Has been build for OpenSolaris

I have juste re-build the last development release of Wine ( Release for OpenSolaris - 2008.05 with openGL Libs. So you can run OpenGL Window Programs like Google Earth in your OpenSolaris desktop.

Last Wine Package Files is available at

Just download the file here, and install it with following commands:
# bunzip2 Wine-1.1.2-solaris-5.11-i86pc.pkg.bz2
# pkgadd -d ./Wine-1.1.2-solaris-5.11-i86pc.pkg

And Try to install Windows Google Earth by downloading Windows GoogleEarthWin.exe file in your Desktop, and then install Google Earth with:
[1] /usr/local/wine/bin/wine --version
[2] /usr/local/wine/bin/wine /home/jblanche/Desktop/GoogleEarthWin.exe

Have Fun with Wine and OpenSolaris


Jerome Blanchet


« juillet 2016