On September 14th 2011 the OpenIndiana Project announced the next development release of OpenIndiana (Build 151a). That’s a good reason to upgrade your system and it’s Zones.

The common way to upgrade your OpenIndiana System is to run the following command.

root@test:~# pkg image-update
                Packages to remove:     2
               Packages to install:    13
                Packages to update:   115
           Create boot environment:   Yes
...

This will result in a new snapshot on your disk and a new entry in the boot menu.

If you try to perform an Upgrade of a Zone this way, it will fail with the message:

pkg: Unable to clone the current boot environment.

Therefor the upgrade process has to be triggered from the global zone. Let’s say you want to upgrade the Zone “test” with the ZFS dataset under “/zones/test“. The Zone currently runs OpenIndiana Build 148 as we can see after the login:

root@global:~# zlogin test
[Connected to zone 'test' pts/2]
Last login: Wed Oct  4 22:32:48 on pts/2
OpenIndiana     SunOS 5.11      oi_148  November 2010

To perform the upgrade, we should halt the zone first.

root@global:~# zoneadm -z test halt
root@global:~# pkg -R /zones/test/root image-update -v
                Packages to remove:     2
               Packages to install:     13
                Packages to update:     115
           Create boot environment:     No
               Services to restart:     2
              Rebuild boot archive:     No
Changed fmris:
pkg://openindiana.org/runtime/perl-584@5.8.4,5.11-0.148:20101122T085618Z -> None
pkg://openindiana.org/runtime/perl-584/extra@5.8.4,5.11-0.148:20101122T085622Z -> None
...

If everything work fine, you should see this message:

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                              130/130 15260/15260  106.7/106.7

PHASE                                        ACTIONS
Removal Phase                              4253/4253
Install Phase                            16931/16931
Update Phase                               5112/5112

PHASE                                          ITEMS
Package State Update Phase                   245/245
Package Cache Update Phase                   117/117
Image State Update Phase                         2/2

---------------------------------------------------------------------------
NOTE: Please review release notes posted at:

http://wiki.openindiana.org/oi/oi_151a+Release+Notes

---------------------------------------------------------------------------

root@global:~#

Now it’s time to restart your zone and check it’s status.

root@global:~# zoneadm -z test boot
root@global:~# zlogin test
[Connected to zone 'test' pts/2]
Last login: Wed Oct  4 23:10:48 on pts/2
OpenIndiana (powered by illumos)    SunOS 5.11    oi_151a    September 2011
root@test:~#

As you can see, the Zone now runs OpenIndiana Build 151a…

And if you have multiple zones running, you can use something like this:

root@global:~# for i in `seq 220 235`; do zoneadm -z test$i halt; pkg -R /zones/test/test$i/root image-update; zoneadm -z test$i boot; done


Related Posts



Eine Antwort schreiben