Bienvenidos

Todos estos pasos descriptos fueron probados en ambientes productivos

martes, 11 de octubre de 2011

Container con solaris 8

La idea era traer de un equipo viejo, con hardware obsoleto a otro que al menos tenga soporte. Para eso utilize un v210 con solaris 10 y me traje con ufsdump el backup del sistema operativo del solaris 8.
Aca esta el paso a paso de la creacion del container :

Pasos previos a la instalacion de la zona
En el equipo viejo , realizo un backup del solaris 8
 ufsdump 0uf /backup/BARRA.DMP /
luego me traigo el BARRA.DMP al v210 nuevo.
en el V210, genero el fs donde residira la zona con el solaris 8
newfs /dev/rdsk/c2t1d0s0 /ZONAS
mkdir /ZONAS
chmod 700 /ZONAS

En viejos releases de solaris 10, hay que bajar un package  s8containers-bundle-solaris10-sparc.tar.gz


gzip -d s8containers-bundle-solaris10-sparc.tar.gz
tar xvf s8containers-bundle-solaris10-sparc.tar
cd s8containers-bundle/1.0.1/Product
[skol] /usr/scripts/s8containers-bundle/1.0.1/Product # pkgadd -d .

The following packages are available:
  1  SUNWs8brandk     Solaris 8 Containers: solaris8 brand support RTU
                      (sparc) 11.10.0,REV=2008.09.20.18.50

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

Processing package instance from
## Installing package in global zone

Solaris 8 Containers: solaris8 brand support RTU(sparc) 11.10.0,REV=2008.09.20.18.50
Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Using as the package base directory.
## Processing package information.
## Processing system information.
   8 package pathnames are already properly installed.
## Verifying package dependencies.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.

The following files are already installed on the system and are being
used by another package:
  /usr/share/man/man5/solaris8.5

Do you want to install these conflicting files [y,n,?,q] y
## Checking for setuid/setgid programs.

Installing Solaris 8 Containers: solaris8 brand support RTU as

## Installing part 1 of 1.
/usr/lib/brand/solaris8/files/patches/109147-44.zip
/usr/lib/brand/solaris8/files/patches/109221-01.zip
/usr/lib/brand/solaris8/files/patches/111023-03.zip
/usr/lib/brand/solaris8/files/patches/111431-01.zip
/usr/lib/brand/solaris8/files/patches/112050-04.zip
/usr/lib/brand/solaris8/files/patches/112605-04.zip
/usr/lib/brand/solaris8/files/patches/order
/usr/share/man/man5/solaris8.5
[ verifying class ]

Installation of was successful


y Aca viene la instalacion

[skol] /ZONAS # zonecfg -z SOLARIS8
SOLARIS8: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:SOLARIS8> create -t SUNWsolaris8
zonecfg:SOLARIS8> set zonepath=/ZONAS/SOLARIS8
zonecfg:SOLARIS8> set autoboot=true
zonecfg:SOLARIS8> add net
zonecfg:SOLARIS8:net> set address=10.71.100.98
zonecfg:SOLARIS8:net> set physical=bge0
zonecfg:SOLARIS8:net> end
zonecfg:SOLARIS8> exit
[skol] /ZONAS # zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   - SOLARIS8         configured /ZONAS/SOLARIS8                solaris8 shared
[skol] /ZONAS #
[skol] /ZONAS # zonecfg -z SOLARIS8
zonecfg:SOLARIS8> info
zonename: SOLARIS8
zonepath: /ZONAS/SOLARIS8
brand: solaris8
autoboot: true
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: shared
net:
        address: 10.71.100.98
        physical: bge0
        defrouter not specified
zonecfg:SOLARIS8>exit


[skol] /ZONAS # zoneadm -z SOLARIS8 install -p -v -a /ZONAS/BARRA.DMP
      Log File: /var/tmp/SOLARIS8.install.17125.log
       Product: Solaris 8 Containers 1.0
     Installer: solaris8 brand installer 1.3
          Zone: SOLARIS8
          Path: /ZONAS/SOLARIS8
        Source: /ZONAS/BARRA.DMP
    Media Type: ufsdump archive
    Installing: This may take several minutes...
  Sanity Check: Passed.  Looks like a Solaris 8 system.
Postprocessing: This may take several minutes...
   Postprocess: Gathering information about zone SOLARIS8
   Postprocess: Creating mount points
   Postprocess: Processing /etc/system
   Postprocess: Booting zone to single user mode
   Postprocess: Applying p2v module S20_apply_patches
        S20_apply_patches:  Unpacking patch:  109147-44
        S20_apply_patches: Installing patch:  109147-44
        S20_apply_patches:  Unpacking patch:  111023-03
        S20_apply_patches: Installing patch:  111023-03
        S20_apply_patches:  Unpacking patch:  111431-01
        S20_apply_patches: Installing patch:  111431-01
        S20_apply_patches:  Unpacking patch:  112605-04
        S20_apply_patches: Installing patch:  112605-04
        S20_apply_patches:  Unpacking patch:  112050-04
        S20_apply_patches: Installing patch:  112050-04
        S20_apply_patches:  Unpacking patch:  109221-01
        S20_apply_patches: Installing patch:  109221-01
   Postprocess: Applying p2v module S31_fix_net
   Postprocess: Applying p2v module S32_fix_nfs
   Postprocess: Applying p2v module S33_fix_vfstab
   Postprocess: Applying p2v module S34_fix_inittab
   Postprocess: Applying p2v module S35_fix_crontab
   Postprocess: Applying p2v module S36_fix_pam_conf
   Postprocess: Applying p2v module S40_setup_preload
   Postprocess: Halting zone
   Postprocess: Postprocessing successful.
        Result: Postprocessing complete.
   Service Tag: Gathering information about zone SOLARIS8
   Service Tag: Adding service tag: urn:st:02760bc1-0f12-4af8-f7be-82b17da0378d
   Service Tag: Operation successful.

        Result: Installation completed successfully.
      Log File: /ZONAS/SOLARIS8/root/var/log/SOLARIS8.install.17125.log
[skol] /ZONAS #                                                              

[skol] /ZONAS # zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   - SOLARIS8         installed  /ZONAS/SOLARIS8                solaris8 shared
[skol] /ZONAS #              


[skol] /ZONAS # zoneadm -z SOLARIS8 ready
[skol] /ZONAS # zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   4 SOLARIS8         ready      /ZONAS/SOLARIS8                solaris8 shared
[skol] /ZONAS # zoneadm -z SOLARIS8 boot

En Medio de esto, entre a /ZONAS/SOLARIS8/root/etc/shadow y modifique para que root  no pida password
[skol] /ZONAS/SOLARIS8/root/etc # zlogin SOLARIS8
[Connected to zone 'SOLARIS8' pts/2]
Last login: Wed Sep 16 16:28:06 from 10.71.100.100
Sun Microsystems Inc.   SunOS 5.8       Generic Patch   February 2004
You have new mail.
[angra] / # df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/                    30982173 9643911 21028441    32%    /
/.SUNWnative/lib     18354602 4276990 13894066    24%    /.SUNWnative/lib
/.SUNWnative/platform
                     18354602 4276990 13894066    24%    /.SUNWnative/platform
/.SUNWnative/usr     18354602 4276990 13894066    24%    /.SUNWnative/usr
/dev                 30982173 9643911 21028441    32%    /dev
proc                       0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
swap                 5562192      16 5562176     1%    /etc/svc/volatile
/dev/ksyms           18354602 4276990 13894066    24%    /dev/ksyms
fd                         0       0       0     0%    /dev/fd
swap                 5562240      64 5562176     1%    /tmp
[angra] / #                                                  

No hay comentarios:

Publicar un comentario