Archive for the ‘Software’ Category

Create a VNIC on Solaris Nevada (Solaris Express) Builds, and Use It for an Exclusive IP Stack in Zones

Thursday, July 17th, 2008

Given that I discovered quite a while ago that you can create vnic’s WITHOUT crossbow, in the early 80’s builds (b83+ appears to work), I decided today to try using the vnic’s for exclusive ip stacks in zones. The good news is, it works! The bad news is, besides already being unsupported (as this is Solaris Express), doing things like this is probably super, super unsupported.

So, lets do it.

Create a VNIC:

/usr/lib/vna <physicalAdapter> <fakeMacAddress>

You will get the vnic name returned as “vnic0”, then vnic1, and so on the more times you do this. Always use a different mac address of course, else, fail.

Create a new zone, and when configuring it, set the physical NIC to vnic0, and DO NOT set an address on it.

So, either type the commands below into zonecfg when creating a new zone:

# zonecfg -z <zoneName>
zonecfg:<zoneName>> set ip-type=exclusive
zonecfg:<zoneName>> add net
zonecfg:<zoneName>:net> set physical=vnic0
zonecfg:<zoneName>:net> end
zonecfg:<zoneName>> commit

OR remove the NIC config from an existing zone, and configure the new nic

zonecfg -z <zoneName> "remove net; set ip-type=exclusive; add net; set physical=vnic0; end"

Good to go – now boot the zone, and get on the zone console:

zlogin -C -e \# <zoneName>

Login as root, and then plumb the interface to verify it works:

ifconfig vnic0 plumb

And now, configure the zone like a regular Solaris 10 host, creating the /etc/hostname.vnic0 file, with a hostname in it, editing /etc/hosts, setting up /etc/resolv.conf, /etc/netmasks, /etc/defaultrouter and so on, and you should be good to go!

You may also wish to write a startup script that runs before the zones come up at boot, to avoid the zone boot failing. It will simply need to contain the /usr/lib/vna lines you used above to configure the vnic’s in the first place.

Random Script of the week – I’m not your friend, guy!

Wednesday, May 21st, 2008

You may of recently viewed a South Park Episode where the Canadians decide to go on strike, because they need more money.

Now, you can reminisce with this small script and a bash shell. Just grab sp.sh and you’re good to go, hoorah.

Installing Java Enterprise System 5 on Solaris Express or Open Solaris

Saturday, April 5th, 2008

This has annoyed me before but I never bothered figuring out how to fix the error:

PSPERR:++++++++++++++++++++++++++  {Missing Resource Exception in the loading of the
PkgRelativePaths{Can't find bundle for base name
com.sun.entsys.installer.common.resources.PkgRelativePaths5_11, locale en_AU}}

And hence the failure of installation of JES software on Solaris Express Nevada Builds. I’ve spent some time this evening figuring it out (thanks to truss + find) because tonight I *really* wanted to install JES on Solaris Express b81 (with Crossbow Integrated Bits) and I’ve found a way that sorts the issue. You need not rename directories or do anything else but the instructions that follow.

NOTE: Sun probably don’t want you to do this and it is unsupported, do so at your own peril.

Unzip a fresh copy of JES.
Run the installer (I’ve used text mode):

Unable to access a usable display on the remote system. Continue in command-line mode?(Y/N)
  Y

Once you say “Y”, I’ve found it goes off creates a directory called /tmp/.entsys_CaChE

Inside this directory you will find the following seemingly relevant files:

./Solaris_x86/.install/config/PPXMLS/Clusters/EntsysCluster_SUNOS_SPARC_5_10.xml
./Solaris_x86/.install/config/PPXMLS/Clusters/EntsysCluster_SUNOS_X86_5_10.xml
./Solaris_x86/.install/config/PPXMLS/Clusters/OrionCluster_SUNOS_SPARC_5_10.xml
./Solaris_x86/.install/config/PPXMLS/Clusters/OrionCluster_SUNOS_X86_5_10.xml
./Solaris_x86/.install/config/com/sun/entsys/installer/common/resources/PkgRelativePaths5_10.properties

In another terminal window, copy the relevant files for your platform to the same file but with 5_11 instead of 5_10

cd /tmp/.entsys_CaChE
cp ./Solaris_x86/.install/config/PPXMLS/Clusters/EntsysCluster_SUNOS_X86_5_10.xml \
./Solaris_x86/.install/config/PPXMLS/Clusters/EntsysCluster_SUNOS_X86_5_11.xml
cp ./Solaris_x86/.install/config/PPXMLS/Clusters/OrionCluster_SUNOS_X86_5_10.xml \
./Solaris_x86/.install/config/PPXMLS/Clusters/OrionCluster_SUNOS_X86_5_11.xml
 cp ./Solaris_x86/.install/config/com/sun/entsys/installer/common/resources/PkgRelativePaths5_10.properties \
./Solaris_x86/.install/config/com/sun/entsys/installer/common/resources/PkgRelativePaths5_11.properties

Then continue the installer as normal.

Then you should get to here:

1. Install
2. Start Over
3. Exit Installation
What would you like to do [1] {"<"!" exits}?

And if you continue now things are happy:

Java Enterprise System 5
-1%--------------25%-----------------50%-----------------75%--------------100%
Installation Complete
Software installation has completed successfully. You can view the installation
summary and log by using the choices below. Summary and log files are available
in /var/sadm/install/logs/.

Sorted!