Well, it has been a while since I last wrote anything here. I have been working on a team developing a new project, which we named Etude. Marc Hamilton, VP of Solaris Marketing, has written about it here.
[As an aside, it's weird to have a code name you selected cross the lips of senior executives several months later]
In a nutshell, we've built a Solaris Container (or Zone) which is capable of running the Solaris 8 user environment. We have also created a capability to perform P2V (or Physical-to-Virtual) transformation of existing Solaris 8 systems into containers running on a Solaris 10 host. This is an enabler for rapid migration of legacy Solaris 8 environments onto modern, environmentally friendly, cost effective hardware. And onto Solaris 10. The idea is to break up the upgrade tasks into chunks, allowing the hardware and OS to be upgraded, while continuing to run legacy environments. Next, the legacy environments can be used until they are retired, or redeployed into Solaris 10 containers, or into logical domains.
I will write more about the why and the how of this project in a future blog entry. (And Marc does a good job of explaining some of the why in his blog, so go there for more background). But for now, I want to expand upon the what. The notion of a Solaris 8 container was not a new one when we began to look at this problem early this year. But with the completion of the BrandZ project, we had the tools in hand to make a serious attempt to realize this idea. BrandZ was originally developed so that we could have a "Linux Zone" but the core "brand" framework is really very flexible (and is now more so, thanks to our work). It allows the development of a variety of OS personalities atop Solaris 10.
So who built Etude? I'm very lucky to be leading a group of seasoned and incredibly talented engineers: Bill, Ed, Jerry, and Steve (no blog), and Penny on documentation. We worked at something of a breakneck pace to assemble a prototype, which we had in hand by late April. Since then, we have worked to convert the prototype into a production quality offering. I'll try to say more about that later. Along the way, we've had a lot of help from many corners of the company-- people too numerous to list. I especially want to thank Bill Franklin, Jerri-Ann, Joost, Susan, Allan, Richard, Tim and Liane.
Ok, so I'm anxious to show off our creation. First, let's archive a Solaris 8 system using the Flash Archiving tools. If your S8 system is patched up to date, you already have these tools installed. Alternatively, you could use CPIO or ufsdump or some other tool to create a suitable archive:
s8-system # uname -a
SunOS s8-system 5.8 Generic_108528-29 sun4u sparc SUNW,UltraAX-i2
s8-system # flarcreate -S -n s8-system /net/s10system/export/s8-system.flar
Determining which filesystems will be included in the archive...
Creating the archive...
Archive creation complete.
[Note to our beta customers! In the beta version of Etude, support for Flash Archives is not present, so if you use this blog entry as a substitute for reading the documentation, you will be disappointed. Please ensure that you carefully read the supplied instructions]
In the above example, I've simply used NFS to place the flash archive onto my Solaris 10 system, but you
could use any method for moving files around. Now, we'll head over to the Solaris 10 system and create a
container suitable for use as a Solaris 8 environment...
s10-system # zonecfg -z s8-system
s8-system: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:s8-system> create -t SUNWsolaris8
zonecfg:s8-system> set zonepath=/aux/zones/s8-system
zonecfg:s8-system> add net
zonecfg:s8-system:net> set address=10.6.62.226/24
zonecfg:s8-system:net> set physical=e1000g0
zonecfg:s8-system> add dedicated-cpu
zonecfg:s8-system:dedicated-cpu> set ncpus=2
s10-system # zoneadm list -vc
ID NAME STATUS PATH BRAND IP
0 global running / native shared
- s8-system configured /aux/zones/s8-system solaris8 shared
The last part (setting ncpus=2) is not strictly necessary, but is a good example of
how easy it is to allocate CPU resources to containers starting in Solaris 10 8/2007.
Jerry (who led that work) and Jeff Victor have written more about this capability
here and here.
(By the way, Solaris 10, 8/07 was launched yesterday, and includes
BrandZ and many other enhancements to the containers infrastructure.)
Now that we've configured the zone, we need to install it. We'll use the flash archive we made to do so:
s10-system # zoneadm -z s8-system install -a /aux/flar/s8-system.flar
Log File: /var/tmp/s8-system.install.104490.log
Installing: This may take several minutes...
Postprocessing: This may take several minutes...
Result: Installation completed successfully.
Log File: /aux/zones/s8-system/root/var/log/s8-system.install.104490.log
That's it! We've now installed a Solaris 8 container! Let's boot it up, and log onto
the console, and see what happens:
s10-system # zoneadm -z s8-system boot; zlogin -C s8-system
[Connected to zone 's8-system' console]
SunOS Release 5.8 Version Generic_Virtual 64-bit
Copyright 1983-2000 Sun Microsystems, Inc. All rights reserved
The system is coming up. Please wait.
NIS domainname is mpklab.sfbay.sun.com
starting rpc services: rpcbind keyserv ypbind done.
syslog service starting.
Print services started.
The system is ready.
s8-system console login: root
Sep 5 17:55:52 s8-system login: ROOT LOGIN /dev/console
Last login: Wed Sep 5 13:11:37 on console
Sun Microsystems Inc. SunOS 5.8 Generic Patch February 2004
s8-system # uname -a
SunOS s8-system 5.8 Generic_Virtual sun4v sparc SUNW,Sun-Fire-T200
s8-system # psrinfo
0 on-line since 08/29/07 13:32:21
1 on-line since 08/29/07 13:32:23
We could have also performed a sys-unconfig(1m) on the Solaris 8 image during
the container installation (by passing -u to the installer). In that case, we
would have been asked to answer the usual system identity questions. This zone
can be cloned, moved around, renamed, attached/detached and manipulated like
any other. You can even install it atop a ZFS filesystem, and from the global zone, use DTrace against the applications running inside of it.
Most importantly, you can run real workloads. Building on the Solaris Application Binary Compatibility Guarantee, we have done the difficult
work to make sure that your applications will work successfully inside of these
containers. This includes software such as databases, application servers, Java
programs, web servers, and more. We've also utilized the amazing array of test suites we have available in-house. You can even do software development inside of Solaris 8 Containers, building binaries which will run on any Solaris 8 (and 9, and 10) systems.
You can also patch these containers
using the same tools you use to patch Solaris 8 (and using the same patches).
We've even pulled down hundreds of Blastwave
packages to test gnome, KDE, and lots of other applications available there. You can run your favorite ancient desktop environment: Solaris 8
was the last version of Solaris to include OpenWindows. So here's the obligatory
screenshot from the wayback machine: Netscape 4.x, Java 1.3 and some other miscellaneous stuff all running atop the OpenWindows environment. Running on emulated Solaris 8, on Solaris 10, on a T2000. A weird blast from the past mixed up with the present day. (It's interesting to think that today's whizzy desktop applications will in a few years look just as antiquated as OpenWindows and Netscape 4.x do today). Click the image to zoom in.
That's all I have time for tonight.
If you're interested in hearing more about this technology, talk to your local Sun Representative. Or if that fails for any reason, send me an email (my-firstname dot my-lastname @sun.com will do the trick) and I'll try to hook you up with someone helpful (please put "Etude" in the subject line).