Tuesday, July 22, 2008


Install Oracle 10.2.0.1 (64-bit) on SNV93 DomU at SNV93 Dom0



This instruction closely follows the one for 32-bit install
Oracle 10.2.0.2 on Solaris 10 at oracle-base.com ([1]). I have to
notice that attempt to reproduce it on 32-bit SNV93 DomU crashes
as usual. View discuss forum@opensolaris.org ([2]).
However, it's a bit different from [1] and allows to perform everything
quite smoothly. It is also supposed to be used only in development environment.


As the root user, issue the following command.

# projadd oracle

Append the following line to the "/etc/user_attr" file.

oracle::::project=oracle

If you've performed a default installation, it is likely that the only kernel parameter you need to alter is "max-shm-memory".
To check the current value issue the following command.



# prctl -n project.max-shm-memory -i project oracle
project: 100: oracle
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 254MB - deny -
system 16.0EB max deny -




To reset this value, make sure at least one session is logged in as the oracle user, then from the root user issue the following commands.



# prctl -n project.max-shm-memory -v 4gb -r -i project oracle
# projmod -s -K "project.max-shm-memory=(priv,4gb,deny)" oracle




The first dynamically resets the value, while the second makes changes to the "/etc/project" file so the value is persistent between reboots.



# cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
oracle:100::::project.max-shm-memory=(priv,4294967296,deny)


# prctl -n project.max-shm-memory -i project oracle
project: 100: oracle
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 4.00GB - deny -
system 16.0EB max deny -




Create the new groups and users:



groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba -d -m /export/home/oracle \
-s /bin/bash oracle
chown oracle:oinstall /export/home/oracle
passwd -r files oracle




Create the directories in which the Oracle software will be installed:

# mkdir -p /u01/app/oracle/product/10.2.0/db_1
# chown -R oracle:oinstall /u01


Login as the oracle user and add the following lines at the end of the .bash_profile file:



# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
# Select the appropriate ORACLE_BASE
#ORACLE_BASE=/export/home/oracle; export ORACLE_BASE
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=SNV93; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
TERM=vt100; export TERM




Set up Sun Xvnc at DomU and login as oracle via
# vncviewer IP-DomU:1
from another terminal session.



svccfg -s application/x11/x11-server \
add display1
svccfg -s application/x11/x11-server:display1 \
addpg options application
svccfg -s application/x11/x11-server:display1 \
addpropvalue options/server astring: "/usr/X11/bin/Xvnc"
svccfg -s application/x11/x11-server:display1 \
addpropvalue options/server_args astring: '"SecurityTypes=None"'

# Configure dtlogin to start it

mkdir -p /etc/dt/config
cp /usr/dt/config/Xservers /etc/dt/config/Xservers
echo " :1 Local local_uid@none root /usr/X11/bin/Xserver :1" \
>> /etc/dt/config/Xservers
pkill -HUP dtlogin





Start ./runIstaller in advanced mode and
select option "Install Software only"




















Run "dbca" and create database SNV93 (as referenced by ORACLE_SID)






Run "netca" to create LISTENER process and perform Local names resolution creating files listener.ora and tnsnames.ora under $ORACLE_HOME/network/sdmin.








-bash-3.2$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Solaris94PV)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)


-bash-3.2$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

SNVDATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = Solaris94PV)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = SNVDATA)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)




Modify file /var/opt/oracle/oratab and change "N" to "Y".
Restart database.



$ emctl stop dbconsole
$ dbshut
$ lsnrctl stop
$ lsnrctl start
$ dbstart
$ isqlplusctl start
$ emctl start dbconsole






Modify /etc/hosts at Dom0 and launch browser at Dom0 to
http://Server93pv:1158/em/











References
1.http://oracle-base.com/articles/10g/OracleDB10gR2InstallationOnSolaris10.php
2.http://opensolaris.org/jive/thread.jspa?messageID=237405

Thursday, July 17, 2008


Install CentOS 5.X DomU at SNV93 Dom0 on boards with integrated NIC RTL8110SC/RTL8111B



ASUS P5K Premium/WIFI, P5K3 Deluxe,P5K Deluxe P5E3 Deluxe,Abit IP35 Pro,Gigabyte GA-P35-DQ6,MSI P35 Platinum have integrated on the board Realtek's NICs RTL8110SC/RTL8111B .RTL8110SC/RTL8111B (vs Marvell 88E8056 first NIC integrated on ASUS boards) are GLDv3 NICs and may be used for Solaris xVM PV and HVM DomUs creation at Solaris (Nevada) Dom0.
However, disabling checksum offloading on Linux DomU netfront driver (eth0) is required to get network on DomU.
Install CentOS 5.X DomU via virt-install as usual:-



# dladm show-dev
LINK STATE SPEED DUPLEX
rtls0 unknown 0Mb unknown
rge0 up 100Mb full

# svccfg -s xvm/xend setprop config/default-nic="rge0"
# svcadm refresh xvm/xend
# svcadm restart xvm/xend

# lofiadm -a /export/home/isos/rhel.iso
# mount -o ro -F hsfs /dev/lofi/1 /mnt
# share -F nfs /mnt
# virt-install -n RHEL5PV -p -r 1024 --nographics \
-f /dev/zvol/dsk/nevada/disk1 -l nfs:192.168.1.35:/mnt




Successfully installed in dhcp mode CentOS 5.X DomU appears to be unable to communicate with other boxes on the LAN and internet, except SNV93 Dom0, due to failure checksum offloading on Realtek 8110SC/RTL8111B.
Attempts of ssh connection from CentOS 5.1 DomU 192.168.1.37 at SNV93 Dom0 (NIC RTL8110SC)
# ssh user1@192.168.1.54
hangs ..
TCPDUMP running on remote box (192.168.1.54)
# tcpdump -s 1600 -vv



One entry generates for each ssh connection attempt.
First:-
17:12:43.058821 IP (tos 0x0, ttl 64, id 19771, offset 0, flags [DF], proto TCP (6), length 72) 192.168.1.37.52189
> 192.168.1.54.ssh: P, cksum 0x83e6 (incorrect (-> 0x9a09), 1169627751:1169627771(20) ack 423312198 win 46
Second:-
17:16:27.515427 IP (tos 0x0, ttl 64, id 19773, offset 0, flags [DF], proto TCP (6), length 72) 192.168.1.37.52189
> 192.168.1.54.ssh: P, cksum 0x83e6 (incorrect (-> 0xbed7), 1169627751:1169627771(20) ack 423312198 win 46




The solution is to disable checksum offloading on eth0 at Linux DomU.
Package ethtools has to be installed at DomU.
Following string has been added to /etc/rc.d/rc.local:-



/usr/local/sbin/ethtool -K eth0 tx off




Setup VNC on DomU:-



# mkdir .vnc
# cd .vnc
# vncserver :1
Vnc password will be requested by the last command.
Edit ~/.vnc/xstartup and uncomment first two lines.
Make this file as follows bellow:
#!/bin/sh
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
Make following changes to /etc/sysconfig/vncservers file:-
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1024x768"
Then run:-
# chkconfig vncserver on
# reboot


















Setup F8 DomU at SNV93 Dom0


1.Login as root to DomU
2.Disable checksum offloading:-
# /usr/local/sbin/ethtool -K eth0 tx off
3.Install vnserver:-
# yum install vnc-server
4.Disable firewall:-
# /etc/init.d/iptables stop
5.Setup VNC as suggested above.
6.Connect to F8 DomU:-
# vncviwer IP-DomU:1
7. Tune firewall to enable port 5901/tcp
and apply settings.








References
1.http://techreport.com/articles.x/12747/1

Monday, July 14, 2008


Virt-manager on Solaris Nevada build 93



Quote:-
The Virtual Machine Manager application (virt-manager) is a desktop user interface for managing virtual machines. It presents a summary view of running domains and their live performance & resource utilization statistics. A detailed view presents graphs showing performance & utilization over time. Ultimately it will allow creation of new domains, and configuration & adjustment of a domain's resource allocation & virtual hardware. Finally an embedded VNC client viewer presents a full graphical console to the guest domain.


Following bellow is step by step procedure of SNV93 PV DomU
install at SNV93 Dom0. Actually, all work supposed to be done was performed in SolatisPV Serial Console, ending up with Sun Xvnc setup to provide graphical interface to SNV93 PV DomU.
ZFS file system has been used as root DomU's image, installation source was set to a local path to SNV93 DVD ISO image.


1. Project is ready to start





2. Proceed with install via SolarisPV Serial Console














3. DomU has been built and restarts








4. Disabling checksum offloading by "xnf" driver at DomU and run
# sys-unconfig
due to known bug with "rge" driver ([1]) , box has been built up on ASUS P5K Premium/WI-FI with integrated NIC RTL8110SC.





5. DHCP request after reboot





6. DHCPACK succeeded





7. Network works fine now








8. Setup Xnvc via scripting tools at serial console








9. At this time you are welcome to new Gnome Desktop environment











References
1.Install SNV91 DomU at SNV91 Dom0 on boards with integrated NIC RTL8110SC

Saturday, July 05, 2008


Install Sun Studio Express 12 on SNV93 DomU at Xen 3.2.1 F8 Dom0



The sample bellow briefly demonstrates attaching SXDE ISO images to SNV_93 DomU as a block oriented device which could be mounted afterwards on /mnt folder at DomU to support Sun Studio 12 Express install on PV DomU via graphical interface provided by Sun Xvnc implementation. Actually,
xm block-attach command allows to avoid uploading ISO image to DomU,
lofiadm this image and etc. Ofcourse, having Solaris NFS share on the
LAN helps out immediately. Procedure makes sense for standalone developers
environment.


Create device /dev/dsk/c0d9s2 at DomU utilizing command:-
# xm block-attach file:/etc/xen/isos/snv90.iso 9 r








Then mount with options "-o ro -F hsfs" this device on /mnt directory at DomU:-








Setup Sun Xvnc at DomU as advised by OpenSolaris instructions:



svccfg -s application/x11/x11-server \
add display1
svccfg -s application/x11/x11-server:display1 \
addpg options application
svccfg -s application/x11/x11-server:display1 \
addpropvalue options/server astring: "/usr/X11/bin/Xvnc"
svccfg -s application/x11/x11-server:display1 \
addpropvalue options/server_args astring: '"SecurityTypes=None"'

# Configure dtlogin to start it

mkdir -p /etc/dt/config
cp /usr/dt/config/Xservers /etc/dt/config/Xservers
echo " :1 Local local_uid@none root /usr/X11/bin/Xserver :1" \
>> /etc/dt/config/Xservers
pkill -HUP dtlogin

useradd -m -d /export/home/user1 -s /bin/bash user1
chown -R user1:other /export/home/user1
passwd -r files user1

Connect from another terminal session with:
vncviewer IP-ADDREES-DomU:1
and verify you see the login screen and can
login to a desktop session as user1.




Open connection to DomU via vncviewer to run:-
$ su root
# /mnt/DeveloperToools/install_devtools.sh








Make sure Sun Studio has been installed:-