轉換 Oracle® Solaris 10 至 Oracle Solaris 11.2

結束列印檢視

更新日期: 2014 年 12 月
 
 

轉換 Oracle Solaris 10 實例至 Oracle Solaris 11 系統上的非全域區域

若要轉換 Oracle Solaris 10 環境至 Oracle Solaris 11 系統上的非全域區域,您可以建立區域歸檔,然後將此區域歸檔遷移至 Oracle Solaris 11 系統。

步驟如下:

  1. 在 Oracle Solaris 11 系統上安裝 Oracle Solaris 10 區域套裝軟體。

    s11sysB# pkg install system/zones/brand/brand-solaris10
  2. 執行 zonep2vchk 程序檔,識別可能讓實例無法以 solaris10 區域執行的所有問題。

    s10sys# ./zonep2vchk
    --Executing Version: 1.0.5-11-15652
    
    - Source System: systema
    Solaris Version: Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC
    Solaris Kernel:  5.10 Generic_147440-01
    Platform:        sun4u SUNW,Sun-Fire-V440
    
    - Target System:
    Solaris_Version: Solaris 10
    Zone Brand:      native (default)
    IP type:         shared
    
    --Executing basic checks
    .
    .
  3. 建立一個將容納 Oracle Solaris 10 系統實例之 Flash 歸檔的 ZFS 檔案系統 (若有需要)。

    接著,在 Oracle Solaris 11 系統上建立 ZFS 檔案系統的 NFS 共用。

    s11sysB# zfs create pond/s10archive
    s11sysB# zfs set share.nfs.sec.default.root=s10sysA=on pond/s10archive
  4. 選取一個 Oracle Solaris 10 實例 (可以是 Oracle Solaris 10 系統上的虛擬環境或全域區域)。請將 Oracle Solaris 10 系統的 hostid 記下來。

    s10sysA# hostid
    8439b629
  5. 替計畫要遷移至 Oracle Solaris 11 系統上之非全域區域的 Oracle Solaris 10 實例建立一個歸檔。

    s10sysA# flarcreate -S -n s10sysA -L cpio /net/s11sysB/pond/s10archive/s10.flar
  6. 替 Oracle Solaris 10 區域建立一個 ZFS 檔案系統。

    s11sysB# zfs create -o mountpoint=/zones pond/zones
    s11sysB# chmod 700 /zones
  7. 替 Oracle Solaris 10 實例建立非全域區域。

    s11sysB# zonecfg -z s10zone
    s10zone: No such zone configured
    Use 'create' to begin configuring a new zone.
    zonecfg:s10zone> create -t SYSsolaris10
    zonecfg:s10zone> set zonepath=/zones/s10zone
    zonecfg:s10zone> set ip-type=exclusive
    zonecfg:s10zone> add anet
    zonecfg:s10zone:net> set lower-link=auto
    zonecfg:s10zone:net> end
    zonecfg:s10zone> set hostid=8439b629
    zonecfg:s10zone> verify
    zonecfg:s10zone> commit
    zonecfg:s10zone> exit
  8. 安裝 Oracle Solaris 10 非全域區域。

    s11sysB# zoneadm -z s10zone install -u -a /pond/s10archive/s10.flar
    A ZFS file system has been created for this zone.
    Progress being logged to /var/log/zones/zoneadm.20110921T135935Z.s10zone.install
    Installing: This may take several minutes...
    Postprocess: Updating the image to run within a zone
    Postprocess: Migrating data
    from: pond/zones/s10zone/rpool/ROOT/zbe-0
    to: pond/zones/s10zone/rpool/export
    .
    .
    .
  9. 啟動 Oracle Solaris 10 區域。

    # zoneadm -z s10zone boot
  10. 配置 Oracle Solaris 10 非全域區域。

    s11sysB# zlogin -C s10zone
    [Connected to zone 's10zone' console]
    .
    .
    .
    s10zone console login: root
    Password: xxxxxxxx
    # cat /etc/release
    Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC
    Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
    Assembled 23 August 2011
    # uname -a
    SunOS supernova 5.10 Generic_Virtual sun4v sparc SUNW,Sun-Fire-T1000
    # zfs list
    NAME                USED  AVAIL  REFER  MOUNTPOINT
    rpool              4.53G  52.2G   106K  /rpool
    rpool/ROOT         4.53G  52.2G    31K  legacy
    rpool/ROOT/zbe-0   4.53G  52.2G  4.53G  /
    rpool/export         63K  52.2G    32K  /export
    rpool/export/home    31K  52.2G    31K  /export/home