Running IBM DB2 in Oracle VM Server for SPARC (LDoms)

Oracle VM Server for SPARC (previously called Sun Logical Domains) provides zero-cost virtualization for Sun CMT servers. There are two virtualization technologies available on Sun CMT servers. One is Solaris Container, which is OS level virtualization. Though each Container can have dedicated CPUs, memory and NICs, all Solaris Containers on the system share the same OS. The other is Logical Domains, which is hypervisor level virtualization. Besides dedicated hardware resources such as CPUs, memory, disks, NICs, each Logical Domain can have their own OS, which provides maximum isolation. We've been working with IBM to verify that IBM DB2 database server supports both virtualization technologies on Sun CMT servers.

This blog walks through the steps to create and set up IBM DB2 in a guest domain of Oracle VM Server for SPARC in a lab environment.

1. Preparation Work

1.1. Download Logical Domains Manager 1.3 from http://www.sun.com/servers/coolthreads/ldoms/get.jsp
1.2. The download information page and the release notes lists a matrix of required Solaris OS and System Firmware versions. To make the Logical Domains function well, it is very important to apply the required Solaris OS patches and system Firmware patches.
1.3. Get a static IP address and hostname for the guest domain.

2. Install Logical Domains Manager Software
LDoms SW package consists from LDM package and JAAS security toolkit package. JASS is used for "hardening" primary domain in production environment to make LDoms configuration more secure. In lab environment we don't use this hardening feature.

2.1 Installing LDoms and Solaris Security Toolkit packages.
# ./install-ldm -d none

2.2 Adding LDM binary and mans into SHELL path
# vi /.profile PATH=$PATH:.:/opt/SUNWldm/bin export PATH MANPATH=$MANPATH:/opt/SUNWldm/man export MANPATH

2.3 Checking then LDM is installed successfully
# ldm ls

3 Configuring LDoms Primary Domain Resources
3.1. Create a virtual disk server (vds) to allow importing virtual disks into a logical domain
# ldm add-vds primary-vds0 primary

3.2. Create a virtual console concentrator service (vcc) for use by the virtual network terminal server daemon (vntsd) and as a concentrator for all logical domain consoles.
 # ldm add-vcc port-range=5000-5100 primary-vcc0 primary

3.3. Create a virtual switch service (vsw) to enable networking between virtual network (vnet) devices in logical domains.
# ldm add-vsw net-dev=e1000g0 primary-vsw0 primary
# ldm list-services primary
VCC
        NAME         PORT-RANGE
        primary-vcc0 5000-5100
VSW
        NAME         MAC         NET-DEV         DEVICE         MODE
        primary-vsw0 00:14:4f:fa:b4:f8 e1000g0 switch@0
VDS
        NAME         VOLUME         OPTIONS         DEVICE
        primary-vds0

3.4. Set control domain resources
# ldm set-mau 1 primary
# ldm set-vcpu 4 primary
# ldm set-memory 2G primary
# ldm add-config initial
# ldm list-config
factory-default [current]
initial [next]

3.5. Reboot the system to make logical domains ready to use.
# touch /reconfigure #shutdown -y -g0 -i6

3.6. Get information from ldm to see our current configuration.
# ldm list-domain
NAME         STATE         FLAGS         CONS         VCPU       MEMORY       UTIL       UPTIME
 primary      active           -n-cv             SP               4               2G                  0.2%      2m

3.7. enable the virtual network terminal server daemon
# svcadm enable vntsd
# svcs -l vntsd
fmri         svc:/ldoms/vntsd:default
name      virtual network terminal server
enabled   true
state        online
next_state none
state_time Tue Jun 24 14:18:28 2010
logfile        /var/svc/log/ldoms-vntsd:default.log
restarter    svc:/system/svc/restarter:default
contract_id 55
dependency optional_all/error svc:/milestone/network (online)
dependency optional_all/none svc:/system/system-log (online)

4 Create a guest domain
4.1.Create a guest domain "db2ldom"
# ldm add-domain db2ldom

4.2. Add 16 virtual CPUs (4 cores) freed from the control domain in previous steps.
# ldm add-vcpu 16 db2ldom

4.3. Add 12G memory
# ldm add-memory 12G db2ldom

4.4. Set up virtual network device vnet. The MAC address is assigned automatically.
# ldm add-vnet vnet1 primary-vsw0 db2ldom

4.5. Add the virutal disk device that will be used as the system disk for the guest domain.
# ldm add-vdsdev /dev/dsk/c1t40d0s2 vol1@primary-vds0

4.6. Create the binding from the disk service to a virtual disk device.
# ldm add-vdisk vdisk1 vol1@primary-vds0 db2ldom

4.7. Set up boot parameters. Set autoboot to false as we will need to boot from the network for OS installation.
# ldm set-var auto-boot\?=false db2ldom

4.8. Point to the virtual disk device as the ultimate boot device after we have installed the Solaris OS on it.
# ldm set-var boot-device=/virtual-device@100/channel-device@200/disk@0 db2ldom

4.9. Bind the resources to the guest domain.
# ldm bind-domain db2ldom

4.10. List guest domain information.
# ldm list-domain db2ldom
NAME      STATE      FLAGS      CONS      VCPU      MEMORY      UTIL      UPTIME
db2ldom   bound        -----           5000        16            12G            

4.11. Start the guest domain db2ldom
# ldm start-domain db2ldom
LDom db2ldom started

4.12. Connect to it the through the default virtual console. Identify the network device and install the Solaris 10 OS from the network.
# telnet localhost 5000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Connecting to console "db2ldom" in group "db2ldom" ....
Press ~? for control options ..

{0} ok banner Sun Fire T200, No Keyboard
Copyright 2008 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.28.1, 12288 MB memory available, Serial #66716457.
Ethernet address 0:14:4f:fa:3:29, Host ID: 83fa0329.
{0} ok show-nets
a) /virtual-devices@100/channel-devices@200/network@0
q) NO SELECTION
Enter Selection, q to quit: a
/virtual-devices@100/channel-devices@200/network@0 has been selected.
Type ^Y ( Control-Y ) to insert it in the command line.
e.g. ok nvalias mydev ^Y
            for creating devalias mydev for /virtual-devices@100/channel-devices@200   /network@0
{0} ok nvalias mydev /virtual-devices@100/channel-devices@200/network@0
{0} ok boot net - nowin

Notes for network installation:
On the Jumpstart server,
1.Add the Ethernet address (MAC) of the guest domain to /etc/ethers.
2.Also need to add the IP address of the guest domain to /etc/hosts. The Ethernet address will be mapped to the IP address when booting from the network.
3.Run "add_install_client -d <client-host-name> sun4v" to add the client as the installation client.

5 Log into the guest domain

By default, networking between the control domain and other domains is disabled. Only telnet console access is allowed. This mean, e.g., you can not ping or ssh to the guest domain from the control domain with default LDoms install setup. To enable this, follow the administration guide to configure the virtual switch device.

We can access the guest domain db2ldom just like any other physical system. It is a virtual system that has its own IP address, hostname, and OS. Then we can install and run IBM DB2 database server in this guest domain.
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

This is a blog to talk about technical information regarding running IBM DB2 database on Solaris.

Search

Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today