Wednesday Jul 01, 2009

Codeina's a nifty little feature of OpenSolaris 2009.06. It's an application from Fluendo that points applications such as Totem or Rhythmbox to Fluendo's web shop if you are missing the codec for the file you are trying to play. In the case of MP3s, the codec is free. For other audio and video formats, you'll have to pay a small license fee.

For example, when I attempt to play an MP3 in Totem, I'm presented with the following:

Clicking Install launches the Codeina Web Shop application where I can register to "buy" the free MP3 decoder:


And then Install the decoder:


Which will quickly complete:

After which my song will automatically start playing.

Note, if Codeina isn't working for you, you may be running into issue Codeina fails to start. The quick fix for this is to remove the Fluendo configuration file and try again.

rm ~/.local/share/codeina/providers/fluendo.xml

Tuesday Jun 30, 2009

I was poking around with the Just enough Operation System (JeOS) delivery form of OpenSolaris, when I found the Web Space Server project built on top of that platform. The Web Space Server project is based on the Liferay Portal and it has been packaged up nicely into a variety of virtual machines for both VirtualBox and VMware.

For this example I grabbed the OVF (Open Virtualization Format) which is designed for packaging up such appliances and was a snap to import into VirtualBox (File > Import Appliance):

When the import is complete, go ahead and start the WebSpaceServer. As this is a "just enough" distribution of OpenSolaris, there is no GUI. When the machine boots up, it will give you the HTTP address of the server, which in my case is 10.0.1.14:


Note, the machine takes anywhere from 5-10 minutes to complete service startup. To monitor its progress, you can log in using template / template.

One thing you probably want to do right off bat is enable ssh so you can log into the server remotely:

svcadm enable ssh

Then, from another host:

bleonard@opensolaris:~$ ssh template@10.0.1.14
The authenticity of host '10.0.1.14 (10.0.1.14)' can't be established.
RSA key fingerprint is 7c:6d:df:62:e2:ec:1f:a5:d7:2a:5f:3f:72:9a:ac:45.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.1.14' (RSA) to the list of known hosts.
Password: 
Last login: Tue Jun 30 03:55:15 2009

Welcome to a Sun GlassFish Web Space Server and OpenSolaris virtual 
machine image.

Use of this virtual machine image is subject to the license terms found 
in /etc/notices.

template@webspace:~$ 

You need to wait for the GlassFish server to finish starting up. You can check the domain2 SMF service:

template@webspace:~$ svcs -l domain2
fmri         svc:/application/SUNWappserver/domain2:default
name         Appserver Domain Administration Server
enabled      true
state        offline
next_state   online
state_time   Tue Jun 30 04:35:59 2009
logfile      /var/svc/log/application-SUNWappserver-domain2:default.log
restarter    svc:/system/svc/restarter:default
contract_id  46 
dependency   require_all/none svc:/milestone/network:default (online)
dependency   require_all/none svc:/system/filesystem/local:default (online)

Here you can see its current state is offline, but it's transitioning to online. You can tail the server log file to track its progress:

tail -f /opt/webspace/glassfish2/domains/domain2/logs/server

Ultimately, you'll see a line like the following:

[#|2009-06-30T11:44:37.899+0000|INFO|sun-appserver2.1|javax.enterprise.system.core|_ThreadID=10;_ThreadName=main;|Application server startup complete.|#

Once that is complete, you can then browse to the server. It has a professional home page with links to try the Web Space Server and a Quick Start Tour. Webmin is also included for managing MySQL and OpenSolaris.


When you first try the Web Space Server, be patient as it configures itself to run for the first time. Eventually, the Welcome page will appear:


Resources


The Crossbow project is probably the most exciting new feature in OpenSolaris 2009.06. It a nutshell, project Crossbow brings virtualization to the networking layer. In this quick example I'm going to create a virtual network interface card (VNIC) and dynamically alter it's maximum bandwidth as traffic is flowing over it.

The VNIC must be linked to an actual network interface device. To see the existing devices on the system:

bleonard@opensolaris:~$ dladm show-phys
LINK         MEDIA                STATE      SPEED  DUPLEX    DEVICE
e1000g0      Ethernet             up         1000   full      e1000g0
iwh0         WiFi                 down       0      unknown   iwh0
vboxnet0     Ethernet             unknown    0      unknown   vboxnet0

The current device in use is e1000g0, so I'll create my VNIC over that device:

pfexec dladm create-vnic -l e1000g0 vnic0

View the new VNIC:

bleonard@opensolaris:~$ dladm show-vnic
LINK         OVER         SPEED  MACADDRESS           MACADDRTYPE         VID
vnic0        e1000g0      1000   2:8:20:e2:77:62      random              0

Note its speed matches that of the physical link. Let's reduce this from 1000 megabits/second to 2 megabits/second:

pfexec dladm set-linkprop -p maxbw=2 vnic0

Before the VNIC can be used, it must be plumbed:

pfexec ifconfig vnic0 plumb

And assigned an IP address. If you're using DHCP, the following will work:

pfexec ifconfig vnic0 dhcp start

Now you can see vnic0 using ifconfig:

bleonard@opensolaris:~$ ifconfig vnic0
vnic0: flags=1104843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,ROUTER,IPv4> mtu 1500 index 7
	inet 10.0.1.16 netmask ffffff00 broadcast 10.0.1.255

The VNIC has been assigned IP address 10.0.1.16 and is now ready for use. To test it out, we'll copy a large file from one host to another, over the VNIC. To test this on a single machine, use a virtual machine configured with bridged networking or a zone. From the other host:

bleonard@os200906:~$ mkfile 100M big-file
bleonard@os200906:~$ scp big-file bleonard@10.0.1.16:bile-file
The authenticity of host '10.0.1.16 (10.0.1.16)' can't be established.
RSA key fingerprint is f7:1d:2c:d7:24:e3:1c:57:53:0f:59:75:31:4a:0f:7d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.1.16' (RSA) to the list of known hosts.
Password: 
big-file               0% |                             |   128 KB    13:22 ETA

Notice it's estimated to take over 13 minutes to copy this file. While the file is being copied, back on the host machine, change the maxbw property to 1000 megabits / second:

pfexec dladm set-linkprop -p maxbw=1000 vnic0

Immedially you'll notice the copy operation speed up and quickly complete:

big-file             100% |*****************************|   100 MB    00:37 

Very cool!

Thursday Jun 18, 2009

Yet another way to try OpenSolaris - this time on demand. Sun Learning Services has a program (in beta) where you can launch an instance of OpenSolaris from your browser. Most of you reading this blog probably already use OpenSolaris, so here's a tip you can pass onto your friends who've been envious of you :-).

Currently there are 8 instances available. And the version is still 2008.11. But to try it out, simply navigate to https://learning.sun.com/solc/course/sandbox-1. You'll have to log in to the site using your My Sun user id.

Once you are logged in, just follow the instructions. Eventually you'll have an instance of OpenSolaris running:

In case you missed it on the welcome page, the Username is root and the Password is cangetin.

It's worth repeating one other note from the welcome page:

Note: PLEASE DO NOT SHUTDOWN THE SOLARIS IMAGE USING SOLARIS COMMANDS - THIS TAKES THE IMAGE OFFLINE UNTIL WE MANUALLY RESTART IT. PLEASE QUIT FROM THE PORTAL. THANK YOU!

By that they mean click the "End Lab Session" link back on the site where you launched OpenSolaris:

Note, it appears as though you (or your friend) has one hour total to get acquainted with OpenSolaris. You can use that one hour over as many days as you like, after which, I guess they'll need to install it :-).

Wednesday Jun 17, 2009

As a user of OpenSolaris you may be wondering why it's missing all the popular fonts such as Arial, Times New Roman and the ever popular Wingdings. The license for these fonts prohibit their distribution with the operating system, however, they are freely available to you in the extra repository.

If you haven't yet set up the extra repository, take a moment and do so because it has other goodies like Flash, VirtualBox and the JavaFX SDK.

Once you have the extra repository added, the additional fonts are in the ttf-fonts-core package:

bleonard@opensolaris:~$ pkg info -r ttf-fonts-core
          Name: system/font/truetype/ttf-fonts-core
       Summary: Core desktop and document TrueType fonts
      Category: System/Fonts
         State: Not installed
     Publisher: extra
       Version: 1.0
 Build Release: 5.11
        Branch: 0.111
Packaging Date: Fri Apr  3 19:46:26 2009
          Size: 16.10 MB
          FMRI: pkg://extra/system/font/truetype/ttf-fonts-core@1.0,5.11-0.111:20090403T194626Z

The list of fonts includes:

To install them:
bleonard@opensolaris:~$ pfexec pkg install ttf-fonts-core
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                    1/1       84/84     9.49/9.49 

PHASE                                        ACTIONS
Install Phase                                  98/98 
PHASE                                          ITEMS
Reading Existing Index                           8/8 
Indexing Packages                                1/1

Then use them:


Tuesday Jun 16, 2009

If you're using OpenSolaris you should certainly have Time Slider enabled, at least on your home directory. OpenSolaris 2009.06 brings some enhancements to Time Slider, one of them being the ability to explore a file's versions:

From the File Version Explorer you can then compare older versions with the current. You'll see the following hint, which I'll get to in a minute:

It's a standard text diff like you would see from the command line. Now, back to that hint, let's install the SUNWmeld package:

bleonard@opensolaris:~$ pfexec pkg install SUNWmeld
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                    1/1     119/119     0.79/0.79 

PHASE                                        ACTIONS
Install Phase                                205/205 
PHASE                                          ITEMS
Reading Existing Index                           8/8 
Indexing Packages                                1/1

Then try running the compare again:

Note, Meld is more than just a viewer. You can merge changes or edit and save the current file. Meld also recognizes and highlights your changes in real time.



Today I came across 3 short screencasts by Christoph Schuba on various security related features in OpenSolaris:

Christoph's a senior engineer on the Solaris security team and a frequent presenter on the topic of OpenSolaris security at conferences. Each screencast is under 5 minutes. Enjoy.

Sunday May 31, 2009

That was the first question to the OpenSolaris engineers participating in the live chat. If you missed it, you can at least read the replay. There was an astounding 125,000 unique visitors to the chat!

Tuesday May 26, 2009

This Thursday, May 28th at 6:30 - 8:30 PM MDT, you can virtually attend the Front Range OpenSolaris User Group meeting as it's being broadcast over Ustream. The topics are:
  • OpenSolaris Auto Install by Clay Baenziger (60 mins)
  • How to synchronize an iPod by Pat Korsnick (20 mins)
Be sure to prepare your own pizza.

If your favorite piece of open source software isn't available for OpenSolaris, there's a fairly new tool called SourceJuicer to help you get it there. In my very limited experience with the tool, the key to a successful build is the spec file. In Josh Simons' latest blog entry, SourceJuicer: How to contribute a package to OpenSolaris, he gives a very in depth description of each line of the file. He then walks you though his experience of submitting ploticus, a tool for creating plots, charts and graphics. Thanks to Josh, you can now find it in the pending repository.

Wednesday May 20, 2009

If you are a developer in China you can now get access to a complete OpenSolaris desktop. Anyone who is interested can register an account at Unix-Center.Net. After your account is activated, you can login to the server either via SSH or VNC. Every user gets their own home directory and 100 MB of storage space.

Tuesday May 19, 2009

On Thursday May 28th from 10:00 AM to 12:00 PM PDT you have an opportunity to ask a handful of OpenSolaris engineers whatever you want (well, at least about OpenSolaris).

The engineers participating in the chat include:

On Thursday May 28th go to Slashdot and look for the OpenSolaris chat window.

The installation of a zone in OpenSolaris is a bit different than in Solaris 10 (or SXCE) and it's due to IPS, which is unique to OpenSolaris. When you create a zone in Solaris 10, you get a native zone, which is very lightweight because it shares much of its system software with the base Solaris 10 installation. However, native zones presume you are using the SVR4 packing system (as opposed to IPS). Therefore, OpenSolaris uses a branded zone called ipkg.

The ipkg branded zone doesn't share any of its system information with base OpenSolaris installation. As a matter of fact, when installed, it's not even copied from the base installation, but rather downloaded from an IPS repository. Obviously this makes working with zones in OpenSolaris a bit more restrictive (it took about 10 minutes to download and install on my machine). Supposedly, work is underway to add IPS support to native zones. But until that happens, here's my guide to working with zones in OpenSolaris.

Setting up a zone involves 4 steps: create, install, boot and configure.

Step 1: Create the Zone

If you're not interested in zones, you should at least be aware that you're already running in one - the global zone:

bleonard@opensolaris:~$ zoneadm list -v
  ID NAME             STATUS     PATH                           BRAND    IP    
   0 global           running    /                              native   shared

Zones must be installed within a ZFS file system, otherwise the zone install command will generate the error "no zonepath dataset" (see defect 8468 for details). You can either use an existing ZFS file system, such as /export/home or create a new one, as I chose to do here:

pfexec zfs create -o mountpoint=/zones rpool/zones

Before we actually create the zone, let's pre-determine some information that will be required. I'm going to set the zone name to myzone. The zone needs a network interface, which can match that of the global zone. This is easiest to figure out by hovering over the connection properties icon in the top panel and noting the Network Connection:

In my case it's e1000g0.

Since we'll be using a shared IP stack with the global zone, the non-global zone is not at liberty to select its own IP address (or use DHCP). I may talk about exclusive IP stacks in another entry, but for now we need to choose a free IP address on the subnet (I'm running OpenSolaris in VirtualBox, which provides it's own subnet). I'll be using 10.0.2.25.

Once you have that information collected, you can begin to create the zone:

bleonard@opensolaris:~$ pfexec zonecfg -z myzone
myzone: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:myzone> create
zonecfg:myzone> set zonepath=/zones/myzone
zonecfg:myzone> add net 
zonecfg:myzone:net> set physical=e1000g0
zonecfg:myzone:net> set address=10.0.2.25
zonecfg:myzone:net> end
zonecfg:myzone> exit

To see your zone's current configuration, run:

bleonard@opensolaris:~$ zonecfg -z myzone info
zonename: myzone
zonepath: /zones/myzone
brand: ipkg
autoboot: false
bootargs: 
pool: 
limitpriv: 
scheduling-class: 
ip-type: shared
net:
	address: 10.0.2.25
	physical: e1000g0
	defrouter not specified  

List the zones again, using the -c option to show all zones (not just those installed):

bleonard@opensolaris:~$ zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP    
   0 global           running    /                              native   shared
   - myzone           configured /zones/myzone                  ipkg     shared

Notice the brand is ipkg.

Step 2: Install the Zone

Now that the zone's configured, let's install it. Zone installation on OpenSolaris is a much different experience than on Solaris 10, as the zone must be downloaded from the package repository rather then simply copied from the global zone:

bleonard@opensolaris:~$ pfexec zoneadm -z myzone install
A ZFS file system has been created for this zone.
  Authority: Using http://pkg.opensolaris.org/release/.
      Image: Preparing at /zones/myzone/root ... done.
 Installing: (output follows)
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                  52/52   7862/7862   72.41/72.41 

PHASE                                        ACTIONS
Install Phase                            12939/12939 
PHASE                                          ITEMS
Reading Existing Index                           9/9 
Indexing Packages                              52/52 

       Note: Man pages can be obtained by installing SUNWman
Postinstall: Copying SMF seed repository ... done.
Postinstall: Working around http://defect.opensolaris.org/bz/show_bug.cgi?id=741
       Done: Installation completed in 595.162 seconds.

 Next Steps: Boot the zone, then log into the zone console
             (zlogin -C) to complete the configuration process

We can verify the installation via it's status:

 bleonard@opensolaris:~$ zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP    
   0 global           running    /                              native   shared
   - myzone           installed  /zones/myzone                  ipkg     shared

Steps 3 & 4: Boot and Configure

The next steps are to boot and configure the zone. When the zone boots for the first time, sysidtool is going to run to configure the system. We will boot the zone using two terminal windows: one to boot the system and the other to configure it. Note, it is possible to automate these system configuration steps, which I'll cover in a future blog.

Log into the zone and wait for it to boot:

bleonard@opensolaris:~$ pfexec zlogin -C myzone
[Connected to zone 'myzone' console]  

Open a 2nd terminal window and boot the zone. If you see the warning like I did, don't worry about it, I address this at the end of the entry.

bleonard@opensolaris:~$ pfexec zoneadm -z myzone boot
zone 'myzone': WARNING: e1000g0:1: no matching subnet found in netmasks(4) for 10.0.2.25; using default of 255.0.0.0.

Then back in the 1st terminal, proceed with system configuration:

[NOTICE: Zone booting up]


SunOS Release 5.11 Version snv_101b 32-bit
Copyright 1983-2008 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Hostname: myzone
Loading smf(5) service descriptions: 68/68
Reading ZFS config: done.
Mounting ZFS filesystems: (5/5)

 

What type of terminal are you using? 1) ANSI Standard CRT 2) DEC VT100 3) PC Console 4) Sun Command Tool 5) Sun Workstation 6) X Terminal Emulator (xterms) 7) Other Type the number of your choice and press Return: 6 Creating new rsa public/private host key pair Creating new dsa public/private host key pair Configuring network interface addresses: e1000g0.

 
  

Give the zone a host name (or select the default):

─ Host Name for e1000g0:1 ─────────────────────────────────────────────────────

  Enter the host name which identifies this system on the network.  The name
  must be unique within your domain; creating a duplicate host name will cause
  problems on the network after you install Solaris.

  A host name must have at least one character; it can contain letters,
  digits, and minus signs (-).


    Host name for e1000g0:1 myzone                          











────────────────────────────────────────────────────────────────────────────────
    F2_Continue    F6_Help

Note, for some reason the "Continue" command switches from F2, as in the screen shot above, to Esc+2, as seen in the following screens.

Confirm the host name:

─ Confirm Information for e1000g0:1 ────────────────────────────────────────────

  > Confirm the following information.  If it is correct, press F2;
    to change any information, press F4.


    Host name: myzone















────────────────────────────────────────────────────────────────────────────────
    Esc-2_Continue    Esc-4_Change    Esc-6_Help

Configure the security policy:

─ Configure Security Policy: ───────────────────────────────────────────────────

  Specify Yes if the system will use the Kerberos security mechanism.

  Specify No if this system will use standard UNIX security.

      Configure Kerberos Security
      ───────────────────────────
      [ ] Yes
      [X] No












────────────────────────────────────────────────────────────────────────────────
    Esc-2_Continue    Esc-6_Help

Confirm the security policy:

 ─ Confirm Information ──────────────────────────────────────────────────────────

  > Confirm the following information.  If it is correct, press F2;
    to change any information, press F4.


    Configure Kerberos Security: No















────────────────────────────────────────────────────────────────────────────────
    Esc-2_Continue    Esc-4_Change    Esc-6_Help

Set the name service. I will be using DNS:

─ Name Service ─────────────────────────────────────────────────────────────────

  On this screen you must provide name service information.  Select the name
  service that will be used by this system, or None if your system will either
  not use a name service at all, or if it will use a name service not listed
  here.

  > To make a selection, use the arrow keys to highlight the option
    and press Return to mark it [X].


      Name service
      ────────────
      [ ] NIS+
      [ ] NIS
      [X] DNS
      [ ] LDAP
      [ ] None




────────────────────────────────────────────────────────────────────────────────
    Esc-2_Continue    Esc-6_Help

If you also selected DNS, set the domain name, DNS severs and search domains. I'm using the same settings as my global zone, which you can find in /etc/resolve.conf:

bleonard@opensolaris:~$ cat /etc/resolv.conf 
domain hsd1.ct.comcast.net.
nameserver 10.0.2.3
Set the domain name:
─ Domain Name ──────────────────────────────────────────────────────────────

  On this screen you must specify the domain where this system resides.  Make
  sure you enter the name correctly including capitalization and punctuation.


    Domain name: hsd1.ct.comcast.net             















────────────────────────────────────────────────────────────────────────────────

    Esc-2_Continue    Esc-6_Help

Add the DNS Server Addresses:

─ DNS Server Addresses ─────────────────────────────────────────────────────────

  On this screen you must enter the IP address of your DNS server(s).  You
  must enter at least one address.  IP addresses must contain four sets of
  numbers separated by periods (for example 129.200.9.1).



    Server's IP address: 10.0.2.3        
    Server's IP address:
    Server's IP address:











───────────────────────────────────────────────────────────────────────────────
    Esc-2_Continue    Esc-6_Help

And any search domains:

─ DNS Search List ──────────────────────────────────────────────────────────────

  On this screen you can enter a list of domains that will be searched when a
  DNS query is made.  If you do not enter any domains, DNS will only search
  the DNS domain chosen for this system.  The domains entered, when
  concatenated, may not be longer than 250 characters.



    Search domain:                                 
    Search domain:
    Search domain:
    Search domain:
    Search domain:
    Search domain:







────────────────────────────────────────────────────────────────────────────────
    Esc-2_Continue    Esc-6_Help

Confirm the network information:

─ Confirm Information ──────────────────────────────────────────────────────────

  > Confirm the following information.  If it is correct, press F2;
    to change any information, press F4.


          Name service: DNS
           Domain name: hsd1.ct.comcast.net
    Server address(es): 10.0.2.3













────────────────────────────────────────────────────────────────────────────────
    Esc-2_Continue    Esc-4_Change    Esc-6_Help

Ignore the Name Service Error (i.e., do not enter new name service information):

─ Name Service Error ───────────────────────────────────────────────────────────

  Unable to find an address entry for myzone with the specified DNS
  configuration.


      Enter new name service information?
      ───────────────────────────────────
      [ ] Yes
      [X] No












────────────────────────────────────────────────────────────────────────────────
    Esc-2_Continue    Esc-6_Help

NFSv4 Domain Name:

─ NFSv4 Domain Name ────────────────────────────────────────────────────────────

  NFS version 4 uses a domain name that is automatically derived from the
  system's naming services. The derived domain name is sufficient for most
  configurations. In a few cases, mounts that cross domain boundaries might
  cause files to appear to be owned by "nobody" due to the lack of a common
  domain name.

  The current NFSv4 default domain is: "hsd1.ct.comcast.net"


      NFSv4 Domain Configuration
      ──────────────────────────────────────────────
      [X] Use the NFSv4 domain derived by the system
      [ ] Specify a different NFSv4 domain







────────────────────────────────────────────────────────────────────────────────
    Esc-2_Continue    Esc-6_Help

Confirm:

─ Confirm Information for NFSv4 Domain ─────────────────────────────────────────

  > Confirm the following information.  If it is correct, press F2;
    to change any information, press F4.



    NFSv4 Domain Name:  << Value to be derived dynamically >>















────────────────────────────────────────────────────────────────────────────────
    Esc-2_Continue    Esc-4_Change    Esc-6_Help

Select your time zone:

─ Time Zone ────────────────────────────────────────────────────────────────────

  On this screen you must specify your default time zone.  You can specify a
  time zone in three ways:  select one of the continents or oceans from the
  list, select other - offset from GMT, or other - specify time zone file.

  > To make a selection, use the arrow keys to highlight the option and
    press Return to mark it [X].


      Continents and Oceans
      ──────────────────────────────────
  -   [ ] Africa
  │   [X] Americas
  │   [ ] Antarctica
  │   [ ] Arctic Ocean
  │   [ ] Asia
  │   [ ] Atlantic Ocean
  │   [ ] Australia
  │   [ ] Europe
  v   [ ] Indian Ocean

──────────────────────────────────────────────────────────────────────────────
    Esc-2_Continue    Esc-6_Help

Country:

─ Country or Region ────────────────────────────────────────────────────────────

  > To make a selection, use the arrow keys to highlight the option and
    press Return to mark it [X].


      Countries and Regions
      ───────────────────────────
  -   [X] United States
  │   [ ] Anguilla
  │   [ ] Antigua & Barbuda
  │   [ ] Argentina
  │   [ ] Aruba
  │   [ ] Bahamas
  │   [ ] Barbados
  │   [ ] Belize
  │   [ ] Bolivia
  │   [ ] Brazil
  │   [ ] Canada
  │   [ ] Cayman Islands
  v   [ ] Chile

──────────────────────────────────────────────────────────────────────────────
    Esc-2_Continue    Esc-6_Help

Time Zone:

─ Time Zone ───────────────────────────────────────────────────────────────────

  > To make a selection, use the arrow keys to highlight the option and
    press Return to mark it [X].


      Time zones
      ──────────────────────────────────────────────────────────────────────────
  -   [X] Eastern Time
  │   [ ] Eastern Time - Michigan - most locations
  │   [ ] Eastern Time - Kentucky - Louisville area
  │   [ ] Eastern Time - Kentucky - Wayne County
  │   [ ] Eastern Time - Indiana - most locations
  │   [ ] Eastern Time - Indiana - Daviess, Dubois, Knox & Martin Counties
  │   [ ] Eastern Time - Indiana - Starke County
  │   [ ] Eastern Time - Indiana - Pulaski County
  │   [ ] Eastern Time - Indiana - Crawford County
  │   [ ] Eastern Time - Indiana - Switzerland County
  │   [ ] Central Time
  │   [ ] Central Time - Indiana - Perry County
  v   [ ] Central Time - Indiana - Pike County

────────────────────────────────────────────────────────────────────────────────
    Esc-2_Continue    Esc-6_Help

Confirm Time Zone:

─ Confirm Information ─────────────────────────────────────────────────────────

  > Confirm the following information.  If it is correct, press F2;
    to change any information, press F4.


    Time zone: Eastern Time
               (US/Eastern)














──────────────────────────────────────────────────────────────────────────────
    Esc-2_Continue    Esc-4_Change    Esc-6_Help

And finally, set the root password:

─ Root Password ────────────────────────────────────────────────────────────────

  Please enter the root password for this system.

  The root password may contain alphanumeric and special characters.  For
  security, the password will not be displayed on the screen as you type it.

  > If you do not want a root password, leave both entries blank.


    Root password:  *********
    Root password:  *********       










────────────────────────────────────────────────────────────────────────────────
    Esc-2_Continue    Esc-6_Help

Zone configuration is complete. You can now log into the zone:

System identification is completed.

myzone console login: root
Password: 
Apr  1 21:48:04 myzone login: ROOT LOGIN /dev/console
Sun Microsystems Inc.   SunOS 5.11      snv_101b        November 2008
root@myzone:~# 

From the other terminal, the zone's status now shows as running:

bleonard@opensolaris:~$ zoneadm list -v
  ID NAME             STATUS     PATH                           BRAND    IP    
   0 global           running    /                              native   shared
   1 myzone           running    /zones/myzone                  ipkg     shared

Working with the Zone

To drop off the zone console, exit the shell prompt and then type ~. at the console login prompt:

root@myzone:~# exit
logout

myzone console login: ~.
[Connection to zone 'myzone' console closed]
bleonard@opensolaris:~$ 

The zone is still running. Log in again:

bleonard@opensolaris:~$ pfexec zlogin -C myzone
[Connected to zone 'myzone' console]

Hit return to get the login prompt:

myzone console login: root
Password: 
Last login: Wed Apr  1 22:00:12 on console
Sun Microsystems Inc.   SunOS 5.11      snv_101b        November 2008
root@myzone:~# 

The zone can be shutdown, halted or rebooted from within the zone (here's a reboot example):

root@myzone:~# reboot
Apr  2 01:18:50 myzone reboot: initiated by root on /dev/console

[NOTICE: Zone rebooting]


SunOS Release 5.11 Version snv_101b 32-bit
Copyright 1983-2008 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Hostname: myzone
Reading ZFS config: done.
Mounting ZFS filesystems: (5/5)

myzone console login: 

Or from the global zone:

pfexec zoneadm -z myzone reboot

Now that we have a zone, there's plenty of opportunity to experiment...

Deleteing the Zone

pfexec zoneadm -z myzone uninstall 
pfexec zonecfg -z myzone delete -F

Fixing the netmask Warnings

If you're getting the netmask warning as I did when the zone boots:

zone 'myzone': WARNING: e1000g0:1: no matching subnet found in netmasks(4) for 10.0.2.25;⁞ using default of 255.0.0.0.
You can eliminate it by adding the zone's IP subnet into /etc/inet/netmasks. However, before we can edit the netmasks file, we need to make it writable:
pfexec chmod u+w /etc/inet/netmasks

Then add the proper subnet for you network. For example:

10.0.2.0 255.255.255.0

Now the zone will boot cleanly. For more information see netmasks Warning Displayed When Booting Zone.

Friday May 15, 2009

Last week I blogged about the OpenSolaris sessions at CommunityOne West event being held on Monday June 1st. 

On Tuesday, June 2nd there are two tracks of OpenSolaris deep dives planned: Developing in OpenSolaris and Deploying OpenSolaris in Your Datacenter.

Developing in OpenSolaris Deep Dives

Start
 Time
Duration
(mins)
 Session  Speaker
 9:00 AM
50
Inside OpenSolaris: The Developer View
Mark Nelson, Sun Microsystems
 10:00 AM
120
Secure Programming
Scott Rotondo, Sun Microsystems
 12:00 PM
60
Free Lunch
1:00 PM
50
Device Driver Overview
Max Bruning, Bruning Systems
 2:00 PM
50
Porting Linux USB Drivers to OpenSolaris Max Bruning, Bruning Systems
 3:00 PM
50
OpenSolaris Kernel Debugging Max Bruning, Bruning Systems
 4:00 PM
50
Diving into the SourceJuicer : Developing, Reviewing and Testing Open Source Code Jim Walker, Christian Kelly, Dermot McCluskey, Barry Cheshire, Sun Microsystems

Deploying OpenSolaris in Your Datacenter

 Start
 Time
Duration
(mins)
 Session  Speaker
 11:00 AM
60
Deploying OpenSolaris in Your Datacenter Chris Armes, Sun Microsystems
 12:00 PM
60
Free Lunch
1:00 PM
110
Becoming a ZFS Ninja Ben Rockwood, Joyent
 3:00 PM
50
High Availability with OpenSolaris Nick Solter, Sun
 4:00 PM
50
Application consolidation with OpenSolaris Containers Jerry Jelinek, Sun

NOTE: These two OpenSolaris deep dive tracks are FREE. To register just visit http://www.c1osdd.eventbrite.com/.  You will need your CommunityOne Registration ID (Wnnnnnnn) to complete the process, so be sure to have it handy.

You can keep up to date with all our plans for CommunityOne West by monitoring the OpenSolaris at CommunityOne West Planning Wiki.

Friday May 08, 2009

OpenSolaris is featured in 3 or the 10 tracks at CommunityOne West in San Francisco on Monday June 1st. For your convenience I've provided snapshots of the current agenda, but please check the links provided (by clicking the track title) for the most up to date listing. By going to the content catalog, you'll also get access to the talk descriptions and speaker bios.

Operating Systems and Platforms Track


Operating Systems: Managing OpenSolaris

Operating Systems: Developing On OpenSolaris

I'm really excited about this 3rd track as all of the speakers have gotten together to coordinate the content.  We're attempting to weave a story that starts with developing then moves onto tuning, testing, observing and instrumenting your applications. The track concludes with a talk on the new SourceJuicer tool for porting applications to OpenSolaris.

The event is free and concludes with a killer party on Monday night, so start petitioning your boss now to let you spend the day with us. Don't forget to register.

This blog copyright 2009 by Roman Strobl