Skip Navigation Links | |
Exit Print View | |
System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones Oracle Solaris Legacy Containers |
1. Introduction to Solaris 10 Resource Management
2. Projects and Tasks (Overview)
3. Administering Projects and Tasks
4. Extended Accounting (Overview)
5. Administering Extended Accounting (Tasks)
6. Resource Controls (Overview)
7. Administering Resource Controls (Tasks)
8. Fair Share Scheduler (Overview)
9. Administering the Fair Share Scheduler (Tasks)
10. Physical Memory Control Using the Resource Capping Daemon (Overview)
11. Administering the Resource Capping Daemon (Tasks)
13. Creating and Administering Resource Pools (Tasks)
14. Resource Management Configuration Example
15. Resource Control Functionality in the Solaris Management Console
16. Introduction to Solaris Zones
17. Non-Global Zone Configuration (Overview)
18. Planning and Configuring Non-Global Zones (Tasks)
19. About Installing, Halting, Cloning, and Uninstalling Non-Global Zones (Overview)
20. Installing, Booting, Halting, Uninstalling, and Cloning Non-Global Zones (Tasks)
21. Non-Global Zone Login (Overview)
22. Logging In to Non-Global Zones (Tasks)
23. Moving and Migrating Non-Global Zones (Tasks)
24. Oracle Solaris 10 9/10: Migrating a Physical Oracle Solaris System Into a Zone (Tasks)
25. About Packages and Patches on an Oracle Solaris System With Zones Installed (Overview)
27. Oracle Solaris Zones Administration (Overview)
28. Oracle Solaris Zones Administration (Tasks)
29. Upgrading an Oracle Solaris 10 System That Has Installed Non-Global Zones
30. Troubleshooting Miscellaneous Oracle Solaris Zones Problems
31. About Branded Zones and the Linux Branded Zone
32. Planning the lx Branded Zone Configuration (Overview)
33. Configuring the lx Branded Zone (Tasks)
34. About Installing, Booting, Halting, Cloning, and Uninstalling lx Branded Zones (Overview)
35. Installing, Booting, Halting, Uninstalling and Cloning lx Branded Zones (Tasks)
lx Branded Zone Installation (Task Map)
Installing and Booting lx Branded Zones
How to Obtain the Linux Archives
How to Install an lx Branded Zone
How to Install a Subset of the Packages
How to Enable Networking in an lx Branded Zone
How to Obtain the UUID of an Installed Branded Zone
How to Mark an Installed lx Branded Zone Incomplete
(Optional) Placing an Installed lxBranded Zone in the Ready State
How to Boot an lx Branded Zone
Halting, Rebooting, Uninstalling, Cloning, and Deleting lx Branded Zones (Task Map)
Halting, Rebooting, and Uninstalling lx Branded Zones
How to Halt an lx Branded Zone
How to Reboot an lx Branded Zone
How to Uninstall a Branded Zone
Cloning an lx Branded Zone on the Same System
How to Clone an lx Branded Zone
How to Clone a Zone from an Existing Snapshot
How to Use Copy Instead of ZFS Clone
Deleting an lx Branded Zone From the System
How to Remove an lx Branded Zone
36. Logging In to lx Branded Zones (Tasks)
37. Moving and Migrating lx Branded Zones (Tasks)
38. Administering and Running Applications in lx Branded Zones (Tasks)
Use the zoneadm command described in the zoneadm(1M) man page to perform installation tasks for a non-global zone.
Before you can install the lx branded zone, you must first obtain the Linux archives. The archives are distributed in the following forms:
A compressed tar archive (a tarball)
A set of CD-ROM or DVD discs
A group of ISO images
To download a tarball, go to http://hub.opensolaris.org/bin/view/Community+Group+brandz/applications. Follow the instructions on the downloads site.
To obtain a set of CD-ROM or DVD discs, go to the CentOS site at http://www.centos.org or the Red Hat site at http://www.redhat.com.
To obtain an ISO image, go to the CentOS site at http://www.centos.org or the Red Hat site at http://www.redhat.com.
This procedure is used to install a configured lx branded zone. Once the zone is installed, all software configuration and management has to be done by the zone administrator using Linux tools from inside the zone.
See Example 35-1, Example 35-2, and Example 35-3 for examples of zone installation command lines using the different distribution paths. If you install from discs or from an ISO image, you must specify Sun package cluster categories. See lx Branded Zone Installation Methods for information on package cluster categories.
Note that you can verify a zone prior to installing it. If you skip this procedure, the verification is performed automatically when you install the zone. The procedure is documented in (Optional) How to Verify a Configured Zone Before It Is Installed.
You must be the global administrator in the global zone to perform this procedure.
Note - In Step 3, if the zonepath is on ZFS, the zoneadm install command automatically creates a ZFS file system (dataset) for the zonepath when the zone is installed. You can block this action by including the -x nodataset parameter.
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.
global# svcadm enable svc:/system/filesystem/volfs:default
global# svcs | grep volfs
You will see a display similar to the following:
online 17:30 svc:/system/filesystem/volfs:default
global# zoneadm -z lx-zone install -d archive_path
The system will display:
A ZFS file system has been created for this zone.
global# zoneadm -z lx-zone install -x nodataset -d archive_path
You will see various messages as the files and directories needed for the zone's root file system, as well as the package files, are installed under the zone's root path.
Note - If you do not specify archive_path, the default is CD.
global# zoneadm -z lx-zone list -iv
If the state is listed as configured, make the corrections specified in the message and try the zoneadm install command again.
If the state is listed as incomplete, first execute this command:
global# zoneadm -z lx-zone uninstall
Then make the corrections specified in the message, and try the zoneadm install command again.
global# zoneadm list -iv
You will see a display that is similar to the following:
ID NAME STATUS PATH BRAND IP 0 global running / native shared - lx-zone installed /export/home/lx-zone lx shared
Example 35-1 Install Command Using a CentOS Compressed tar Archive
global# zoneadm -z lx-zone install -d /export/centos_fs_image.tar.bz2
Example 35-2 Install Command Using CentOS CDs
For CD or DVD installation, volfs must be enabled on your system. You must specify a software cluster package. For example, use development to install a full environment, or type the names of particular clusters. If you do not specify a cluster package, desktop is installed by default. The CD device is /cdrom/cdrom0.
global# zoneadm -z lx-zone install -d /cdrom/cdrom0 development
Example 35-3 Install Command Using CentOS ISO Images
You must specify a software cluster package. Use development to install a full environment, or specify particular clusters. If you do not specify a cluster package, desktop is installed by default. The CentOS ISO images reside in the directory /export/centos_3.7.
global# zoneadm -z lx-zone install -d /export/centos_3.7 development
See Also
For more information on datasets, see Oracle Solaris ZFS Administration Guide
Troubleshooting
If a zone installation is interrupted or fails, the zone is left in the incomplete state. Use uninstall -F to reset the zone to the configured state.
When installing from CD or ISO images, you can install a subset of the packages on the install media. The available subsets are core, server, desktop, developer, and all.
You must be the global administrator in the global zone to perform this procedure.
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.
global# zoneadm -z lx-zone install -d archive_path server
When you install an lx branded zone, networking is disabled. Use a procedure such as this one to enable networking.
You must be the zone administrator to perform this procedure.
NETWORKING=yes HOSTNAME=your.hostname
NISDOMAIN=domain.Sun.COM
For more information on configuring networking or naming services, consult the documentation for your Linux distribution.
A universally unique identifier (UUID) is assigned to a zone when it is installed. The UUID can be obtained by using zoneadm with the list subcommand and the -p option. The UUID is the fifth field of the display.
global# zoneadm list -p
You will see a display similar to the following:
0:global:running:/::native 1:centos38:running:/zones/centos38:27fabdc8-d8ce-e8aa-9921-ad1ea23ab063:lx
Example 35-4 How to Use the UUID in a Command
global# zoneadm -z lx-zone -u 61901255-35cf-40d6-d501-f37dc84eb504 list -v
If both -u uuid-match and -z zonename are present, the match is done based on the UUID first. If a zone with the specified UUID is found, that zone is used, and the -z parameter is ignored. If no zone with the specified UUID is found, then the system searches by the zone name.
Zones can be uninstalled and reinstalled under the same name with different contents. Zones can also be renamed without the contents being changed. For these reasons, the UUID is a more reliable handle than the zone name.
See Also
For more information, see zoneadm(1M) and libuuid(3LIB).
If administrative changes on the system have rendered a zone unusable or inconsistent, it is possible to change the state of an installed zone to incomplete.
You must be the global administrator in the global zone to perform this procedure.
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.
global# zoneadm -z testzone mark incomplete
global# zoneadm list -iv
You will see a display that is similar to the following:
ID NAME STATUS PATH BRAND IP 0 global running / native shared - testzone incomplete /export/home/testzone lx shared
Note - Marking a zone incomplete is irreversible. The only action that can be taken on a zone marked incomplete is to uninstall the zone and return it to the configured state. See How to Uninstall a Branded Zone.
Transitioning into the ready state prepares the virtual platform to begin running user processes. Zones in the ready state do not have any user processes executing in them.
You can skip this procedure if you want to boot the zone and use it immediately. The transition through the ready state is performed automatically when you boot the zone.
See (Optional) How to Transition the Installed Zone to the Ready State.
Booting a zone places the zone in the running state. A zone can be booted from the ready state or from the installed state. A zone in the installed state that is booted transparently transitions through the ready state to the running state. Zone login is allowed for zones in the running state.
You must be the global administrator in the global zone to perform this procedure.
Tip - Note that you cannot boot a branded zone on a Trusted Oracle Solaris system that has labels enabled.
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.
global# zoneadm -z lx-zone boot
global# zoneadm list -v
You will see a display that is similar to the following:
ID NAME STATUS PATH BRAND IP 0 global running / native shared 1 lx-zone running /export/home/lx-zone lx shared
Example 35-5 Specifying Boot Arguments for Zones
Boot a zone using the -i altinit option:
global# zoneadm -z lx-zone boot -- -i /path/to/process
Troubleshooting
If a message indicating that the system was unable to find the netmask to be used for the IP address specified in the zone's configuration displays, see netmasksWarning Displayed When Booting Zone. Note that the message is only a warning and the command has succeeded.
You must be the global administrator in the global zone to perform this procedure.
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.
global# zoneadm -z lx-zone boot -- -s
To log in to the zone, see configuration, see Logging In to an lx Branded Zone.