Creating and Using Oracle Solaris Kernel Zones

Exit Print View

Updated: December 2014
 
 

How to Specify Alternate Boot Environments in a Kernel Zone

  1. Become an administrator.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .

  2. Log into the zone console.
    # zlogin -C zonename

    For example, to log into the console on kzone1:

    global# zlogin -C kzone1
  3. In a separate terminal window, list the available kernel zone boot environments.
    # zoneadm -z zonename boot -- -L

    The following example shows sample output.

    global# zoneadm -z kzone2 boot -- -L
    [Connected to zone 'kzone2' console]
    1 kz-130118 (rpool/ROOT/kz-130118)
    2 kz-1 (rpool/ROOT/kz-1)
    3 solaris-5 (rpool/ROOT/solaris-5)
    4 solaris-7 (rpool/ROOT/solaris-7)
    Select environment to boot: [ 1 - 4 ]:
      
  4. Boot to a selected boot environment.
    # zoneadm -z zonename boot -- -Z boot-environment

    For example:

    global# zoneadm -z kzone1 boot -- -Z rpool/ROOT/solaris-backup-1
Example 3-1  Selecting and Booting Alternate Boot Environments on a SPARC Host

The following example shows the zone console output for alternate boot environments for the kernel zone kzone1. The kernel zone host hardware is a SPARC system.

[Connected to zone 'kzone1' console]
NOTICE: Entering OpenBoot.
NOTICE: Fetching Guest MD from HV.
NOTICE: Starting additional cpus.
NOTICE: Initializing LDC services.
NOTICE: Probing PCI devices.
NOTICE: Finished PCI probing.


SPARC T4-2, No Keyboard
Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.36.0.build_05, 2.0000 GB memory available, Serial #1845652596.
Ethernet address 0:0:0:0:0:0, Host ID: 6e026c74.



Boot device: disk0  File and args: -L
1 Oracle Solaris 11.2 SPARC
2 bootenv123
3 bootenv456
Select environment to boot: [ 1 - 3 ]: 2

To boot the selected entry, invoke:
boot [<root-device>] -Z rpool/ROOT/bootenv123

Program terminated
ok boot -Z rpool/ROOT/bootenv123

[NOTICE: Zone rebooting]
NOTICE: Entering OpenBoot.
NOTICE: Fetching Guest MD from HV.
NOTICE: Starting additional cpus.
NOTICE: Initializing LDC services.
NOTICE: Probing PCI devices.
NOTICE: Finished PCI probing.


SPARC T4-2, No Keyboard
Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.36.0.build_05, 2.0000 GB memory available, Serial #1845652596.
Ethernet address 0:0:0:0:0:0, Host ID: 6e026c74.

...
Hostname: kzone1
kzone1 console login: 
Example 3-2  Selecting and Booting Alternate Boot Environments on an x86 Host

The following example shows the zone console output for alternate boot environments for the kernel zone kzone1. The kernel zone host hardware is an x86 system.

[Connected to zone 'kzone1' console]
1 boot-2 (rpool/ROOT/boot-2)
2 Oracle Solaris 11.2 x86 (rpool/ROOT/solaris)
3 boot-1 (rpool/ROOT/boot-1)
Select environment to boot: [ 1 - 3 ]:2
Boot device: disk0  File and args:
reading module /platform/i86pc/amd64/boot_archive...done.
reading kernel file /platform/i86pc/kernel/amd64/unix...done.
SunOS global 5.11 11.2 i86pc i386 i86pc
Copyright (c) 1983, 2014, Oracle and/or its affiliates. All rights reserved.
Hostname: kzone1
...
kzone1 console login: