sun.com docs.sun.com My Sun Worldwide Sites

Previous Previous     Contents     Index     Next Next

Chapter 34

Logging In to lx Branded Zones (Tasks)

This chapter provides the following information:

  • Introductory information about zone login

  • Completing the internal configuration of an installed lx branded zone

  • Logging into the zone from the global zone

  • Shutting down the zone

  • Using the zonename command to print the name of the current zone

zlogin Command Overview

The zlogin command is used to log in from the global zone to any zone that is in the running state or the ready state.


Note - Only the zlogin command with the -C option can be used to log in to a zone that is not in the running state.


Unless the -C option is used to connect to the zone console, logging in to a zone using zlogin starts a new task. A task cannot span two zones.

As described in How to Use Non-Interactive Mode to Access an lx Branded Zone, you can use the zlogin command in non-interactive mode by supplying a command to run inside a zone. However, the command or any files the command acts upon cannot reside on NFS. The command will fail if any of its open files or any portion of its address space resides on NFS. The address space includes the command executable itself and the command's linked libraries.

The zlogin command can only be used by the global administrator operating in the global zone. See the zlogin(1) man page for more information.

lx Branded Zone Login Methods

An overview of zone console and user login methods is provided in Non-Global Zone Login Methods.

The failsafe mode is used when a login problem occurs that prevents you from using the zlogin command or the zlogin command with the -C option to access the zone. This mode is described in Failsafe Mode

Information on remote login zone is provided in Remote Login

Interactive mode allocates a new pseudo-terminal for use inside the zone. Non-interactive mode is used to run shell-scripts which administer the zone. See Interactive and Non-Interactive Modes for more information.

Login Procedures for Branded Zones (Task Map)

Task

Description

For Instructions

Log in to the zone.

You can log into a zone through the console, by using interactive mode to allocate a pseudo-terminal, or by supplying a command to be run in the zone. Supplying a command to be run does not allocate a pseudo-terminal. You can also log in by using failsafe mode when a connection to the zone is denied.

Logging In to an lx Branded Zone 

Exit a branded zone.

Disconnect from a branded zone.

How to Exit the lx Branded Zone 

Shut down a branded zone.

Shut down a branded zone by using the shutdown utility or a script.

How to Use zlogin to Shut Down an lx Branded Zone 

Logging In to an lx Branded Zone

Use the zlogin command to log in from the global zone to any zone that is running or in the ready state. See the zlogin(1) man page for more information.

You can log in to a zone in various ways, as described in the following procedures. You can also log in remotely, as described in Remote Login.

ProcedureHow to Log In to the lx Branded Zone Console

You must be the global administrator in the global zone to perform this procedure.

  1. Become superuser, or assume the Primary Administrator role.

    To create the role and assign the role to a user, see "Using the Solaris Management Tools With RBAC (Task Map)" in System Administration Guide: Basic Administration.

  2. Use the zlogin command with the -C option and the name of the zone, for example, lx-zone.

    global# zlogin -C lx-zone
    [Connected to zone 'lx-zone' console]


    Note - If you start the zlogin session immediately after issuing the zoneadm boot command, boot messages from the zone will display:

    INIT: version 2.85 booting
    	                Welcome to CentOS
    	                Press 'I' to enter interactive startup.
    	Configuring kernel parameters:  [  OK  ]
    	Setting hostname lx-zone:  [  OK  ]
    	[...]
    	CentOS release 3.6 (Final)
    	Kernel 2.4.21 on an i686


  3. When the zone console displays, log in as root, press Return, and type the root password when prompted.

    lx-zone console login: root
    Password:


    Note - Recall that the root (superuser) password is root when the zone is installed from the Sun tarball. The root (superuser) password is unset (blank) when the zone is installed from ISO images or a CD.


ProcedureHow to Use Interactive Mode to Access a Branded Zone

In interactive mode, a new pseudo-terminal is allocated for use inside the zone.

You must be the global administrator in the global zone to perform this procedure.

  1. Become superuser, or assume the Primary Administrator role.

    To create the role and assign the role to a user, see "Using the Solaris Management Tools With RBAC (Task Map)" in System Administration Guide: Basic Administration.

  2. From the global zone, log in to the zone, for example, lx-zone.

    global# zlogin lx-zone

    Information similar to the following will display:

    [Connected to zone 'lx-zone' pts/2]
    Last login: Wed Jul  3 16:25:00 on console
    Sun Microsystems Inc. SunOS 5.10 Generic July 2006

  3. Type exit to close the connection.

    You will see a message similar to the following:

    [Connection to zone 'lx-zone' pts/2 closed]

ProcedureHow to Verify the Running Environment

You must be the global administrator in the global zone to perform this procedure.

  1. Become superuser, or assume the Primary Administrator role.

    To create the role and assign the role to a user, see "Using the Solaris Management Tools With RBAC (Task Map)" in System Administration Guide: Basic Administration.

  2. Log in to the zone, for example, lx-zone.

    global# zlogin lx-zone

  3. Verify that you are running in a Linux environment under the Solaris Operating System.

    [root@lx-zone root]# uname -a

    You will see a display similar to the following:

    Linux myzone 2.4.21 BrandZ fake linux i686 i686 i386 GNU/Linux 

Previous Previous     Contents     Index     Next Next
Company Info Contact Terms of Use Privacy Copyright 1994-2007 Sun Microsystems, Inc.