Articles
Server and Storage Administration
by Orgad Kimchi
Published October 2012 (reprinted from The art of virtualization blog)
In this document I will demonstrate the migration of an Oracle Solaris 8 physical system with Oracle Database version 10.2.0.5 and an Oracle Automatic Storage Management file system located on SAN storage into an Oracle Solaris 8 branded zone inside an Oracle Solaris 10 guest domain on top of an Oracle Solaris 11 control domain.
|
In the first example, we will preserve the host information. In the second example, we will modify the host name.
The Oracle Automatic Storage Management file system is located on a LUN in SAN storage connected via a Fibre Channel HBA. During the migration, we use the same LUN on the source and target servers in order to avoid data migration.
The P2V Archiver tool successfully migrates the Oracle Solaris 8 physical system into the Oracle Solaris 8 branded zone, and the zone is able to access the Oracle Automatic Storage Management file system.
Figure 1 shows the architecture layout.

Figure 1. Architecture Layout
Source system used in these examples:
Target system used in these examples:
In this example, we will preserve the host information.
vntsd) and as a concentrator for all logical domain consoles:primary# ldm add-vcc port-range=5000-5100 primary-vcc0 primary
primary# ldm add-vds primary-vds0 primary
The following example shows the primary network interface on an Oracle Solaris 11 system. The system's primary network interface is net0, which is the generic name of the data link on igb0.
primary# dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE net0 Ethernet up 1000 full igb0 net1 Ethernet up 1000 full igb1
primary# ldm add-vsw net-dev=net0 primary-vsw0 primary
list-services subcommand, as shown in Listing 1.primary# ldm list-services primary VCC NAME LDOM PORT-RANGE primary-vcc0 primary 5000-5100 VSW NAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE INTER-VNET-LINK primary-vsw0 primary 00:14:4f:fb:44:4d net0 0 switch@0 1 1 1500 on VDS NAME LDOM VOLUME OPTIONS MPGROUP DEVICE primary-vds0 primary
Listing 1. Example
Note: Only Oracle's UltraSPARC T2, UltraSPARC T2+, and SPARC T3 platforms might have cryptographic devices.
primary# ldm list -o crypto primary
primary# ldm set-mau 1 primary
primary# ldm set-vcpu 8 primary
primary# ldm start-reconf primary
primary# ldm set-memory 4G primary
initial.primary# ldm add-config initial
primary# ldm list-config factory-default initial [next poweron]
primary# init 6
After the system reboots, Oracle VM Server for SPARC is enabled and the system is configured with one domain: the control domain, primary. From the control domain, you can create and configure additional domains.
ldmd) and the Virtual Network Terminal Server (vntsd) services are enabled.primary# svcadm enable ldmd primary# svcadm enable vntsd
After the control domain has been configured, create the guest domain, which hosts the Oracle Solaris 8 branded zone. The guest domain, ldg1, is initially created with the following resources:
vnet0) that is connected to the virtual switch, primary-vsw0vnet1) that will be used by the Oracle Solaris 8 branded zone using an exclusive IP address, which has its own IP-related state and one or more dedicated data linksc0d0 in the guest domain; the domain ldg1 uses disk c3t1d0 from the control domainNote: Disks often appear with different names on different servers.
Run the following commands to set up the guest domain.
ldg1.primary# ldm add-domain ldg1
ldg1.primary# ldm add-vcpu 24 ldg1
ldg1.primary# ldm add-memory 8G ldg1
ldg1.primary# ldm add-vnet vnet0 primary-vsw0 ldg1 primary# ldm add-vnet vnet1 primary-vsw0 ldg1
primary# ldm add-vdsdev /dev/dsk/c3t1d0s2 vol1@primary-vds0
The following example adds a virtual disk to guest domain ldg1, where:
vdisk1 is the name of the virtual disk.vol1 is the name of the existing volume to which to connect.primary-vds0 is the name of the existing virtual disk server to which to connect.primary# ldm add-vdisk vdisk1 vol1@primary-vds0 ldg1
auto-boot? and boot-device variables for the guest domain.The following commands set auto-boot? to true and boot-device to vdisk1 for guest domain ldg1.
primary# ldm set-var auto-boot\?=true ldg1 primary# ldm set-var boot-device=vdisk1 ldg1
primary# ldm bind-domain ldg1 primary# ldm start-domain ldg1
primary# ldm ls ldg1 NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME ldg1 active -n---- 5000 24 8G 0.0% 1h 1m
ldg1 domain by using the telnet command.primary# telnet localhost 5000
You can perform the installation over the network, from a DVD, or by using a DVD ISO image. Refer to the Oracle VM Server for SPARC 2.2 Administration Guide.
svcs -xv command:guest# svcs -xv
If all the services are up and running, the command should return nothing.
The Oracle Solaris Legacy Containers product bundles together Oracle Solaris 8 Containers and Oracle Solaris 9 Containers. With Oracle Solaris Legacy Containers, it's easy to move existing Oracle Solaris 8 and Oracle Solaris 9 application environments onto new, cost-effective, and more powerful systems that run the Oracle Solaris 10 OS.
Oracle Solaris Legacy Containers provides the following:
The download for Oracle Solaris Legacy Containers includes two versions of the product:
Both product versions contain identical features. The 1.0.1 product depends on Oracle Solaris packages introduced in Oracle Solaris 10 10/08. The 1.0 product provides these packages to pre-10/08 versions of Oracle Solaris.
We will use the Oracle Solaris Legacy Containers 1.0.1 since we are using Oracle Solaris 10 08/11 for this example.
To install Oracle Solaris Legacy Containers 1.0.1, do the following:
The easiest way to find the download is to go to the Software Downloads page and then scroll down and click Solaris Legacy Containers.
guest# unzip solarislegacycontainers-solaris10-sparc.zip guest# cd solarislegacycontainers/1.0.1/Product guest# pkgadd -d `pwd` SUNWs8brandk
Refer to the README file for further installation instructions, if necessary.
sol8# su - oracle
sol8$ sqlplus "/as sysdba" SQL*Plus: Release 10.2.0.5.0 - Production on Sun Aug 26 13:19:48 2012 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> shutdown immediate
sol8$ export ORACLE_SID=+ASM sol8$ sqlplus "/as sysdba" SQL*Plus: Release 10.2.0.5.0 - Production on Sun Aug 26 13:21:38 2012 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> shutdown ASM diskgroups dismounted ASM instance shutdown
Listing 2. Shutting Down the Automatic Storage Management Instance
sol8$ lsnrctl stop LSNRCTL for Solaris: Version 10.2.0.5.0 - Production on 26-AUG-2012 13:23:49 Copyright (c) 1991, 2010, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) The command completed successfully
flarcreate command to create the system archive.In the following example:
-S specifies that we skip the disk space check and do not write archive size data to the archive. The result is a significant decrease in the time it takes to create an archive.-n specifies the image name.sol8# flarcreate -S -n s8-system /export/home/s8-system.flar
See the flarcreate(1M) for more advanced archive creation examples.
c5t40d0s6) into the guest domain:primary# ldm add-vdsdev /dev/dsk/c5t40d0s6 oradata@primary-vds0 primary# ldm add-vdisk oradata oradata@primary-vds0 ldg1
The LUN appears as c0d2 in the guest domain and it is a LUN from the storage array (c5t40d0s6) added by the control domain.
Note: LUNs often appear with different names on different servers.
guest# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0d0 /virtual-devices@100/channel-devices@200/disk@0 1. c0d2 /virtual-devices@100/channel-devices@200/disk@2
vnet1):guest# dladm show-dev vnet1
zonecfg command to set up the Oracle Solaris 8 branded zone, s8-zone, on the guest domain.Listing 3 shows the output of the zonecfg -z s8-zone info command after the configuration is complete.
guest# zonecfg -z s8-zone info
zonename: s8-zone
zonepath: /zones/s8-zone
brand: solaris8
autoboot: true
bootargs:
pool:
limitpriv: default,proc_priocntl,proc_lock_memory
scheduling-class: FSS
ip-type: exclusive
hostid:
net:
address not specified
physical: vnet1
defrouter not specified
device
match: /dev/rdsk/c0d2s0
attr:
name: machine
type: string
value: sun4u
Listing 3. Setting Up the Branded Zone
zoneadm command.In the following example:
-z specifies the zone name.-p specifies that we preserve system identity.-a specifies the archive location.guest# zoneadm -z s8-zone install -p -a /export/home/s8-system.flar
guest# zoneadm -z s8-zone boot guest# zlogin -C s8-zone sol8_zone# su - oracle
sol8_zone# chown oracle:dba /dev/rdsk/c0d2s0
sol8_zone$ lsnrctl start
sol8_zone$ export ORACLE_SID=+ASM sol8_zone$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Sun Aug 26 14:36:44 2012 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to an idle instance. SQL> startup ASM instance started Total System Global Area 130023424 bytes Fixed Size 2050360 bytes Variable Size 102807240 bytes ASM Cache 25165824 bytes ASM diskgroups mounted SQL> quit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
Listing 4. Starting the Oracle Automatic Storage Management Instance
sol8_zone$ export ORACLE_SID=ORA10 sol8_zone$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Sun Aug 26 14:37:13 2012 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 1610612736 bytes Fixed Size 2052448 bytes Variable Size 385879712 bytes Database Buffers 1207959552 bytes Redo Buffers 14721024 bytes Database mounted. Database opened.
Listing 5. Starting Oracle Database
In the first example, we preserved the host information, which includes the host name, IP address, and name services configuration. Sometimes during P2V migration, we need to change the host information, for example, changing the IP address or host name.
In this second example, we will modify the host name. All the steps are the same as in the first example until you reach the point where you install the Oracle Solaris 8 zone. At that point, use the following steps instead.
guest# zoneadm -z s8-zone install -u -a /net/server/s8_image.flar
guest# zoneadm -z s8-zone boot
guest# zlogin -C s8-zone
sol8_zone# chown oracle:dba /dev/rdsk/c0d2s0 sol8_zone# cd $ORACLE_HOME/bin
sol8_zone# ./localconfig delete Aug 27 05:17:11 s8-zone last message repeated 3 times Aug 27 05:17:28 s8-zone root: Oracle CSSD being stopped Stopping CSSD. Unable to communicate with the CSS daemon. Shutdown has begun. The daemons should exit soon. sol8_zone# ./localconfig add Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'other'.. Operation successful. Configuration for local CSS has been initialized sol8_zone# su - oracle
Listing 6. Reconfiguring Parameters
For more information about installing Oracle Solaris on a guest domain, see the "Installing Oracle Solaris OS on a Guest Domain" section of the Oracle VM Server for SPARC 2.2 Administration Guide.
Orgad Kimchi is a principle software engineer on the ISV Engineering team at Oracle (formerly Sun Microsystems). For 5 years he has specialized in virtualization and cloud computing technologies.
| Revision 1.0, 10/10/2012 |