Home > OpenIndiana / Illumos > Updating an OpenIndiana Zone

Updating an OpenIndiana Zone

So you have updated your main system to the latest bleeding edge build but your zone is still running an old version and you want all the updates and fixes from the latest version. Its a simple few steps and we are able to update our zone and keep both the sytem and zone on the same version.

DISCLAIMER: I take no responsibilty for any data loss during this process, it is assumed that you make regular backups of all data in case of data loss.

Firstly we need to ensure that the zone is not running, this can be checked with the below terminal commands:

zoneadm list

This will list all of the currently running zones, if it is not running we can issue the below command to see all of the zones installed on this system:

zoneadm list -i

Now that we know the zone name we must ensure it is not running, to stop the zone do the below, if your zone is currently not running please sip this command. Replace <zonename> with the name of the zone show from the above commands:

zoneadm -z <zonename> halt

This will stop our zone and allow us to make changes to it. Now we need to find the location of the zone on the system, this is done with the below:

zfs list

Look for the mountpoint which should be something like the below:

/zones/<zonename>

Yours will most likely differ depending on the location of the zone. Now we need to issue the below to commence the update of the zone:

pkg -R /zones/<zonename>/root image-update -v

You will see something similar to the below when the update is completed:

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                              139/139 15502/15502  144.5/144.5

PHASE                                        ACTIONS
Removal Phase                              4238/4238
Install Phase                            14695/14695
Update Phase                               7913/7913

PHASE                                          ITEMS
Package State Update Phase                   264/264
Package Cache Update Phase                   127/127
Image State Update Phase                         2/2

PHASE                                          ITEMS
Reading Existing Index                           8/8
Indexing Packages                            139/139
Indexing Packages                            139/139
Optimizing Index…

PHASE                                          ITEMS
Indexing Packages                            137/137

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

http://docs.sun.com/doc/821-1479
—————————————————————————

Now finally we can boot the zone and log into the zone:

zoneadm -z <zonename> boot
zlogin -C <zonename>

When logged in to the zone issue the below command:

uname -a

You should see something similar to the below to confirm the upgrade of the zone:

SunOS <zonename> 5.11 oi_151a i86pc i386 i86pc

Hope this helps to make things nice and easy.

Advertisements
  1. No comments yet.
  1. September 16, 2011 at 1:56 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: