Solaris-Zones: Linux IT Marbles Get a New Bag
Listing 5. Log In to a Zone
# Connect to zone's console g-zone# zlogin -C -e '#' red-zone # Login without a console (must always be root) g-zone# zlogin red-zone ... r-zone# zonename red-zone
We now have a zone defined, installed and running. The examples presented here illustrate some of the administrative tasks associated with zones: reboot, shutdown, halt and deletion of an lx branded zone. Pay close attention to the shell prompts to identify the zone in which each command is run.
Listing 6. Zone Administration
# By default a zone will *not* auto boot when the system boots g-zone# zonecfg -z red-zone set autoboot=true # Reboot/stop a zone gracefully g-zone# zlogin -C -e '#' red-zone # Login, then use a normal Linux command (examples) r-zone# reboot r-zone# shutdown -r now r-zone# telinit 6 r-zone# telinit 0 (once halted boot it from global zone) # Bring down a zone hard (stop all execution now!) g-zone# zoneadm -z red-zone halt # Same as halt and boot (hard stop then boot) g-zone# zoneadm -z red-zone reboot # Uninstall the OS from a zone (still defined) g-zone# zoneadm -z red-zone halt g-zone# zoneadm -z red-zone uninstall [ -F ] # Clone an installed zone's OS into another defined zone # (when the source is on ZFS the clone takes seconds to # install the new zone, otherwise may take many minutes!) g-zone# zonecfg -z red-eye create -t red-zone g-zone# zonecfg -z red-eye set zonepath=/zpool01/zones/red-eye g-zone# zonecfg -z red-eye zonecfg:red-eye> select net address=192.168.1.10 zonecfg:red-eye:net> set address=192.168.1.11 zonecfg:red-eye:net> end zonecfg:red-eye> exit g-zone# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared - red-zone installed /zpool01/zones/red-zone lx shared - red-eye configured /zpool01/zones/red-eye lx shared g-zone# zoneadm -z red-eye clone red-zone Cloning zonepath /zpool01/zones/red-zone... g-zone# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared - red-zone installed /zpool01/zones/red-zone lx shared - red-eye installed /zpool01/zones/red-eye lx shared # Remove a zone (No undo) g-zone# zoneadm -z red-eye halt g-zone# zoneadm -z red-eye uninstall -F g-zone# zonecfg -z red-eye delete -F
The zone creation steps are straightforward and simple. The process may take only a few steps, but they are manual and error-prone. The zonetool.pl utility (see Resources) automates the zone creation process and includes detailed POD documentation. Run zonetool.pl without arguments or with the --help option to display usage details. Listing 7 shows an example of using zonetool.pl.
Listing 7. Zone Definition Using zonetool.pl
$ sudo zonetool.pl \
[ --debug ] \
--create \
--zonename green-zone \
--brand SUNWlx[,server ] \
--zonepath /zpool01/zones \
[ --autoboot ( true | false ) ] \
[ --clone red-zone | --media /path/to/ISOs ] \
--network 'e1000g0=192.168.1.10'
With relatively small amounts of disk and memory resources, a single physical server can host hundreds of zones. Each zone is usable by any number of users, and a single-user zone provides extreme flexibility. A single user can create more than one zone to test both server and client environments, and the applications will believe they are on unique physical hosts. A zone user may have use of the zone's unique root password or unfettered sudo access within that zone without concern for security and stability of the global zone and other non-global zones.
The lx branded zone does have its limitations. Much of the zone's power comes from securely shared resources with the global zone. The zone shares a kernel with the global zone and, therefore, places limits on kernel modules and drivers. Because zones are not full VMs, the Linux distributions that can be installed in an lx branded zone are limited. Support for other Linux releases is possible, and further interest in this technology will inspire continued development and support for additional Linux distributions. Review the Resources section of this article for more information on this and related topics.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Speed Up Your Web Site with Varnish | Jun 19, 2013 |
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
- Speed Up Your Web Site with Varnish
- Containers—Not Virtual Machines—Are the Future Cloud
- Linux Systems Administrator
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- RSS Feeds
- Senior Perl Developer
- Technical Support Rep
- Non-Linux FOSS: libnotify, OS X Style
- UX Designer
- Web & UI Developer (JavaScript & j Query)






8 min 47 sec ago
13 min 19 sec ago
2 hours 59 min ago
3 hours 16 min ago
4 hours 32 min ago
5 hours 21 min ago
5 hours 24 min ago
5 hours 33 min ago
6 hours 2 min ago
8 hours 28 min ago