Go to main content

Lift and Shift Guide - Migrating Workloads from Oracle Solaris 10 SPARC Systems to Oracle Solaris 10 Branded Zones

Exit Print View

Updated: February 2020
 
 

Configure an Oracle Solaris 10 Branded Zone on the Target System

  1. Log into the target global zone as superuser.
  2. Identify the target's CPU resources.

    Run the psrinfo(1M) command in the global zone and identify the cores that can be assigned to the solaris10 branded zone.

    root@TargetGlobal# psrinfo -tL
    socket: 0 (lgroups: 1, 0)
      core: 0
        cpus: 0-7
      core: 1
        cpus: 8-15
      core: 2
        cpus: 16-23
      core: 3
        cpus: 24-31
      core: 4
        cpus: 32-39
      core: 5
        cpus: 40-47
      core: 6
        cpus: 48-55
      core: 7
        cpus: 56-63
    socket: 1 (lgroups: 2, 0)
      core: 8
        cpus: 64-71
      core: 9
        cpus: 72-79
      core: 10
        cpus: 80-87
      core: 11
        cpus: 88-95
      core: 12
        cpus: 96-103
      core: 13
        cpus: 104-111
      core: 14
        cpus: 112-119
      core: 15
        cpus: 120-127
    
  3. Use one of the following methods to create a configuration text file.

    When the zone is created, the configuration file supplied the zone configuration parameters.

    • Create a configuration file from scratch.

      This method works well for simple configurations. This is the method used in our example.

      Create a text file that includes one zonecfg subcommand per line. Refer to the zonecfg(1M) man page for details.

      In this example, cores 2, 3, 4 and 5 will be allocated to the solaris10 branded zone. This can be done by specifying 2-5 or 2,3,4,5 for the add dedicated-cpu subcommand.

      root@TargetGlobal# cat > /ovas/zonecfg.txt <<EOF
      
      create -b
      set brand=solaris10
      set zonepath=/zones/TargetS10bz
      set autoboot=true
      set autoshutdown=shutdown
      set ip-type=exclusive
      add net
      set physical=vnic0
      end
      add dedicated-cpu
      set cores=2-5
      end
      add capped-memory
      set physical=64G
      set swap=64G
      end
      add fs
      set dir=/u01
      set special=/dev/md/dsk/d30
      set raw=/dev/md/rdsk/d30
      set type=ufs
      add options forcedirectio
      end
      add fs
      set dir=/oradata
      set special=/dev/md/dsk/d40
      set raw=/dev/md/rdsk/d40
      set type=ufs
      add options forcedirectio
      end
      
      EOF
    • Create a configuring file using the zonep2vchk -c command.

      This method produces a configuration file that contains the resource limits and network configuration based on the source host's physical resources and networking configuration.


      Note -  Depending on the source configuration, a configuration file created by this method might result in a file with dozens of configuration parameters.
      1. On the source system, run the zonep2vchk command and redirect the output to a shared location.
        root@SourceSystem# zonep2vchk -c > /ovas/zonecfg.txt
      2. Edit the file to make the configuration appropriate for the target environment.
  4. On the target global zone, configure an exclusive-IP solaris10 branded zone.
    root@TargetGlobal# zonecfg -z TargetS10bz -f /ovas/zonecfg.txt
  5. (If needed) Configure a system ID profile for the solaris10 branded zone.

    If the system configuration (host name, IP parameters, and so on) must change on target, configure a sysidcfg profile for the solaris10 branded zone that provides the new parameters. The configuration file is used during the shift to the target system in Shift the Workloads to the Target.

    In this example, the required target network parameters are derived from information collected in Prepare the Target System.

    The encrypted root password that you specify in this file was captured in Review the Source System Configuration.

    root@TargetGlobal# vi /ovas/sysidcfg_s10brandzone_profile
    ----------
    system_locale=C
    terminal=xterm
    network_interface=vnic0 {
        hostname=TargetS10bz
        ip_address=192.0.2.120
        netmask=255.255.254.0
        default_route=192.0.2.1
        protocol_ipv6=no
    }
    security_policy=NONE
    name_service=DNS {
        domain_name=us.example.com
        name_server=198.51.100.198,198.51.100.197,198.51.100.132
        search=us.example.com,examplecorp.com,example.com
    }
    timezone=US/Pacific
    timeserver=localhost
    nfs4_domain=dynamic
    root_password=jh8xQURgtDG/w
    auto_reg=disable