Wednesday Aug 15, 2012

Pre-work for Upcoming Solaris 11 Boot Camps

Over the next few weeks, I will be hosting some Solaris 11 hands on workshops. Some of these will be public events at an Oracle office while others will be private sessions for a specific customer.

The public sessions I'm hosting are

Note: there is also another identical Solaris 11 session hosted by my colleague, Pavel Anni, in Broomfield, Colorado on August 23.

If you are planning on attending any of these sessions (including Pavel's), there are several things you can do in advance that will help not only you, but your fellow attendees.

Enable VT-x or AMD-V on your Laptop

If you will be using VirtualBox to host your workshop guest image, you need to enable the hardware virtualization feature. This is typically found in your BIOS and where you find the setting varies by laptop manufacturer. If you do not find it in the system or CPU settings, try looking in security. If you are given the choice of VT-x and VT-d, you only need to enable VT-x.

If you have a company laptop that does not allow you to change the BIOS settings, you might ask your employer if they can provide you one for the day that is not locked down.

Note: Enabling hardware virtualization is a requirement to complete the workshop.

Download and Install VirtualBox

Since this will be primarily a hands on lab, you are encouraged to bring a laptop. The labs will all be run in a Solaris guest machine, so your laptop will also need a virtualization application, such as VMware or VirtualBox. We recommend VirtualBox. You can download a free copy at VirtualBox.org. Binaries are available for Windows, MacOS, Solaris and most Linux distributions.

After installing VirtualBox, you should also install the VirtualBox Extensions Pack. These are not required for the lab, but should you continue to use the guest machine after the workshop, you might find some of the features very useful.

Download a Solaris 11 VM Appliance from the Oracle Technology Network (OTN)

You can download a pre-built Solaris 11 guest image directly from the Oracle Technology Network. Here is a link to the VM download page. Accept the license and download the latest Solaris 11 VirtualBox guest image.

Once downloaded, you can use the VirtualBox VM import function to create a usable guest. Clicking File -> Import Appliance on the VirtualBox main window will launch the import wizard. Select the file you just downloaded and in a few minutes you will have a bootable Solaris 11 guest. The import process should look something like this.


Click image to enlarge

Configure the Solaris Guest

The first time you boot the Solaris 11 guest, you will be required to complete a short configuration dialog. Once you have specified all of the items on the page, press F2 to advance to the next screen.

The introduction screen looks like this.



Click image to enlarge

On the second page, specify the host name and default network setup. The default name of solaris is used throughout the lab. For the network setup, select Automatic.



Click image to enlarge

The next item in the initial system configuration is the timezone. That does not matter for the hands on labs. If you are experiencing poor weather, I have found that setting the system to Aruba time can be helpful.

The final step is to set the root password and set up the initial user. To stay consistent with the lab handouts, set the root password to oracle2011. The initial user should be specified as lab and its password should be oracle1.



Click image to enlarge

Finally, you will be presented a summary screen, which should look something like this. When satisfied, press F2 to complete.



Click image to enlarge

The Solaris 11 VM image from the Oracle Technology Network has the VirtualBox Guest Additions already installed. This enables keyboard and mouse integration as well resize/seamless windows.

Set up a Local Repository

To complete the zone installation labs in the workshop, you will need to access the Oracle public Solaris 11 repository, which means you also must have wireless network access. This does not always work well in a workshop with 30 or 40 users stressing out the local wireless access point. To make this easier, you can create your own customized package repository in your newly imported Solaris 11 guest. My colleague, Pavel Anni, has supplied this excellent set of instructions on how to do that..

1. Create a directory or a ZFS file system to hold your local repository.

# mkdir /repo
or 
# zfs create -o mountpoint=/repo -o compress=gzip rpool/repo
2. Create an empty repository in it
# pkgrepo create /repo
3. Create a text file 'zone-pkgs.txt' with the list of necessary packages. That list should look like this (cut and paste is your best friend).

pkg://solaris/compress/bzip2
pkg://solaris/compress/gzip
pkg://solaris/compress/p7zip
pkg://solaris/compress/unzip
pkg://solaris/compress/zip
pkg://solaris/consolidation/SunVTS/SunVTS-incorporation
pkg://solaris/consolidation/X/X-incorporation
pkg://solaris/consolidation/admin/admin-incorporation
pkg://solaris/consolidation/cacao/cacao-incorporation
pkg://solaris/consolidation/cde/cde-incorporation
pkg://solaris/consolidation/cns/cns-incorporation
pkg://solaris/consolidation/dbtg/dbtg-incorporation
pkg://solaris/consolidation/desktop/desktop-incorporation
pkg://solaris/consolidation/desktop/gnome-incorporation
pkg://solaris/consolidation/gfx/gfx-incorporation
pkg://solaris/consolidation/install/install-incorporation
pkg://solaris/consolidation/ips/ips-incorporation
pkg://solaris/consolidation/java/java-incorporation
pkg://solaris/consolidation/jdmk/jdmk-incorporation
pkg://solaris/consolidation/l10n/l10n-incorporation
pkg://solaris/consolidation/ldoms/ldoms-incorporation
pkg://solaris/consolidation/man/man-incorporation
pkg://solaris/consolidation/nspg/nspg-incorporation
pkg://solaris/consolidation/nvidia/nvidia-incorporation
pkg://solaris/consolidation/osnet/osnet-incorporation
pkg://solaris/consolidation/sfw/sfw-incorporation
pkg://solaris/consolidation/sic_team/sic_team-incorporation
pkg://solaris/consolidation/solaris_re/solaris_re-incorporation
pkg://solaris/consolidation/sunpro/sunpro-incorporation
pkg://solaris/consolidation/ub_javavm/ub_javavm-incorporation
pkg://solaris/consolidation/userland/userland-incorporation
pkg://solaris/consolidation/vpanels/vpanels-incorporation
pkg://solaris/consolidation/xvm/xvm-incorporation
pkg://solaris/crypto/ca-certificates
pkg://solaris/database/sqlite-3
pkg://solaris/developer/base-developer-utilities
pkg://solaris/developer/debug/mdb
pkg://solaris/developer/macro/cpp
pkg://solaris/diagnostic/cpu-counters
pkg://solaris/diagnostic/snoop
pkg://solaris/diagnostic/tcpdump
pkg://solaris/driver/serial/asy
pkg://solaris/driver/storage/cmdk
pkg://solaris/driver/storage/mpt
pkg://solaris/driver/x11/xsvc
pkg://solaris/editor/vim/vim-core
pkg://solaris/entire
pkg://solaris/group/system/solaris-small-server
pkg://solaris/library/database/gdbm
pkg://solaris/library/expat
pkg://solaris/library/libffi
pkg://solaris/library/libidn
pkg://solaris/library/libmilter
pkg://solaris/library/libtecla
pkg://solaris/library/libxml2
pkg://solaris/library/libxslt
pkg://solaris/library/ncurses
pkg://solaris/library/nspr
pkg://solaris/library/perl-5/sun-solaris-512
pkg://solaris/library/python-2/cherrypy-26
pkg://solaris/library/python-2/lxml-26
pkg://solaris/library/python-2/m2crypto-26
pkg://solaris/library/python-2/mako-26
pkg://solaris/library/python-2/ply-26
pkg://solaris/library/python-2/pybonjour-26
pkg://solaris/library/python-2/pycurl-26
pkg://solaris/library/python-2/pyopenssl-26
pkg://solaris/library/python-2/python-extra-26
pkg://solaris/library/python-2/simplejson-26
pkg://solaris/library/readline
pkg://solaris/library/security/nss
pkg://solaris/library/security/openssl
pkg://solaris/library/security/trousers
pkg://solaris/library/zlib
pkg://solaris/media/cdrtools
pkg://solaris/media/xorriso
pkg://solaris/naming/ldap
pkg://solaris/network/bridging
pkg://solaris/network/dns/bind
pkg://solaris/network/ipfilter
pkg://solaris/network/open-fabrics
pkg://solaris/network/ping
pkg://solaris/network/rsync
pkg://solaris/network/ssh
pkg://solaris/network/ssh/ssh-key
pkg://solaris/package/pkg
pkg://solaris/package/pkg/zones-proxy
pkg://solaris/package/svr4
pkg://solaris/release/name
pkg://solaris/release/notices
pkg://solaris/runtime/perl-512
pkg://solaris/runtime/python-26
pkg://solaris/security/nss-utilities
pkg://solaris/security/sudo
pkg://solaris/security/tcp-wrapper
pkg://solaris/service/file-system/nfs
pkg://solaris/service/network/dns/mdns
pkg://solaris/service/network/smtp/sendmail
pkg://solaris/service/network/ssh
pkg://solaris/service/security/gss
pkg://solaris/service/security/kerberos-5
pkg://solaris/shell/bash
pkg://solaris/shell/ksh
pkg://solaris/system/boot-environment-utilities
pkg://solaris/system/boot/wanboot
pkg://solaris/system/core-os
pkg://solaris/system/data/terminfo/terminfo-core
pkg://solaris/system/data/timezone
pkg://solaris/system/device-administration
pkg://solaris/system/dtrace
pkg://solaris/system/dtrace/dtrace-toolkit
pkg://solaris/system/fault-management
pkg://solaris/system/fault-management/smtp-notify
pkg://solaris/system/file-system/autofs
pkg://solaris/system/file-system/hsfs
pkg://solaris/system/file-system/nfs
pkg://solaris/system/file-system/pcfs
pkg://solaris/system/file-system/udfs
pkg://solaris/system/file-system/ufs
pkg://solaris/system/file-system/zfs
pkg://solaris/system/install
pkg://solaris/system/install/configuration
pkg://solaris/system/install/locale
pkg://solaris/system/kernel
pkg://solaris/system/kernel/platform
pkg://solaris/system/kernel/secure-rpc
pkg://solaris/system/kernel/security/gss
pkg://solaris/system/library
pkg://solaris/system/library/boot-management
pkg://solaris/system/library/c++-runtime
pkg://solaris/system/library/gcc-3-runtime
pkg://solaris/system/library/iconv/utf-8
pkg://solaris/system/library/install
pkg://solaris/system/library/libpcap
pkg://solaris/system/library/math
pkg://solaris/system/library/openmp
pkg://solaris/system/library/security/gss
pkg://solaris/system/library/security/gss/diffie-hellman
pkg://solaris/system/library/security/gss/spnego
pkg://solaris/system/library/security/libsasl
pkg://solaris/system/library/security/rpcsec
pkg://solaris/system/library/storage/libdiskmgt
pkg://solaris/system/library/storage/scsi-plugins
pkg://solaris/system/linker
pkg://solaris/system/locale
pkg://solaris/system/manual
pkg://solaris/system/manual/locale
pkg://solaris/system/network
pkg://solaris/system/network/nis
pkg://solaris/system/network/routing
pkg://solaris/system/prerequisite/gnu
pkg://solaris/system/resource-mgmt/resource-caps
pkg://solaris/system/resource-mgmt/resource-pools
pkg://solaris/system/system-events
pkg://solaris/system/zones
pkg://solaris/system/zones/brand/brand-solaris
pkg://solaris/terminal/luit
pkg://solaris/terminal/resize
pkg://solaris/text/doctools
pkg://solaris/text/doctools/ja
pkg://solaris/text/groff/groff-core
pkg://solaris/text/less
pkg://solaris/text/spelling-utilities
pkg://solaris/web/curl
pkg://solaris/web/wget
pkg://solaris/x11/header/x11-protocols
pkg://solaris/x11/library/libfontenc
pkg://solaris/benchmark/iperf
4. Populate your local repository with the required packages. At present, it is not possible to do this in parallel, so the packages much be received on at a time. Depending on your network speed, this step could take 2 to 3 hours.
# for f in `cat zone-pkgs.txt` ; \ 
do pkgrecv -s http://pkg.oracle.com/solaris/release -d /repo $f ; \ 
echo $f ; \ 
done
pkgrepo rebuild -s /repo
5. Check if you really have 167 packages (if you have downloaded and installed the archive, it might be more, we have added apache and iperf packages for our demo purposes)
# pkgrepo info -s file:///repo
6. Set up and enable package repository service in the global zone:
# svccfg -s application/pkg/server setprop pkg/inst_root=/repo   
# svcprop -p pkg/inst_root application/pkg/server   (Just checking...)
# svcadm refresh application/pkg/server 
# svcadm enable application/pkg/server 
7. Switch repositories (disable the all existing ones and mirrors and enable the local one):
# pkg set-publisher -G '*' -M '*' -g http://10.0.2.15/ solaris
Note that it should use your global zone's IP address (in this case, provided automatically by VirtualBox). Then all the zones you create will keep this address and be able to install packages from the global zone. It won't work if you set your repository's HTTP address just to http://localhost.

Download zoneplot

The zones portion of the hands on lab will make use of two utilities that are not in Solaris. You will need to download both Pavel Anni's zoneplot and Andreas Bernauer's Gnuplot driver utility

Optional: Return your Solaris publisher to the Oracle default repository

When you have completed all of the labs, you can restore the original Oracle default repository.
# pkg set-publisher -G '*' -g http://pkg.oracle.com/solaris/release -P solaris
That should be about it. Please leave a comment if you have any questions. I am looking forward to seeing you at one of these, or a future Solaris event.

Technocrati Tags:

About

Bob Netherton is a Principal Sales Consultant for the North American Commercial Hardware group, specializing in Solaris, Virtualization and Engineered Systems. Bob is also a contributing author of Solaris 10 Virtualization Essentials.

This blog will contain information about all three, but primarily focused on topics for Solaris system administrators.

Please follow me on Twitter Facebook or send me email

Search

Archives
« August 2012 »
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
16
17
18
19
20
23
24
25
26
27
28
29
30
31
 
       
Today