Вы находитесь на странице: 1из 6

What is a Branded Zones ?

Branded zones(BrandZ) provides the framework to create non-global zones that contain non-native operating environments. This allows individual zones to emulate an OS environment other than the native one of the global OS. The brand for a zone is set at the time the zone is created, and is implemented with interposition points within the OS kernel that can be used to change the behavior of syscalls, process loading, thread creation, and other elements. Three brands that have been implemented are Solaris Containers for Linux Applications, Solaris 8 Containers, and Solaris 9 Containers. Supported Brands based on architecture Solaris on Sparc

Solaris 8 full root only Solaris 9 full root only Solaris 10 sparse or full root Solaris 11/OpenSolaris sparse or full root

Solaris on Intel/AMD x86/x64 processors


Solaris 10 sparse or full root Solaris 11/OpenSolaris sparse or full root Linux full root only
o o o

Recent Intel/AMD chipsets CentOS 3.5 to 3.8 or Red Hat Enterprise Linux 3.5 to 3.8 32-bit applications

We will see the procedure to install only Solaris 8 and Solaris 9 branded zones in this article. Download and Install Container Packages

Download Solaris 8 or Solaris 9 branded container package from here

Solaris 8 Containers: s8containers-1_0-06-solaris10-sparc.tar.gz Solaris 9 Containers: s9containers-1_0-rr-solaris10-sparc.tar.gz

Untar and install the container packages

Solaris 8 #gunzip s8containers-1_0-06-solaris10-sparc.tar.gz #tar xvf s8containers-1_0-06-solaris10-sparc.tar #pkgadd -d ./s8containers-1_0-06/Product SUNWs8brandr #pkgadd -d ./s8containers-1_0-06/Product SUNWs8brandu #pkgadd -d ./s8containers-1_0-06/Product SUNWs8p2v

Solaris 9

#gunzip s9containers-1_0-rr-solaris10-sparc.tar.gz #tar xvf s9containers-1_0-rr-solaris10-sparc.tar #pkgadd -d ./s9containers-1_0-rr/Product SUNWs9brandk #pkgadd -d ./s9containers-1_0-rr/Product SUNWs9brandr #pkgadd -d ./s9containers-1_0-rr/Product SUNWs9brandu Download and Install Container Patches Solaris 8 you can download Solaris 8 patch from here and install it using patchadd Solaris 9 you can download Solaris 9 patch from here and install it using patchadd Create/download flar image You can create flar image from an existing Solaris 8 or 9 server using flarcreate command or

Download example solaris 8 or 9 flar images from here (you should have been downloaded this in Install package step already ) Create branded zones # mkdir -p /zones/zjdeapp1-sol9 #chmod 700 /zones/zjdeapp1-sol9 # zonecfg -z zjdeapp1-sol9 zjdeapp1-sol9 : No such zone configured Use 'create' to begin configuring a new zone. zonecfg:zjdeapp1-sol9 > create -t SUNWsolaris9 branded zone or zonecfg:zjdeapp1-sol9 > create -t SUNWsolaris8 branded zone zonecfg:zjdeapp1-sol9 zonecfg:zjdeapp1-sol9 zonecfg:zjdeapp1-sol9 zonecfg:zjdeapp1-sol9 zonecfg:zjdeapp1-sol9 zonecfg:zjdeapp1-sol9 zonecfg:zjdeapp1-sol9 # to create solaris8

# to create solaris9

> set zonepath=/zones/zjdeapp1-sol9 > set autoboot=true > add net :net> set address=[provide ip here] :net> set physical=[provide interface name here] :net> end > commit

zonecfg:zjdeapp1-sol9 > exit Install Branded Zones Install the branded zones using zoneadm command by passing solaris 8 or 9 flar image location # zoneadm -z zjdeapp1-sol9 install -u -a /export/solaris9-image.flar Log File: /var/tmp/zjdeapp1-sol9 .install.log Source: Installing: This may take several minutes... Postprocessing: This may take several minutes...

Result: Installation completed successfully. Log File: /zones/zjdeapp1-sol9 /root/var/log/zjdeapp1-sol9 .install.log # zoneadm list -iv ID NAME STATUS PATH BRAND IP 0 global running / native shared - zjdeapp1-sol9 installed /zones/zjdeapp1-sol9 solaris9 shared # Zone Booting Bootup the zone using zoneadm boot command and do the initial system configuration

#zoneadm -z zjdeapp1-sol9 boot

# zlogin -C zjdeapp1-sol9 Select a Language 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. English French German Italian Japanese Korean Simplified Chinese Spanish Swedish Traditional Chinese

Please make a choice (0 - 9), or press h or ? for help: 0 ... User "~." key press to come out of the zone console

Install VCS in the branded zone: Extract and install only the following VCS 5.0 MP3 packages: VRTSperl VRTSat VRTSvcs VRTSvcsag Extract and install only the following VCS 5.0 MP3 patches: For Solaris 8: VRTSat (123722-01) VRTSvcs and VRTSvcsag (123207-03) For Solaris 9: VRTSat (123722-01) VRTSvcs and VRTSvcsag (123208-03) You can ignore the package dependency check for the VRTSvcs package. Ignore the message that the VRTSgab package is not installed. See the Veritas Cluster Server Installation Guide for instructions to manually install these packages and patches. Edit the VCS startup script (/etc/init.d/vcs) to add the following in the beginning of the file: exit 0

mkfs -F vxfs /dev/vx/rdsk/dg_jdeapp1-sol8/vol_jdeapp1-sol8_zone mount -F vxfs /dev/vx/dsk/dg_jdeapp1-sol8/vol_jdeapp1-sol8_zone /zone/zjdeapp1-sol8/ mkfs -F vxfs /dev/vx/rdsk/dg_jdeapp1-sol9/vol_jdeapp1-sol9_zone mount -F vxfs /dev/vx/dsk/dg_jdeapp1-sol9/vol_jdeapp1-sol9_zone /zone/zjdeapp1-sol9/

umount /zone/zjdeapp1-sol8

272 273 274 275 276 277 278 279 280

umount /zone/zjdeapp1-sol9 vxvol -g dg_jdeapp1-sol8 stopall vxvol -g dg_jdeapp1-sol9 stopall vxdg deport dg_jdeapp1-sol8 vxdg deport dg_jdeapp1-sol9 vxdg -Cft import dg_jdeapp1-sol8 vxdg -Cft import dg_jdeapp1-sol9 vxvol -g dg_jdeapp1-sol8 startall vxvol -g dg_jdeapp1-sol9 startall

281 mount -F vxfs /dev/vx/dsk/dg_jdeapp1-sol8/vol_jdeapp1-sol8_zone /zone/zjdeapp1-sol8 282 mount -F vxfs /dev/vx/dsk/dg_jdeapp1-sol9/vol_jdeapp1-sol9_zone /zone/zjdeapp1-sol9 283 284 285 286 zoneadm -z zjdeapp1-sol8 attach -u zoneadm -z zjdeapp1-sol8 attach -F zoneadm -z zjdeapp1-sol9 attach -u zoneadm -z zjdeapp1-sol9 attach -F

Вам также может понравиться