Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

System Administration Guide: Virtualization Using the Solaris Operating System
Previous Next

Logging In to a 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.

How to Log In to the 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, my-zone.
    global# zlogin -C my-zone

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

    SunOS Release 5.10 Version Generic 64-bit
    Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved.
    Use is subject to license terms.
    starting rpc services: rpcbind done.
    syslog service starting.
    The system is ready.

  3. When the zone console displays, log in as root, press Return, and type the root password when prompted.
    my-zone console login: root
    Password:

How to Use Interactive Mode to Access a 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, my-zone.
    global# zlogin my-zone

    Information similar to the following will display:

    [Connected to zone 'my-zone' pts/2]
    Last login: Wed Jul  3 16:25:00 on console
    Sun Microsystems Inc. SunOS 5.10 Generic July 2004
  3. Type exit to close the connection.

    You will see a message similar to the following:

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

How to Use Non-Interactive Mode to Access a Zone

Non-interactive mode is enabled when the user supplies a command to be run inside the zone. Non-interactive mode does not allocate a new pseudo-terminal.

Note that the command or any files that the command acts upon cannot reside on NFS.

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 my-zone zone and supply a command name.

    The command zonename is used here.

    global# zlogin my-zone zonename

    You will see the following output:

    my-zone

How to Exit a Non-Global Zone

  • To disconnect from a non-global zone, use the tilde (~) character and a period:
    zonename# ~.

    Your screen will look similar to this:

    [Connection to zone 'my-zone' pts/6 closed]
    • You can also type exit to exit the zone.
See Also

For more information about zlogin command options, see the zlogin(1) man page.

How to Use Failsafe Mode to Enter a Zone

When a connection to the zone is denied, the zlogin command can be used with the -S option to enter a minimal environment in 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, use the zlogin command with the -S option to access the zone, for example, my-zone.
    global# zlogin -S my-zone

How to Use zlogin to Shut Down a Zone


Note - Running init 0 in the global zone to cleanly shut down a Solaris system also runs init 0 in each of the non-global zones on the system. Note that init 0 does not warn local and remote users to log off before the system is taken down.


Use this procedure to cleanly shut down a zone. To halt a zone without running shutdown scripts, see How to Halt a 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. Log in to the zone to be shut down, for example, my-zone, and specify shutdown as the name of the utility and init 0 as the state.
    global# zlogin my-zone shutdown -i 0

    Your site might have its own shutdown script, tailored for your specific environment.


    Note - You cannot use the shutdown command to place the zone in single-user state at this time. See 6214427 for more information.


More Information
Using shutdown in Non-Interactive Mode

You cannot use the shutdown command in non-interactive mode to place the zone in single-user state at this time. See 6214427 for more information.

You can use an interactive login as described in How to Use Interactive Mode to Access a Zone.

Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire